diff --git a/packages/stream_chat_v1/lib/advanced_options_page.dart b/packages/stream_chat_v1/lib/advanced_options_page.dart index 4a97c68..3fd9a95 100644 --- a/packages/stream_chat_v1/lib/advanced_options_page.dart +++ b/packages/stream_chat_v1/lib/advanced_options_page.dart @@ -33,22 +33,20 @@ class _AdvancedOptionsPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + backgroundColor: StreamChatTheme.of(context).colorTheme.appBg, appBar: AppBar( - backgroundColor: StreamChatTheme.of(context).colorTheme.white, + backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg, elevation: 1, centerTitle: true, brightness: Theme.of(context).brightness, title: Text( 'Advanced Options', - style: StreamChatTheme.of(context) - .textTheme - .headlineBold - .copyWith(color: StreamChatTheme.of(context).colorTheme.black), + style: StreamChatTheme.of(context).textTheme.headlineBold.copyWith( + color: StreamChatTheme.of(context).colorTheme.textHighEmphasis), ), leading: IconButton( icon: StreamSvgIcon.left( - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context).colorTheme.textHighEmphasis, ), onPressed: () { Navigator.pop(context); @@ -85,7 +83,9 @@ class _AdvancedOptionsPageState extends State { }, style: TextStyle( fontSize: 14, - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis, ), decoration: InputDecoration( errorStyle: TextStyle(height: 0, fontSize: 0), @@ -93,15 +93,16 @@ class _AdvancedOptionsPageState extends State { fontSize: 14, fontWeight: FontWeight.bold, color: _apiKeyError != null - ? StreamChatTheme.of(context).colorTheme.accentRed - : StreamChatTheme.of(context).colorTheme.grey, + ? StreamChatTheme.of(context).colorTheme.accentError + : StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, ), border: UnderlineInputBorder( borderRadius: BorderRadius.circular(8), borderSide: BorderSide.none, ), - fillColor: - StreamChatTheme.of(context).colorTheme.whiteSmoke, + fillColor: StreamChatTheme.of(context).colorTheme.inputBg, filled: true, labelText: _apiKeyError != null ? 'CHAT API KEY: $_apiKeyError' @@ -131,7 +132,9 @@ class _AdvancedOptionsPageState extends State { }, style: TextStyle( fontSize: 14, - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis, ), textInputAction: TextInputAction.next, decoration: InputDecoration( @@ -140,15 +143,16 @@ class _AdvancedOptionsPageState extends State { fontWeight: FontWeight.bold, fontSize: 14, color: _userIdError != null - ? StreamChatTheme.of(context).colorTheme.accentRed - : StreamChatTheme.of(context).colorTheme.grey, + ? StreamChatTheme.of(context).colorTheme.accentError + : StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, ), border: UnderlineInputBorder( borderRadius: BorderRadius.circular(8), borderSide: BorderSide.none, ), - fillColor: - StreamChatTheme.of(context).colorTheme.whiteSmoke, + fillColor: StreamChatTheme.of(context).colorTheme.inputBg, filled: true, labelText: _userIdError != null ? 'USER ID: $_userIdError' @@ -177,7 +181,9 @@ class _AdvancedOptionsPageState extends State { }, style: TextStyle( fontSize: 14, - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis, ), textInputAction: TextInputAction.next, decoration: InputDecoration( @@ -186,15 +192,16 @@ class _AdvancedOptionsPageState extends State { fontWeight: FontWeight.bold, fontSize: 14, color: _userTokenError != null - ? StreamChatTheme.of(context).colorTheme.accentRed - : StreamChatTheme.of(context).colorTheme.grey, + ? StreamChatTheme.of(context).colorTheme.accentError + : StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, ), border: UnderlineInputBorder( borderRadius: BorderRadius.circular(8), borderSide: BorderSide.none, ), - fillColor: - StreamChatTheme.of(context).colorTheme.whiteSmoke, + fillColor: StreamChatTheme.of(context).colorTheme.inputBg, filled: true, labelText: _userTokenError != null ? 'USER TOKEN: $_userTokenError' @@ -209,14 +216,15 @@ class _AdvancedOptionsPageState extends State { labelStyle: TextStyle( fontSize: 14, fontWeight: FontWeight.bold, - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, ), border: UnderlineInputBorder( borderRadius: BorderRadius.circular(8), borderSide: BorderSide.none, ), - fillColor: - StreamChatTheme.of(context).colorTheme.whiteSmoke, + fillColor: StreamChatTheme.of(context).colorTheme.inputBg, filled: true, labelText: 'Username (optional)', ), @@ -228,7 +236,7 @@ class _AdvancedOptionsPageState extends State { Theme.of(context).brightness == Brightness.light ? StreamChatTheme.of(context) .colorTheme - .accentBlue + .accentPrimary : Colors.white), elevation: MaterialStateProperty.all(0), padding: MaterialStateProperty.all( @@ -244,7 +252,9 @@ class _AdvancedOptionsPageState extends State { style: TextStyle( fontSize: 16, color: Theme.of(context).brightness != Brightness.light - ? StreamChatTheme.of(context).colorTheme.accentBlue + ? StreamChatTheme.of(context) + .colorTheme + .accentPrimary : Colors.white, ), ), @@ -270,7 +280,7 @@ class _AdvancedOptionsPageState extends State { borderRadius: BorderRadius.circular(16), color: StreamChatTheme.of(context) .colorTheme - .white, + .barsBg, ), height: 100, width: 100, diff --git a/packages/stream_chat_v1/lib/channel_file_display_screen.dart b/packages/stream_chat_v1/lib/channel_file_display_screen.dart index 806f184..2cffbc8 100644 --- a/packages/stream_chat_v1/lib/channel_file_display_screen.dart +++ b/packages/stream_chat_v1/lib/channel_file_display_screen.dart @@ -50,7 +50,7 @@ class _ChannelFileDisplayScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.white, + backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg, appBar: AppBar( brightness: Theme.of(context).brightness, elevation: 1, @@ -58,7 +58,7 @@ class _ChannelFileDisplayScreenState extends State { title: Text( 'Files', style: TextStyle( - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context).colorTheme.textHighEmphasis, fontSize: 16.0), ), leading: Center( @@ -70,13 +70,13 @@ class _ChannelFileDisplayScreenState extends State { width: 24.0, height: 24.0, child: StreamSvgIcon.left( - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context).colorTheme.textHighEmphasis, size: 24.0, ), ), ), ), - backgroundColor: StreamChatTheme.of(context).colorTheme.white, + backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg, ), body: _buildMediaGrid(), ); @@ -103,14 +103,15 @@ class _ChannelFileDisplayScreenState extends State { children: [ StreamSvgIcon.files( size: 136.0, - color: StreamChatTheme.of(context).colorTheme.greyGainsboro, + color: StreamChatTheme.of(context).colorTheme.disabled, ), SizedBox(height: 16.0), Text( 'No Files', style: TextStyle( fontSize: 14.0, - color: StreamChatTheme.of(context).colorTheme.black, + color: + StreamChatTheme.of(context).colorTheme.textHighEmphasis, ), ), SizedBox(height: 8.0), @@ -121,7 +122,7 @@ class _ChannelFileDisplayScreenState extends State { fontSize: 14.0, color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5), ), ), diff --git a/packages/stream_chat_v1/lib/channel_list.dart b/packages/stream_chat_v1/lib/channel_list.dart index e88c9a1..c31fabb 100644 --- a/packages/stream_chat_v1/lib/channel_list.dart +++ b/packages/stream_chat_v1/lib/channel_list.dart @@ -60,137 +60,137 @@ class _ChannelList extends State { } return true; }, - child: ChannelsBloc( - child: MessageSearchBloc( - child: NestedScrollView( - floatHeaderSlivers: true, - headerSliverBuilder: (_, __) => [ - SliverToBoxAdapter( - child: SearchTextField( - controller: _controller, - showCloseButton: _isSearchActive, - ), - ), - ], - body: AnimatedSwitcher( - duration: const Duration(milliseconds: 350), - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onPanDown: (_) => FocusScope.of(context).unfocus(), - child: _isSearchActive - ? MessageSearchListView( - showErrorTile: true, - messageQuery: _channelQuery, - filters: Filter.in_('members', [user!.id]), - sortOptions: [ - SortOption( - 'created_at', - direction: SortOption.ASC, - ), - ], - pullToRefresh: false, - paginationParams: PaginationParams(limit: 20), - emptyBuilder: (_) { - return LayoutBuilder( - builder: (context, viewportConstraints) { - return SingleChildScrollView( - physics: AlwaysScrollableScrollPhysics(), - child: ConstrainedBox( - constraints: BoxConstraints( - minHeight: viewportConstraints.maxHeight, - ), - child: Center( - child: Column( - children: [ - Padding( - padding: const EdgeInsets.all(24), - child: StreamSvgIcon.search( - size: 96, - color: Colors.grey, - ), + child: NestedScrollView( + floatHeaderSlivers: true, + headerSliverBuilder: (_, __) => [ + SliverToBoxAdapter( + child: SearchTextField( + controller: _controller, + showCloseButton: _isSearchActive, + ), + ), + ], + body: AnimatedSwitcher( + duration: const Duration(milliseconds: 350), + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onPanDown: (_) => FocusScope.of(context).unfocus(), + child: _isSearchActive + ? MessageSearchBloc( + child: MessageSearchListView( + showErrorTile: true, + messageQuery: _channelQuery, + filters: Filter.in_('members', [user!.id]), + sortOptions: [ + SortOption( + 'created_at', + direction: SortOption.ASC, + ), + ], + pullToRefresh: false, + paginationParams: PaginationParams(limit: 20), + emptyBuilder: (_) { + return LayoutBuilder( + builder: (context, viewportConstraints) { + return SingleChildScrollView( + physics: AlwaysScrollableScrollPhysics(), + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: viewportConstraints.maxHeight, + ), + child: Center( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(24), + child: StreamSvgIcon.search( + size: 96, + color: Colors.grey, ), - Text( - 'No results...', - ), - ], - ), + ), + Text( + 'No results...', + ), + ], ), ), - ); - }, - ); - }, - onItemTap: (messageResponse) async { - FocusScope.of(context).requestFocus(FocusNode()); - final client = StreamChat.of(context).client; - final message = messageResponse.message; - final channel = client.channel( - messageResponse.channel!.type, - id: messageResponse.channel!.id, - ); - if (channel.state == null) { - await channel.watch(); - } - Navigator.pushNamed( + ), + ); + }, + ); + }, + onItemTap: (messageResponse) async { + FocusScope.of(context).requestFocus(FocusNode()); + final client = StreamChat.of(context).client; + final message = messageResponse.message; + final channel = client.channel( + messageResponse.channel!.type, + id: messageResponse.channel!.id, + ); + if (channel.state == null) { + await channel.watch(); + } + Navigator.pushNamed( + context, + Routes.CHANNEL_PAGE, + arguments: ChannelPageArgs( + channel: channel, + initialMessage: message, + ), + ); + }, + ), + ) + : ChannelsBloc( + child: ChannelListView( + onStartChatPressed: () { + Navigator.pushNamed(context, Routes.NEW_CHAT); + }, + swipeToAction: true, + filter: Filter.in_('members', [user!.id]), + presence: true, + pagination: PaginationParams( + limit: 20, + ), + channelWidget: ChannelPage(), + onViewInfoTap: (channel) { + Navigator.pop(context); + if (channel.memberCount == 2 && channel.isDistinct) { + Navigator.push( context, - Routes.CHANNEL_PAGE, - arguments: ChannelPageArgs( - channel: channel, - initialMessage: message, + MaterialPageRoute( + builder: (context) => StreamChannel( + channel: channel, + child: ChatInfoScreen( + messageTheme: StreamChatTheme.of(context) + .ownMessageTheme, + user: channel.state!.members + .where((m) => + m.userId != + channel.client.state.user!.id) + .first + .user, + ), + ), ), ); - }, - ) - : ChannelListView( - onStartChatPressed: () { - Navigator.pushNamed(context, Routes.NEW_CHAT); - }, - swipeToAction: true, - filter: Filter.in_('members', [user!.id]), - presence: true, - pagination: PaginationParams( - limit: 20, - ), - channelWidget: ChannelPage(), - onViewInfoTap: (channel) { - Navigator.pop(context); - if (channel.memberCount == 2 && channel.isDistinct) { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => StreamChannel( - channel: channel, - child: ChatInfoScreen( - messageTheme: StreamChatTheme.of(context) - .ownMessageTheme, - user: channel.state!.members - .where((m) => - m.userId != - channel.client.state.user!.id) - .first - .user, - ), + } else { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => StreamChannel( + channel: channel, + child: GroupInfoScreen( + messageTheme: StreamChatTheme.of(context) + .ownMessageTheme, ), ), - ); - } else { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => StreamChannel( - channel: channel, - child: GroupInfoScreen( - messageTheme: StreamChatTheme.of(context) - .ownMessageTheme, - ), - ), - ), - ); - } - }, - ), - ), - ), + ), + ); + } + }, + ), + ), ), ), ), diff --git a/packages/stream_chat_v1/lib/channel_list_page.dart b/packages/stream_chat_v1/lib/channel_list_page.dart index baf6eca..5379062 100644 --- a/packages/stream_chat_v1/lib/channel_list_page.dart +++ b/packages/stream_chat_v1/lib/channel_list_page.dart @@ -33,7 +33,7 @@ class _ChannelListPageState extends State { children: [ StreamSvgIcon.message( color: _isSelected(0) - ? StreamChatTheme.of(context).colorTheme.black + ? StreamChatTheme.of(context).colorTheme.textHighEmphasis : Colors.grey, ), Positioned( @@ -51,7 +51,7 @@ class _ChannelListPageState extends State { children: [ StreamSvgIcon.mentions( color: _isSelected(1) - ? StreamChatTheme.of(context).colorTheme.black + ? StreamChatTheme.of(context).colorTheme.textHighEmphasis : Colors.grey, ), ], @@ -68,7 +68,7 @@ class _ChannelListPageState extends State { return Offstage(); } return Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + backgroundColor: StreamChatTheme.of(context).colorTheme.appBg, appBar: ChannelListHeader( onNewChatButtonTap: () { Navigator.pushNamed(context, Routes.NEW_CHAT); @@ -82,14 +82,15 @@ class _ChannelListPageState extends State { ), drawerEdgeDragWidth: 50, bottomNavigationBar: BottomNavigationBar( - backgroundColor: StreamChatTheme.of(context).colorTheme.white, + backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg, currentIndex: _currentIndex, items: _navBarItems, selectedLabelStyle: StreamChatTheme.of(context).textTheme.footnoteBold, unselectedLabelStyle: StreamChatTheme.of(context).textTheme.footnoteBold, type: BottomNavigationBarType.fixed, - selectedItemColor: StreamChatTheme.of(context).colorTheme.black, + selectedItemColor: + StreamChatTheme.of(context).colorTheme.textHighEmphasis, unselectedItemColor: Colors.grey, onTap: (index) { setState(() => _currentIndex = index); @@ -144,7 +145,7 @@ class LeftDrawer extends StatelessWidget { Widget build(BuildContext context) { return Drawer( child: Container( - color: StreamChatTheme.of(context).colorTheme.white, + color: StreamChatTheme.of(context).colorTheme.barsBg, child: SafeArea( child: Padding( padding: EdgeInsets.only( @@ -181,7 +182,7 @@ class LeftDrawer extends StatelessWidget { leading: StreamSvgIcon.penWrite( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(.5), ), onTap: () { @@ -201,7 +202,7 @@ class LeftDrawer extends StatelessWidget { leading: StreamSvgIcon.contacts( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(.5), ), onTap: () { @@ -244,7 +245,7 @@ class LeftDrawer extends StatelessWidget { leading: StreamSvgIcon.user( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(.5), ), title: Text( @@ -257,7 +258,9 @@ class LeftDrawer extends StatelessWidget { icon: StreamSvgIcon.iconMoon( size: 24, ), - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, onPressed: () async { final sp = await StreamingSharedPreferences.instance; sp.setInt( diff --git a/packages/stream_chat_v1/lib/channel_media_display_screen.dart b/packages/stream_chat_v1/lib/channel_media_display_screen.dart index 15f8fd6..f2ad261 100644 --- a/packages/stream_chat_v1/lib/channel_media_display_screen.dart +++ b/packages/stream_chat_v1/lib/channel_media_display_screen.dart @@ -59,7 +59,7 @@ class _ChannelMediaDisplayScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.white, + backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg, appBar: AppBar( brightness: Theme.of(context).brightness, elevation: 1, @@ -67,12 +67,12 @@ class _ChannelMediaDisplayScreenState extends State { title: Text( 'Photos & Videos', style: TextStyle( - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context).colorTheme.textHighEmphasis, fontSize: 16.0, ), ), leading: StreamBackButton(), - backgroundColor: StreamChatTheme.of(context).colorTheme.white, + backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg, ), body: _buildMediaGrid(), ); @@ -99,14 +99,15 @@ class _ChannelMediaDisplayScreenState extends State { children: [ StreamSvgIcon.pictures( size: 136.0, - color: StreamChatTheme.of(context).colorTheme.greyGainsboro, + color: StreamChatTheme.of(context).colorTheme.disabled, ), SizedBox(height: 16.0), Text( 'No Media', style: TextStyle( fontSize: 14.0, - color: StreamChatTheme.of(context).colorTheme.black, + color: + StreamChatTheme.of(context).colorTheme.textHighEmphasis, ), ), SizedBox(height: 8.0), @@ -117,7 +118,7 @@ class _ChannelMediaDisplayScreenState extends State { fontSize: 14.0, color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5), ), ), diff --git a/packages/stream_chat_v1/lib/channel_page.dart b/packages/stream_chat_v1/lib/channel_page.dart index 1ff592c..0bdb6b6 100644 --- a/packages/stream_chat_v1/lib/channel_page.dart +++ b/packages/stream_chat_v1/lib/channel_page.dart @@ -59,7 +59,7 @@ class _ChannelPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + backgroundColor: StreamChatTheme.of(context).colorTheme.appBg, appBar: ChannelHeader( showTypingIndicator: false, onImageTap: () async { @@ -148,7 +148,7 @@ class _ChannelPageState extends State { alignment: Alignment.centerLeft, color: StreamChatTheme.of(context) .colorTheme - .whiteSnow + .appBg .withOpacity(.9), child: TypingIndicator( alignment: Alignment.centerLeft, @@ -160,8 +160,9 @@ class _ChannelPageState extends State { .textTheme .footnote .copyWith( - color: - StreamChatTheme.of(context).colorTheme.grey), + color: StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis), ), ), ), diff --git a/packages/stream_chat_v1/lib/chat_info_screen.dart b/packages/stream_chat_v1/lib/chat_info_screen.dart index 6517ef3..013851b 100644 --- a/packages/stream_chat_v1/lib/chat_info_screen.dart +++ b/packages/stream_chat_v1/lib/chat_info_screen.dart @@ -40,18 +40,18 @@ class _ChatInfoScreenState extends State { Widget build(BuildContext context) { final channel = StreamChannel.of(context).channel; return Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + backgroundColor: StreamChatTheme.of(context).colorTheme.appBg, body: ListView( children: [ _buildUserHeader(), Container( height: 8.0, - color: StreamChatTheme.of(context).colorTheme.greyGainsboro, + color: StreamChatTheme.of(context).colorTheme.disabled, ), _buildOptionListTiles(), Container( height: 8.0, - color: StreamChatTheme.of(context).colorTheme.greyGainsboro, + color: StreamChatTheme.of(context).colorTheme.disabled, ), if ([ 'admin', @@ -68,7 +68,7 @@ class _ChatInfoScreenState extends State { Widget _buildUserHeader() { return Material( - color: StreamChatTheme.of(context).colorTheme.whiteSnow, + color: StreamChatTheme.of(context).colorTheme.appBg, child: SafeArea( child: Stack( children: [ @@ -96,7 +96,7 @@ class _ChatInfoScreenState extends State { SizedBox(height: 15.0), OptionListTile( title: '@${widget.user!.id}', - tileColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + tileColor: StreamChatTheme.of(context).colorTheme.appBg, trailing: Padding( padding: const EdgeInsets.symmetric(horizontal: 8.0), child: Text( @@ -104,7 +104,7 @@ class _ChatInfoScreenState extends State { style: TextStyle( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5), fontSize: 16.0), ), @@ -134,7 +134,7 @@ class _ChatInfoScreenState extends State { // title: 'Notifications', // leading: StreamSvgIcon.Icon_notification( // size: 24.0, - // color: StreamChatTheme.of(context).colorTheme.black.withOpacity(0.5), + // color: StreamChatTheme.of(context).colorTheme.textHighEmphasis.withOpacity(0.5), // ), // trailing: CupertinoSwitch( // value: true, @@ -148,7 +148,7 @@ class _ChatInfoScreenState extends State { mutedBool.value = snapshot.data; return OptionListTile( - tileColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + tileColor: StreamChatTheme.of(context).colorTheme.appBg, title: 'Mute user', titleTextStyle: StreamChatTheme.of(context).textTheme.body, leading: Padding( @@ -157,7 +157,7 @@ class _ChatInfoScreenState extends State { size: 24.0, color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5), ), ), @@ -186,7 +186,7 @@ class _ChatInfoScreenState extends State { // title: 'Block User', // leading: StreamSvgIcon.Icon_user_delete( // size: 24.0, - // color: StreamChatTheme.of(context).colorTheme.black.withOpacity(0.5), + // color: StreamChatTheme.of(context).colorTheme.textHighEmphasis.withOpacity(0.5), // ), // trailing: CupertinoSwitch( // value: widget.user.banned, @@ -202,18 +202,20 @@ class _ChatInfoScreenState extends State { // ), OptionListTile( title: 'Pinned Messages', - tileColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + tileColor: StreamChatTheme.of(context).colorTheme.appBg, titleTextStyle: StreamChatTheme.of(context).textTheme.body, leading: Padding( padding: const EdgeInsets.symmetric(horizontal: 22.0), child: StreamSvgIcon.pin( size: 24.0, - color: - StreamChatTheme.of(context).colorTheme.black.withOpacity(0.5), + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis + .withOpacity(0.5), ), ), trailing: StreamSvgIcon.right( - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context).colorTheme.textLowEmphasis, ), onTap: () { final channel = StreamChannel.of(context).channel; @@ -261,18 +263,20 @@ class _ChatInfoScreenState extends State { ), OptionListTile( title: 'Photos & Videos', - tileColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + tileColor: StreamChatTheme.of(context).colorTheme.appBg, titleTextStyle: StreamChatTheme.of(context).textTheme.body, leading: Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: StreamSvgIcon.pictures( size: 36.0, - color: - StreamChatTheme.of(context).colorTheme.black.withOpacity(0.5), + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis + .withOpacity(0.5), ), ), trailing: StreamSvgIcon.right( - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context).colorTheme.textLowEmphasis, ), onTap: () { final channel = StreamChannel.of(context).channel; @@ -320,18 +324,20 @@ class _ChatInfoScreenState extends State { ), OptionListTile( title: 'Files', - tileColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + tileColor: StreamChatTheme.of(context).colorTheme.appBg, titleTextStyle: StreamChatTheme.of(context).textTheme.body, leading: Padding( padding: const EdgeInsets.symmetric(horizontal: 18.0), child: StreamSvgIcon.files( size: 32.0, - color: - StreamChatTheme.of(context).colorTheme.black.withOpacity(0.5), + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis + .withOpacity(0.5), ), ), trailing: StreamSvgIcon.right( - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context).colorTheme.textLowEmphasis, ), onTap: () { final channel = StreamChannel.of(context).channel; @@ -359,18 +365,20 @@ class _ChatInfoScreenState extends State { ), OptionListTile( title: 'Shared groups', - tileColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + tileColor: StreamChatTheme.of(context).colorTheme.appBg, titleTextStyle: StreamChatTheme.of(context).textTheme.body, leading: Padding( padding: const EdgeInsets.symmetric(horizontal: 22.0), child: StreamSvgIcon.iconGroup( size: 24.0, - color: - StreamChatTheme.of(context).colorTheme.black.withOpacity(0.5), + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis + .withOpacity(0.5), ), ), trailing: StreamSvgIcon.right( - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context).colorTheme.textLowEmphasis, ), onTap: () { Navigator.push( @@ -387,21 +395,21 @@ class _ChatInfoScreenState extends State { Widget _buildDeleteListTile() { return OptionListTile( title: 'Delete Conversation', - tileColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + tileColor: StreamChatTheme.of(context).colorTheme.appBg, titleTextStyle: StreamChatTheme.of(context).textTheme.body.copyWith( - color: StreamChatTheme.of(context).colorTheme.accentRed, + color: StreamChatTheme.of(context).colorTheme.accentError, ), leading: Padding( padding: const EdgeInsets.symmetric(horizontal: 22.0), child: StreamSvgIcon.delete( - color: StreamChatTheme.of(context).colorTheme.accentRed, + color: StreamChatTheme.of(context).colorTheme.accentError, size: 24.0, ), ), onTap: () { _showDeleteDialog(); }, - titleColor: StreamChatTheme.of(context).colorTheme.accentRed, + titleColor: StreamChatTheme.of(context).colorTheme.accentError, ); } @@ -413,7 +421,7 @@ class _ChatInfoScreenState extends State { question: 'Are you sure you want to delete this conversation?', cancelText: 'CANCEL', icon: StreamSvgIcon.delete( - color: StreamChatTheme.of(context).colorTheme.accentRed, + color: StreamChatTheme.of(context).colorTheme.accentError, ), ); var channel = StreamChannel.of(context).channel; @@ -437,7 +445,7 @@ class _ChatInfoScreenState extends State { style: TextStyle( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5)), ); } else { @@ -446,7 +454,7 @@ class _ChatInfoScreenState extends State { style: TextStyle( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5)), ); } @@ -466,10 +474,10 @@ class _ChatInfoScreenState extends State { ), child: Material( shape: CircleBorder(), - color: StreamChatTheme.of(context).colorTheme.accentGreen, + color: StreamChatTheme.of(context).colorTheme.accentInfo, ), ), - color: StreamChatTheme.of(context).colorTheme.white, + color: StreamChatTheme.of(context).colorTheme.barsBg, ), alternativeWidget, if (widget.user!.online) @@ -497,7 +505,7 @@ class __SharedGroupsScreenState extends State<_SharedGroupsScreen> { var chat = StreamChat.of(context); return Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + backgroundColor: StreamChatTheme.of(context).colorTheme.appBg, appBar: AppBar( brightness: Theme.of(context).brightness, elevation: 1, @@ -505,11 +513,11 @@ class __SharedGroupsScreenState extends State<_SharedGroupsScreen> { title: Text( 'Shared Groups', style: TextStyle( - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context).colorTheme.textHighEmphasis, fontSize: 16.0), ), leading: StreamBackButton(), - backgroundColor: StreamChatTheme.of(context).colorTheme.white, + backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg, ), body: StreamBuilder>( stream: chat.client.queryChannels( @@ -532,14 +540,16 @@ class __SharedGroupsScreenState extends State<_SharedGroupsScreen> { children: [ StreamSvgIcon.message( size: 136.0, - color: StreamChatTheme.of(context).colorTheme.greyGainsboro, + color: StreamChatTheme.of(context).colorTheme.disabled, ), SizedBox(height: 16.0), Text( 'No Shared Groups', style: TextStyle( fontSize: 14.0, - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis, ), ), SizedBox(height: 8.0), @@ -550,7 +560,7 @@ class __SharedGroupsScreenState extends State<_SharedGroupsScreen> { fontSize: 14.0, color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5), ), ), @@ -643,7 +653,7 @@ class __SharedGroupsScreenState extends State<_SharedGroupsScreen> { style: TextStyle( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5)), ), ) @@ -652,8 +662,10 @@ class __SharedGroupsScreenState extends State<_SharedGroupsScreen> { ), Container( height: 1.0, - color: - StreamChatTheme.of(context).colorTheme.black.withOpacity(.08), + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis + .withOpacity(.08), ), ], ); diff --git a/packages/stream_chat_v1/lib/chips_input_text_field.dart b/packages/stream_chat_v1/lib/chips_input_text_field.dart index c36e4ae..a67895e 100644 --- a/packages/stream_chat_v1/lib/chips_input_text_field.dart +++ b/packages/stream_chat_v1/lib/chips_input_text_field.dart @@ -66,7 +66,7 @@ class ChipInputTextFieldState extends State> { onTap: _pauseItemAddition ? resumeItemAddition : null, child: Material( elevation: 1, - color: StreamChatTheme.of(context).colorTheme.white, + color: StreamChatTheme.of(context).colorTheme.barsBg, child: Container( child: Padding( padding: const EdgeInsets.fromLTRB(16, 16, 16, 16), @@ -82,7 +82,7 @@ class ChipInputTextFieldState extends State> { .copyWith( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(.5)), ), ), @@ -119,7 +119,7 @@ class ChipInputTextFieldState extends State> { .copyWith( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(.5)), ), ), @@ -134,14 +134,14 @@ class ChipInputTextFieldState extends State> { ? StreamSvgIcon.user( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5), size: 24, ) : StreamSvgIcon.userAdd( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5), size: 24, ), diff --git a/packages/stream_chat_v1/lib/choose_user_page.dart b/packages/stream_chat_v1/lib/choose_user_page.dart index e7be235..f50ae55 100644 --- a/packages/stream_chat_v1/lib/choose_user_page.dart +++ b/packages/stream_chat_v1/lib/choose_user_page.dart @@ -20,7 +20,7 @@ class ChooseUserPage extends StatelessWidget { final users = defaultUsers; return Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + backgroundColor: StreamChatTheme.of(context).colorTheme.appBg, body: SafeArea( child: Column( crossAxisAlignment: CrossAxisAlignment.center, @@ -34,7 +34,7 @@ class ChooseUserPage extends StatelessWidget { child: SvgPicture.asset( 'assets/logo.svg', height: 40, - color: StreamChatTheme.of(context).colorTheme.accentBlue, + color: StreamChatTheme.of(context).colorTheme.accentPrimary, ), ), ), @@ -56,7 +56,7 @@ class ChooseUserPage extends StatelessWidget { separatorBuilder: (context, i) { return Container( height: 1, - color: StreamChatTheme.of(context).colorTheme.greyWhisper, + color: StreamChatTheme.of(context).colorTheme.borders, ); }, itemCount: users.length + 1, @@ -80,7 +80,7 @@ class ChooseUserPage extends StatelessWidget { borderRadius: BorderRadius.circular(16), color: StreamChatTheme.of(context) .colorTheme - .white, + .barsBg, ), height: 100, width: 100, @@ -94,7 +94,7 @@ class ChooseUserPage extends StatelessWidget { final client = StreamChatClient( kDefaultStreamApiKey, logLevel: Level.INFO, - )..chatPersistenceClient = chatPersistentClient; + ); await client.connectUser( user, @@ -142,13 +142,13 @@ class ChooseUserPage extends StatelessWidget { .copyWith( color: StreamChatTheme.of(context) .colorTheme - .grey, + .textLowEmphasis, ), ), trailing: StreamSvgIcon.arrowRight( color: StreamChatTheme.of(context) .colorTheme - .accentBlue, + .accentPrimary, ), ); }), @@ -158,11 +158,12 @@ class ChooseUserPage extends StatelessWidget { }, leading: CircleAvatar( child: StreamSvgIcon.settings( - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis, ), - backgroundColor: StreamChatTheme.of(context) - .colorTheme - .greyWhisper, + backgroundColor: + StreamChatTheme.of(context).colorTheme.borders, ), title: Text( 'Advanced Options', @@ -174,8 +175,9 @@ class ChooseUserPage extends StatelessWidget { .textTheme .footnote .copyWith( - color: - StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, ), ), trailing: SvgPicture.asset( diff --git a/packages/stream_chat_v1/lib/group_chat_details_screen.dart b/packages/stream_chat_v1/lib/group_chat_details_screen.dart index f4b15ef..a2f51ed 100644 --- a/packages/stream_chat_v1/lib/group_chat_details_screen.dart +++ b/packages/stream_chat_v1/lib/group_chat_details_screen.dart @@ -59,16 +59,16 @@ class _GroupChatDetailsScreenState extends State { return false; }, child: Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + backgroundColor: StreamChatTheme.of(context).colorTheme.appBg, appBar: AppBar( brightness: Theme.of(context).brightness, elevation: 1, - backgroundColor: StreamChatTheme.of(context).colorTheme.white, + backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg, leading: const StreamBackButton(), title: Text( 'Name of Group Chat', style: TextStyle( - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context).colorTheme.textHighEmphasis, fontSize: 16, ), ), @@ -83,7 +83,9 @@ class _GroupChatDetailsScreenState extends State { 'NAME', style: TextStyle( fontSize: 12, - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, ), ), SizedBox(width: 16), @@ -101,7 +103,9 @@ class _GroupChatDetailsScreenState extends State { hintText: 'Choose a group chat name', hintStyle: TextStyle( fontSize: 14, - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, ), ), ), @@ -117,8 +121,8 @@ class _GroupChatDetailsScreenState extends State { icon: StreamSvgIcon.check( size: 24, color: _isGroupNameEmpty - ? StreamChatTheme.of(context).colorTheme.grey - : StreamChatTheme.of(context).colorTheme.accentBlue, + ? StreamChatTheme.of(context).colorTheme.textLowEmphasis + : StreamChatTheme.of(context).colorTheme.accentPrimary, ), onPressed: _isGroupNameEmpty ? null @@ -188,7 +192,9 @@ class _GroupChatDetailsScreenState extends State { child: Text( '$_totalUsers ${_totalUsers > 1 ? 'Members' : 'Member'}', style: TextStyle( - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, ), ), ), @@ -201,9 +207,7 @@ class _GroupChatDetailsScreenState extends State { itemCount: _selectedUsers.length + 1, separatorBuilder: (_, __) => Container( height: 1, - color: StreamChatTheme.of(context) - .colorTheme - .greyWhisper, + color: StreamChatTheme.of(context).colorTheme.borders, ), itemBuilder: (_, index) { if (index == _selectedUsers.length) { @@ -211,7 +215,7 @@ class _GroupChatDetailsScreenState extends State { height: 1, color: StreamChatTheme.of(context) .colorTheme - .greyWhisper, + .borders, ); } final user = _selectedUsers[index]; @@ -237,7 +241,7 @@ class _GroupChatDetailsScreenState extends State { Icons.clear_rounded, color: StreamChatTheme.of(context) .colorTheme - .black, + .textHighEmphasis, ), padding: const EdgeInsets.all(0), splashRadius: 24, @@ -267,7 +271,7 @@ class _GroupChatDetailsScreenState extends State { void _showErrorAlert() { showModalBottomSheet( useRootNavigator: false, - backgroundColor: StreamChatTheme.of(context).colorTheme.white, + backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg, context: context, shape: RoundedRectangleBorder( borderRadius: BorderRadius.only( @@ -282,7 +286,7 @@ class _GroupChatDetailsScreenState extends State { height: 26.0, ), StreamSvgIcon.error( - color: StreamChatTheme.of(context).colorTheme.accentRed, + color: StreamChatTheme.of(context).colorTheme.accentError, size: 24.0, ), SizedBox( @@ -300,8 +304,10 @@ class _GroupChatDetailsScreenState extends State { height: 36.0, ), Container( - color: - StreamChatTheme.of(context).colorTheme.black.withOpacity(.08), + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis + .withOpacity(.08), height: 1.0, ), Row( @@ -316,7 +322,7 @@ class _GroupChatDetailsScreenState extends State { .copyWith( color: StreamChatTheme.of(context) .colorTheme - .accentBlue), + .accentPrimary), ), onPressed: () { Navigator.of(context).pop(); diff --git a/packages/stream_chat_v1/lib/group_info_screen.dart b/packages/stream_chat_v1/lib/group_info_screen.dart index 639175e..4193213 100644 --- a/packages/stream_chat_v1/lib/group_info_screen.dart +++ b/packages/stream_chat_v1/lib/group_info_screen.dart @@ -81,7 +81,7 @@ class _GroupInfoScreenState extends State { builder: (context, snapshot) { if (!snapshot.hasData) { return Container( - color: StreamChatTheme.of(context).colorTheme.greyGainsboro, + color: StreamChatTheme.of(context).colorTheme.disabled, child: Center(child: CircularProgressIndicator()), ); } @@ -92,12 +92,12 @@ class _GroupInfoScreenState extends State { var isOwner = userMember?.role == 'owner'; return Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + backgroundColor: StreamChatTheme.of(context).colorTheme.appBg, appBar: AppBar( brightness: Theme.of(context).brightness, elevation: 1.0, toolbarHeight: 56.0, - backgroundColor: StreamChatTheme.of(context).colorTheme.white, + backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg, leading: StreamBackButton(), title: Column( children: [ @@ -108,8 +108,9 @@ class _GroupInfoScreenState extends State { return Text( 'Loading...', style: TextStyle( - color: - StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis, fontSize: 16, ), maxLines: 1, @@ -125,7 +126,9 @@ class _GroupInfoScreenState extends State { maxFontSize: 16.0, )!, style: TextStyle( - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis, fontSize: 16, ), maxLines: 1, @@ -140,7 +143,7 @@ class _GroupInfoScreenState extends State { style: TextStyle( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5), fontSize: 12.0, ), @@ -160,7 +163,7 @@ class _GroupInfoScreenState extends State { child: StreamSvgIcon.userAdd( color: StreamChatTheme.of(context) .colorTheme - .accentBlue), + .accentPrimary), ), ), ), @@ -171,7 +174,7 @@ class _GroupInfoScreenState extends State { _buildMembers(snapshot.data!), Container( height: 8.0, - color: StreamChatTheme.of(context).colorTheme.greyGainsboro, + color: StreamChatTheme.of(context).colorTheme.disabled, ), if (isOwner) _buildNameTile(), _buildOptionListTiles(), @@ -244,7 +247,7 @@ class _GroupInfoScreenState extends State { style: TextStyle( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5)), ), ], @@ -257,7 +260,7 @@ class _GroupInfoScreenState extends State { style: TextStyle( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5)), ), ), @@ -267,13 +270,13 @@ class _GroupInfoScreenState extends State { height: 1.0, color: StreamChatTheme.of(context) .colorTheme - .greyGainsboro, + .disabled, ), ], ), ), ), - color: StreamChatTheme.of(context).colorTheme.whiteSnow, + color: StreamChatTheme.of(context).colorTheme.appBg, ); }, ), @@ -285,7 +288,7 @@ class _GroupInfoScreenState extends State { }); }, child: Material( - color: StreamChatTheme.of(context).colorTheme.whiteSnow, + color: StreamChatTheme.of(context).colorTheme.appBg, child: Container( height: 65.0, child: Column( @@ -297,8 +300,9 @@ class _GroupInfoScreenState extends State { padding: const EdgeInsets.symmetric( horizontal: 21.0, vertical: 12.0), child: StreamSvgIcon.down( - color: - StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, ), ), Expanded( @@ -311,7 +315,7 @@ class _GroupInfoScreenState extends State { style: TextStyle( color: StreamChatTheme.of(context) .colorTheme - .grey), + .textLowEmphasis), ), ], ), @@ -321,8 +325,7 @@ class _GroupInfoScreenState extends State { ), Container( height: 1.0, - color: - StreamChatTheme.of(context).colorTheme.greyGainsboro, + color: StreamChatTheme.of(context).colorTheme.disabled, ), ], ), @@ -338,7 +341,7 @@ class _GroupInfoScreenState extends State { var channelName = (channel.extraData['name'] as String?) ?? ''; return Material( - color: StreamChatTheme.of(context).colorTheme.whiteSnow, + color: StreamChatTheme.of(context).colorTheme.appBg, child: Container( height: 56.0, alignment: Alignment.center, @@ -351,7 +354,7 @@ class _GroupInfoScreenState extends State { style: StreamChatTheme.of(context).textTheme.footnote.copyWith( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5)), ), ), @@ -362,7 +365,8 @@ class _GroupInfoScreenState extends State { child: TextField( focusNode: _focusNode, controller: _nameController, - cursorColor: StreamChatTheme.of(context).colorTheme.black, + cursorColor: + StreamChatTheme.of(context).colorTheme.textHighEmphasis, decoration: InputDecoration.collapsed( hintText: 'Add a group name', hintStyle: StreamChatTheme.of(context) @@ -371,7 +375,7 @@ class _GroupInfoScreenState extends State { .copyWith( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5))), style: TextStyle( fontWeight: FontWeight.bold, @@ -401,8 +405,9 @@ class _GroupInfoScreenState extends State { padding: const EdgeInsets.only(right: 16.0, left: 8.0), child: InkWell( child: StreamSvgIcon.check( - color: - StreamChatTheme.of(context).colorTheme.accentBlue, + color: StreamChatTheme.of(context) + .colorTheme + .accentPrimary, size: 24.0, ), onTap: () { @@ -434,7 +439,7 @@ class _GroupInfoScreenState extends State { // title: 'Notifications', // leading: StreamSvgIcon.Icon_notification( // size: 24.0, - // color: StreamChatTheme.of(context).colorTheme.black.withOpacity(0.5), + // color: StreamChatTheme.of(context).colorTheme.textHighEmphasis.withOpacity(0.5), // ), // trailing: CupertinoSwitch( // value: true, @@ -448,9 +453,8 @@ class _GroupInfoScreenState extends State { mutedBool.value = snapshot.data; return OptionListTile( - tileColor: StreamChatTheme.of(context).colorTheme.whiteSnow, - separatorColor: - StreamChatTheme.of(context).colorTheme.greyGainsboro, + tileColor: StreamChatTheme.of(context).colorTheme.appBg, + separatorColor: StreamChatTheme.of(context).colorTheme.disabled, title: 'Mute group', titleTextStyle: StreamChatTheme.of(context).textTheme.body, leading: Padding( @@ -459,7 +463,7 @@ class _GroupInfoScreenState extends State { size: 24.0, color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5), ), ), @@ -486,18 +490,20 @@ class _GroupInfoScreenState extends State { }), OptionListTile( title: 'Pinned Messages', - tileColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + tileColor: StreamChatTheme.of(context).colorTheme.appBg, titleTextStyle: StreamChatTheme.of(context).textTheme.body, leading: Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: StreamSvgIcon.pin( size: 24.0, - color: - StreamChatTheme.of(context).colorTheme.black.withOpacity(0.5), + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis + .withOpacity(0.5), ), ), trailing: StreamSvgIcon.right( - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context).colorTheme.textLowEmphasis, ), onTap: () { final channel = StreamChannel.of(context).channel; @@ -544,20 +550,22 @@ class _GroupInfoScreenState extends State { }, ), OptionListTile( - tileColor: StreamChatTheme.of(context).colorTheme.whiteSnow, - separatorColor: StreamChatTheme.of(context).colorTheme.greyGainsboro, + tileColor: StreamChatTheme.of(context).colorTheme.appBg, + separatorColor: StreamChatTheme.of(context).colorTheme.disabled, title: 'Photos & Videos', titleTextStyle: StreamChatTheme.of(context).textTheme.body, leading: Padding( padding: const EdgeInsets.symmetric(horizontal: 12.0), child: StreamSvgIcon.pictures( size: 32.0, - color: - StreamChatTheme.of(context).colorTheme.black.withOpacity(0.5), + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis + .withOpacity(0.5), ), ), trailing: StreamSvgIcon.right( - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context).colorTheme.textLowEmphasis, ), onTap: () { var channel = StreamChannel.of(context).channel; @@ -604,20 +612,22 @@ class _GroupInfoScreenState extends State { }, ), OptionListTile( - tileColor: StreamChatTheme.of(context).colorTheme.whiteSnow, - separatorColor: StreamChatTheme.of(context).colorTheme.greyGainsboro, + tileColor: StreamChatTheme.of(context).colorTheme.appBg, + separatorColor: StreamChatTheme.of(context).colorTheme.disabled, title: 'Files', titleTextStyle: StreamChatTheme.of(context).textTheme.body, leading: Padding( padding: const EdgeInsets.symmetric(horizontal: 12.0), child: StreamSvgIcon.files( size: 32.0, - color: - StreamChatTheme.of(context).colorTheme.black.withOpacity(0.5), + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis + .withOpacity(0.5), ), ), trailing: StreamSvgIcon.right( - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context).colorTheme.textLowEmphasis, ), onTap: () { var channel = StreamChannel.of(context).channel; @@ -645,9 +655,8 @@ class _GroupInfoScreenState extends State { ), if (!channel.channel.isDistinct) OptionListTile( - tileColor: StreamChatTheme.of(context).colorTheme.whiteSnow, - separatorColor: - StreamChatTheme.of(context).colorTheme.greyGainsboro, + tileColor: StreamChatTheme.of(context).colorTheme.appBg, + separatorColor: StreamChatTheme.of(context).colorTheme.disabled, title: 'Leave Group', titleTextStyle: StreamChatTheme.of(context).textTheme.body, leading: Padding( @@ -656,7 +665,7 @@ class _GroupInfoScreenState extends State { size: 24.0, color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5), ), ), @@ -672,7 +681,7 @@ class _GroupInfoScreenState extends State { question: 'Are you sure you want to leave this conversation?', cancelText: 'CANCEL', icon: StreamSvgIcon.userRemove( - color: StreamChatTheme.of(context).colorTheme.accentRed, + color: StreamChatTheme.of(context).colorTheme.accentError, ), ); if (res == true) { @@ -762,7 +771,7 @@ class _GroupInfoScreenState extends State { size: 96, color: StreamChatTheme.of(context) .colorTheme - .grey, + .textLowEmphasis, ), ), Text( @@ -800,28 +809,28 @@ class _GroupInfoScreenState extends State { height: 36, child: TextField( controller: _searchController, - cursorColor: theme.colorTheme.black, + cursorColor: theme.colorTheme.textHighEmphasis, autofocus: true, decoration: InputDecoration( hintText: 'Search', hintStyle: theme.textTheme.body.copyWith( - color: theme.colorTheme.grey, + color: theme.colorTheme.textLowEmphasis, ), prefixIconConstraints: BoxConstraints.tight(Size(40, 24)), prefixIcon: StreamSvgIcon.search( - color: theme.colorTheme.black, + color: theme.colorTheme.textHighEmphasis, size: 24, ), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(24.0), borderSide: BorderSide( - color: theme.colorTheme.greyWhisper, + color: theme.colorTheme.borders, ), ), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(24.0), borderSide: BorderSide( - color: theme.colorTheme.greyWhisper, + color: theme.colorTheme.borders, )), contentPadding: const EdgeInsets.all(0), ), @@ -831,7 +840,7 @@ class _GroupInfoScreenState extends State { SizedBox(width: 16.0), IconButton( icon: StreamSvgIcon.closeSmall( - color: theme.colorTheme.grey, + color: theme.colorTheme.textLowEmphasis, ), constraints: BoxConstraints.tightFor( height: 24, @@ -849,7 +858,7 @@ class _GroupInfoScreenState extends State { void _showUserInfoModal(User? user, bool isUserAdmin) { var channel = StreamChannel.of(context).channel; - final color = StreamChatTheme.of(context).colorTheme.white; + final color = StreamChatTheme.of(context).colorTheme.barsBg; showModalBottomSheet( useRootNavigator: false, @@ -899,7 +908,9 @@ class _GroupInfoScreenState extends State { _buildModalListTile( context, StreamSvgIcon.user( - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, size: 24.0, ), 'View info', @@ -933,7 +944,9 @@ class _GroupInfoScreenState extends State { _buildModalListTile( context, StreamSvgIcon.message( - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, size: 24.0, ), 'Message', @@ -966,7 +979,7 @@ class _GroupInfoScreenState extends State { // _buildModalListTile( // context, // StreamSvgIcon.iconUserSettings( - // color: StreamChatTheme.of(context).colorTheme.grey, + // color: StreamChatTheme.of(context).colorTheme.textLowEmphasis, // size: 24.0, // ), // 'Make Owner', () { @@ -978,8 +991,8 @@ class _GroupInfoScreenState extends State { _buildModalListTile( context, StreamSvgIcon.userRemove( - color: - StreamChatTheme.of(context).colorTheme.accentRed, + color: StreamChatTheme.of(context) + .colorTheme.accentError, size: 24.0, ), 'Remove From Group', () async { @@ -996,11 +1009,15 @@ class _GroupInfoScreenState extends State { await channel.removeMembers([user.id]); } Navigator.pop(context); - }, color: StreamChatTheme.of(context).colorTheme.accentRed), + }, + color: StreamChatTheme.of(context) + .colorTheme.accentError), _buildModalListTile( context, StreamSvgIcon.closeSmall( - color: StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, size: 24.0, ), 'Cancel', () { @@ -1033,7 +1050,7 @@ class _GroupInfoScreenState extends State { style: TextStyle( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5)), ); } else { @@ -1042,7 +1059,7 @@ class _GroupInfoScreenState extends State { style: TextStyle( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5)), ); } @@ -1054,17 +1071,17 @@ class _GroupInfoScreenState extends State { Widget _buildModalListTile( BuildContext context, Widget leading, String title, VoidCallback onTap, {Color? color}) { - color ??= StreamChatTheme.of(context).colorTheme.black; + color ??= StreamChatTheme.of(context).colorTheme.textHighEmphasis; return Material( - color: StreamChatTheme.of(context).colorTheme.white, + color: StreamChatTheme.of(context).colorTheme.barsBg, child: InkWell( onTap: onTap, child: Column( children: [ Container( height: 1.0, - color: StreamChatTheme.of(context).colorTheme.greyGainsboro, + color: StreamChatTheme.of(context).colorTheme.disabled, ), Container( height: 64.0, diff --git a/packages/stream_chat_v1/lib/main.dart b/packages/stream_chat_v1/lib/main.dart index e53e8c0..e17ef4a 100644 --- a/packages/stream_chat_v1/lib/main.dart +++ b/packages/stream_chat_v1/lib/main.dart @@ -18,7 +18,7 @@ import 'routes/routes.dart'; final chatPersistentClient = StreamChatPersistenceClient( logLevel: Level.SEVERE, - connectionMode: ConnectionMode.background, + connectionMode: ConnectionMode.regular, ); void main() async { @@ -46,8 +46,8 @@ class _MyAppState extends State final client = StreamChatClient( apiKey ?? kDefaultStreamApiKey, - logLevel: Level.INFO, - )..chatPersistenceClient = chatPersistentClient; + logLevel: Level.SEVERE, + ); if (userId != null && token != null) { await client.connectUser( diff --git a/packages/stream_chat_v1/lib/new_chat_screen.dart b/packages/stream_chat_v1/lib/new_chat_screen.dart index 1d7f024..41a1ded 100644 --- a/packages/stream_chat_v1/lib/new_chat_screen.dart +++ b/packages/stream_chat_v1/lib/new_chat_screen.dart @@ -117,18 +117,16 @@ class _NewChatScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + backgroundColor: StreamChatTheme.of(context).colorTheme.appBg, appBar: AppBar( brightness: Theme.of(context).brightness, elevation: 0, - backgroundColor: StreamChatTheme.of(context).colorTheme.white, + backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg, leading: const StreamBackButton(), title: Text( 'New Chat', - style: StreamChatTheme.of(context) - .textTheme - .headlineBold - .copyWith(color: StreamChatTheme.of(context).colorTheme.black), + style: StreamChatTheme.of(context).textTheme.headlineBold.copyWith( + color: StreamChatTheme.of(context).colorTheme.textHighEmphasis), ), centerTitle: true, ), @@ -177,7 +175,7 @@ class _NewChatScreenState extends State { decoration: BoxDecoration( color: StreamChatTheme.of(context) .colorTheme - .greyGainsboro, + .disabled, borderRadius: BorderRadius.circular(12), ), padding: const EdgeInsets.only(left: 24), @@ -189,7 +187,7 @@ class _NewChatScreenState extends State { style: TextStyle( color: StreamChatTheme.of(context) .colorTheme - .black, + .textHighEmphasis, ), ), ), @@ -240,7 +238,7 @@ class _NewChatScreenState extends State { child: StreamSvgIcon.contacts( color: StreamChatTheme.of(context) .colorTheme - .accentBlue, + .accentPrimary, size: 24, ), ), @@ -279,7 +277,7 @@ class _NewChatScreenState extends State { .copyWith( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(.5))), ), ), @@ -350,7 +348,7 @@ class _NewChatScreenState extends State { color: StreamChatTheme .of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(.5)), ), ], @@ -378,7 +376,7 @@ class _NewChatScreenState extends State { fontSize: 12, color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(.5), ), ), @@ -396,7 +394,7 @@ class _NewChatScreenState extends State { Navigator.pushNamedAndRemoveUntil( context, Routes.CHANNEL_PAGE, - ModalRoute.withName(Routes.HOME), + ModalRoute.withName(Routes.CHANNEL_LIST_PAGE), arguments: ChannelPageArgs(channel: channel), ); }, diff --git a/packages/stream_chat_v1/lib/new_group_chat_screen.dart b/packages/stream_chat_v1/lib/new_group_chat_screen.dart index 0db780e..414606f 100644 --- a/packages/stream_chat_v1/lib/new_group_chat_screen.dart +++ b/packages/stream_chat_v1/lib/new_group_chat_screen.dart @@ -51,15 +51,15 @@ class _NewGroupChatScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + backgroundColor: StreamChatTheme.of(context).colorTheme.appBg, appBar: AppBar( elevation: 1, - backgroundColor: StreamChatTheme.of(context).colorTheme.white, + backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg, leading: const StreamBackButton(), title: Text( 'Add Group Members', style: TextStyle( - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context).colorTheme.textHighEmphasis, fontSize: 16, ), ), @@ -68,7 +68,7 @@ class _NewGroupChatScreenState extends State { if (_selectedUsers.isNotEmpty) IconButton( icon: StreamSvgIcon.arrowRight( - color: StreamChatTheme.of(context).colorTheme.accentBlue, + color: StreamChatTheme.of(context).colorTheme.accentPrimary, ), onPressed: () async { final updatedList = await Navigator.pushNamed( @@ -159,18 +159,18 @@ class _NewGroupChatScreenState extends State { decoration: BoxDecoration( color: StreamChatTheme.of(context) .colorTheme - .white, + .appBg, shape: BoxShape.circle, border: Border.all( color: StreamChatTheme.of(context) .colorTheme - .whiteSnow, + .appBg, ), ), child: StreamSvgIcon.close( color: StreamChatTheme.of(context) .colorTheme - .black, + .textHighEmphasis, size: 24, ), ), @@ -212,8 +212,9 @@ class _NewGroupChatScreenState extends State { ? 'Matches for \"$_userNameQuery\"' : 'On the platform', style: TextStyle( - color: - StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, ), ), ), @@ -273,7 +274,7 @@ class _NewGroupChatScreenState extends State { size: 96, color: StreamChatTheme.of(context) .colorTheme - .grey, + .textLowEmphasis, ), ), Text( @@ -284,7 +285,7 @@ class _NewGroupChatScreenState extends State { .copyWith( color: StreamChatTheme.of(context) .colorTheme - .grey, + .textLowEmphasis, ), ), ], @@ -319,7 +320,7 @@ class _HeaderDelegate extends SliverPersistentHeaderDelegate { Widget build( BuildContext context, double shrinkOffset, bool overlapsContent) { return Container( - color: StreamChatTheme.of(context).colorTheme.white, + color: StreamChatTheme.of(context).colorTheme.barsBg, child: child, ); } diff --git a/packages/stream_chat_v1/lib/pinned_messages_screen.dart b/packages/stream_chat_v1/lib/pinned_messages_screen.dart index d8f756b..11287bb 100644 --- a/packages/stream_chat_v1/lib/pinned_messages_screen.dart +++ b/packages/stream_chat_v1/lib/pinned_messages_screen.dart @@ -58,7 +58,7 @@ class _PinnedMessagesScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.white, + backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg, appBar: AppBar( brightness: Theme.of(context).brightness, elevation: 1, @@ -66,12 +66,12 @@ class _PinnedMessagesScreenState extends State { title: Text( 'Pinned Messages', style: TextStyle( - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context).colorTheme.textHighEmphasis, fontSize: 16.0, ), ), leading: StreamBackButton(), - backgroundColor: StreamChatTheme.of(context).colorTheme.white, + backgroundColor: StreamChatTheme.of(context).colorTheme.barsBg, ), body: _buildMediaGrid(), ); @@ -98,14 +98,15 @@ class _PinnedMessagesScreenState extends State { children: [ StreamSvgIcon.pin( size: 136.0, - color: StreamChatTheme.of(context).colorTheme.greyGainsboro, + color: StreamChatTheme.of(context).colorTheme.disabled, ), SizedBox(height: 16.0), Text( 'No pinned items', style: TextStyle( fontSize: 17.0, - color: StreamChatTheme.of(context).colorTheme.black, + color: + StreamChatTheme.of(context).colorTheme.textHighEmphasis, fontWeight: FontWeight.bold, ), ), @@ -119,7 +120,7 @@ class _PinnedMessagesScreenState extends State { fontSize: 14.0, color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5), ), ), @@ -130,7 +131,7 @@ class _PinnedMessagesScreenState extends State { fontWeight: FontWeight.bold, color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(0.5), ), ), @@ -176,7 +177,9 @@ class _PinnedMessagesScreenState extends State { title: Text( user.name, style: TextStyle( - color: StreamChatTheme.of(context).colorTheme.black, + color: StreamChatTheme.of(context) + .colorTheme + .textHighEmphasis, fontWeight: FontWeight.bold), ), subtitle: Text( diff --git a/packages/stream_chat_v1/lib/search_text_field.dart b/packages/stream_chat_v1/lib/search_text_field.dart index c3850c2..7641a7b 100644 --- a/packages/stream_chat_v1/lib/search_text_field.dart +++ b/packages/stream_chat_v1/lib/search_text_field.dart @@ -22,9 +22,9 @@ class SearchTextField extends StatelessWidget { return Container( height: 36, decoration: BoxDecoration( - color: StreamChatTheme.of(context).colorTheme.white, + color: StreamChatTheme.of(context).colorTheme.barsBg, border: Border.all( - color: StreamChatTheme.of(context).colorTheme.greyWhisper, + color: StreamChatTheme.of(context).colorTheme.borders, ), borderRadius: BorderRadius.circular(24), ), @@ -48,7 +48,8 @@ class SearchTextField extends StatelessWidget { right: 8, ), child: StreamSvgIcon.search( - color: StreamChatTheme.of(context).colorTheme.black, + color: + StreamChatTheme.of(context).colorTheme.textHighEmphasis, size: 24, ), ), @@ -56,7 +57,7 @@ class SearchTextField extends StatelessWidget { hintStyle: StreamChatTheme.of(context).textTheme.body.copyWith( color: StreamChatTheme.of(context) .colorTheme - .black + .textHighEmphasis .withOpacity(.5)), contentPadding: const EdgeInsets.all(0), border: OutlineInputBorder( diff --git a/packages/stream_chat_v1/lib/stream_version.dart b/packages/stream_chat_v1/lib/stream_version.dart index 7401813..89004f7 100644 --- a/packages/stream_chat_v1/lib/stream_version.dart +++ b/packages/stream_chat_v1/lib/stream_version.dart @@ -29,7 +29,7 @@ class StreamVersion extends StatelessWidget { 'Stream SDK v $streamChatDep', style: TextStyle( fontSize: 14, - color: StreamChatTheme.of(context).colorTheme.greyGainsboro, + color: StreamChatTheme.of(context).colorTheme.disabled, ), ); }, diff --git a/packages/stream_chat_v1/lib/thread_page.dart b/packages/stream_chat_v1/lib/thread_page.dart index b9799c7..d1fbd3c 100644 --- a/packages/stream_chat_v1/lib/thread_page.dart +++ b/packages/stream_chat_v1/lib/thread_page.dart @@ -37,7 +37,7 @@ class _ThreadPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow, + backgroundColor: StreamChatTheme.of(context).colorTheme.appBg, appBar: ThreadHeader( parent: widget.parent!, ), diff --git a/packages/stream_chat_v1/lib/user_mentions_page.dart b/packages/stream_chat_v1/lib/user_mentions_page.dart index 837aa19..d02bd1c 100644 --- a/packages/stream_chat_v1/lib/user_mentions_page.dart +++ b/packages/stream_chat_v1/lib/user_mentions_page.dart @@ -40,9 +40,8 @@ class UserMentionsPage extends StatelessWidget { padding: const EdgeInsets.all(24), child: StreamSvgIcon.mentions( size: 96, - color: StreamChatTheme.of(context) - .colorTheme - .greyGainsboro, + color: + StreamChatTheme.of(context).colorTheme.disabled, ), ), Text( @@ -51,8 +50,9 @@ class UserMentionsPage extends StatelessWidget { .textTheme .body .copyWith( - color: - StreamChatTheme.of(context).colorTheme.grey, + color: StreamChatTheme.of(context) + .colorTheme + .textLowEmphasis, ), ), ],