diff --git a/lib/main.dart b/lib/main.dart index 75794654..575a10ef 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -86,7 +86,7 @@ class MyApp extends StatelessWidget { const purple = Color(0xff9146ff); final lightTheme = ThemeData( - scaffoldBackgroundColor: Colors.white, + canvasColor: Colors.white, splashFactory: Platform.isIOS ? NoSplash.splashFactory : null, fontFamily: 'Inter', appBarTheme: const AppBarTheme( @@ -112,7 +112,7 @@ class MyApp extends StatelessWidget { ); final darkTheme = ThemeData( - scaffoldBackgroundColor: gray, + canvasColor: gray, brightness: Brightness.dark, splashFactory: Platform.isIOS ? NoSplash.splashFactory : null, fontFamily: 'Inter', diff --git a/lib/screens/channel/chat/details/chat_users_list.dart b/lib/screens/channel/chat/details/chat_users_list.dart index 9b888d6e..6c652881 100644 --- a/lib/screens/channel/chat/details/chat_users_list.dart +++ b/lib/screens/channel/chat/details/chat_users_list.dart @@ -57,8 +57,8 @@ class _ChattersListState extends State { 'Viewers', ]; - final chatDetailStore = widget.chatDetails; - chatDetailStore.updateChatters(widget.userLogin); + final chatDetailsStore = widget.chatDetails; + chatDetailsStore.updateChatters(widget.userLogin); return Column( children: [ @@ -67,7 +67,7 @@ class _ChattersListState extends State { child: TextField( controller: _textController, autocorrect: false, - onChanged: (text) => chatDetailStore.filterText = text, + onChanged: (text) => chatDetailsStore.filterText = text, decoration: InputDecoration( isDense: true, labelText: 'Filter chatters', @@ -76,7 +76,7 @@ class _ChattersListState extends State { tooltip: 'Clear Filter', onPressed: () { FocusScope.of(context).unfocus(); - chatDetailStore.filterText = ''; + chatDetailsStore.filterText = ''; _textController.clear(); }, icon: const Icon(Icons.clear), @@ -91,27 +91,27 @@ class _ChattersListState extends State { child: RefreshIndicator( onRefresh: () async { HapticFeedback.lightImpact(); - await chatDetailStore.updateChatters(widget.userLogin); + await chatDetailsStore.updateChatters(widget.userLogin); }, child: Stack( alignment: AlignmentDirectional.bottomCenter, children: [ Observer( builder: (context) { - if (chatDetailStore.error != null) { + if (chatDetailsStore.error != null) { return Column( mainAxisAlignment: MainAxisAlignment.center, children: [ const Text('Failed to get chatters'), TextButton( - onPressed: () => chatDetailStore.updateChatters(widget.userLogin), + onPressed: () => chatDetailsStore.updateChatters(widget.userLogin), child: const Text('Try Again'), ) ], ); } - if (chatDetailStore.chatUsers == null) { + if (chatDetailsStore.chatUsers == null) { return const LoadingIndicator(subtitle: Text('Getting chatters...')); } @@ -122,7 +122,7 @@ class _ChattersListState extends State { padding: const EdgeInsets.only(left: 10.0, right: 10.0, top: 20.0), sliver: SliverToBoxAdapter( child: Text( - '${NumberFormat().format(chatDetailStore.chatUsers?.chatterCount)} Chatters', + '${NumberFormat().format(chatDetailsStore.chatUsers?.chatterCount)} ${chatDetailsStore.chatUsers?.chatterCount == 1 ? 'Chatter' : 'Chatters'}', style: const TextStyle( fontWeight: FontWeight.bold, fontSize: 18.0, @@ -130,7 +130,7 @@ class _ChattersListState extends State { ), ), ), - ...chatDetailStore.filteredUsers.expandIndexed( + ...chatDetailsStore.filteredUsers.expandIndexed( (index, users) => [ if (users.isNotEmpty) ...[ SliverPadding( @@ -180,7 +180,7 @@ class _ChattersListState extends State { child: Observer( builder: (context) => AnimatedSwitcher( duration: const Duration(milliseconds: 200), - child: chatDetailStore.showJumpButton ? ScrollToTopButton(scrollController: _scrollController) : null, + child: chatDetailsStore.showJumpButton ? ScrollToTopButton(scrollController: _scrollController) : null, ), ), ),