Fix gray canvas color & chatters grammar (#90)

This commit is contained in:
Tommy Chow 2022-05-26 20:33:13 -04:00
parent b53e47b023
commit 4989c844e2
2 changed files with 13 additions and 13 deletions

View file

@ -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',

View file

@ -57,8 +57,8 @@ class _ChattersListState extends State<ChattersList> {
'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<ChattersList> {
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<ChattersList> {
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<ChattersList> {
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<ChattersList> {
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<ChattersList> {
),
),
),
...chatDetailStore.filteredUsers.expandIndexed(
...chatDetailsStore.filteredUsers.expandIndexed(
(index, users) => [
if (users.isNotEmpty) ...[
SliverPadding(
@ -180,7 +180,7 @@ class _ChattersListState extends State<ChattersList> {
child: Observer(
builder: (context) => AnimatedSwitcher(
duration: const Duration(milliseconds: 200),
child: chatDetailStore.showJumpButton ? ScrollToTopButton(scrollController: _scrollController) : null,
child: chatDetailsStore.showJumpButton ? ScrollToTopButton(scrollController: _scrollController) : null,
),
),
),