From a8171f7314116ba6bd1f0334afa57dc965e1a332 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Thu, 31 Dec 2020 09:57:21 +0100 Subject: [PATCH] ui fixes --- example/lib/group_chat_details_screen.dart | 1 + example/lib/new_chat_screen.dart | 1 + example/lib/new_group_chat_screen.dart | 9 +++++---- example/pubspec.yaml | 2 +- lib/src/attachment_error.dart | 6 +++--- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/example/lib/group_chat_details_screen.dart b/example/lib/group_chat_details_screen.dart index b186684f..19674332 100644 --- a/example/lib/group_chat_details_screen.dart +++ b/example/lib/group_chat_details_screen.dart @@ -61,6 +61,7 @@ class _GroupChatDetailsScreenState extends State { child: Scaffold( backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, appBar: AppBar( + brightness: Theme.of(context).brightness, elevation: 1, backgroundColor: StreamChatTheme.of(context).colorTheme.white, leading: const StreamBackButton(), diff --git a/example/lib/new_chat_screen.dart b/example/lib/new_chat_screen.dart index 4cebb564..ddebe848 100644 --- a/example/lib/new_chat_screen.dart +++ b/example/lib/new_chat_screen.dart @@ -121,6 +121,7 @@ class _NewChatScreenState extends State { return Scaffold( backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, appBar: AppBar( + brightness: Theme.of(context).brightness, elevation: 0, backgroundColor: StreamChatTheme.of(context).colorTheme.white, leading: const StreamBackButton(), diff --git a/example/lib/new_group_chat_screen.dart b/example/lib/new_group_chat_screen.dart index d094f5c0..a81f2f51 100644 --- a/example/lib/new_group_chat_screen.dart +++ b/example/lib/new_group_chat_screen.dart @@ -50,14 +50,15 @@ class _NewGroupChatScreenState extends State { @override Widget build(BuildContext context) { - return SafeArea( - child: Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, - body: NestedScrollView( + return Scaffold( + backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + body: SafeArea( + child: NestedScrollView( floatHeaderSlivers: true, headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) { return [ SliverAppBar( + brightness: Theme.of(context).brightness, pinned: true, forceElevated: true, elevation: 1, diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 481bdd37..0fca32a4 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,6 +1,6 @@ name: example description: A new Flutter project. -version: 1.0.100+103 +version: 1.0.101+104 environment: sdk: ">=2.2.2 <3.0.0" diff --git a/lib/src/attachment_error.dart b/lib/src/attachment_error.dart index 0b51e59c..d24423c4 100644 --- a/lib/src/attachment_error.dart +++ b/lib/src/attachment_error.dart @@ -25,12 +25,12 @@ class AttachmentError extends StatelessWidget { return Center( child: Container( width: size?.width, - height: size?.height, - color: Color(0xffd0021B).withOpacity(.1), + height: size?.height ?? 200, + color: StreamChatTheme.of(context).colorTheme.accentRed.withOpacity(.1), child: Center( child: Icon( Icons.error_outline, - color: StreamChatTheme.of(context).colorTheme.white, + color: StreamChatTheme.of(context).colorTheme.black, ), ), ),