From 21069ce8670cea647fbe88c030c863322a4ff994 Mon Sep 17 00:00:00 2001 From: Tommy Chow Date: Wed, 29 Dec 2021 18:11:39 -0500 Subject: [PATCH] Increase chat details height, tweak headers --- lib/core/auth/auth_store.dart | 2 +- lib/screens/channel/chat/chat_bottom_bar.dart | 1 + lib/screens/channel/chat/details/chat_details.dart | 3 ++- lib/widgets/section_header.dart | 7 ++++++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/core/auth/auth_store.dart b/lib/core/auth/auth_store.dart index 335a7fbb..f72afdb2 100644 --- a/lib/core/auth/auth_store.dart +++ b/lib/core/auth/auth_store.dart @@ -95,7 +95,7 @@ abstract class _AuthBase with Store { await _storage.write(key: 'USER_TOKEN', value: _token); // Initialize the user with the new token. - user.init(headers: headersTwitch); + await user.init(headers: headersTwitch); // Set the login status to logged in. _isLoggedIn = true; diff --git a/lib/screens/channel/chat/chat_bottom_bar.dart b/lib/screens/channel/chat/chat_bottom_bar.dart index 1816391a..748d5f54 100644 --- a/lib/screens/channel/chat/chat_bottom_bar.dart +++ b/lib/screens/channel/chat/chat_bottom_bar.dart @@ -14,6 +14,7 @@ class ChatBottomBar extends StatelessWidget { IconButton( icon: Icon(Icons.adaptive.more), onPressed: () => showModalBottomSheet( + isScrollControlled: true, context: context, builder: (_) => ChatDetails( chatDetails: chatStore.chatDetailsStore, diff --git a/lib/screens/channel/chat/details/chat_details.dart b/lib/screens/channel/chat/details/chat_details.dart index 602df3bc..6e7a836b 100644 --- a/lib/screens/channel/chat/details/chat_details.dart +++ b/lib/screens/channel/chat/details/chat_details.dart @@ -17,7 +17,8 @@ class ChatDetails extends StatelessWidget { @override Widget build(BuildContext context) { return SafeArea( - child: Center( + child: SizedBox( + height: MediaQuery.of(context).size.height * 0.8, child: Observer( builder: (_) { return Column( diff --git a/lib/widgets/section_header.dart b/lib/widgets/section_header.dart index 6e7c77b0..e2f90ec9 100644 --- a/lib/widgets/section_header.dart +++ b/lib/widgets/section_header.dart @@ -3,11 +3,13 @@ import 'package:flutter/material.dart'; class SectionHeader extends StatelessWidget { final String text; final EdgeInsets padding; + final double fontSize; const SectionHeader( this.text, { Key? key, this.padding = const EdgeInsets.fromLTRB(10.0, 30.0, 10.0, 5.0), + this.fontSize = 18.0, }) : super(key: key); @override @@ -16,7 +18,10 @@ class SectionHeader extends StatelessWidget { padding: padding, child: Text( text, - style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + style: TextStyle( + fontSize: fontSize, + fontWeight: FontWeight.bold, + ), ), ); }