diff --git a/lib/src/core/resources/themes.dart b/lib/src/core/resources/themes.dart index f72b0b7b..682b9365 100644 --- a/lib/src/core/resources/themes.dart +++ b/lib/src/core/resources/themes.dart @@ -13,13 +13,23 @@ class Themes { ), textTheme: const TextTheme( bodyLarge: TextStyle(color: Colors.white), - bodyMedium: TextStyle(color: Color.fromARGB(255, 75, 75, 75)), + bodyMedium: TextStyle(color: Colors.white), ), primaryIconTheme: const IconThemeData(color: Colors.white), inputDecorationTheme: InputDecorationTheme( border: OutlineInputBorder( borderSide: BorderSide(color: Colors.grey[600]!), ), + hintStyle: const TextStyle( + color: Color.fromARGB(255, 75, 75, 75), + fontSize: 16, + ), + helperStyle: const TextStyle( + color: Colors.white, + ), + labelStyle: TextStyle( + color: Colors.deepPurpleAccent[200], + ), enabledBorder: OutlineInputBorder( borderSide: BorderSide(color: Colors.grey[600]!), ), @@ -27,6 +37,38 @@ class Themes { borderSide: BorderSide(color: Colors.deepPurpleAccent[200]!), ), ), + tabBarTheme: TabBarTheme( + labelColor: Colors.deepPurpleAccent[200], + unselectedLabelColor: Colors.white, + dividerColor: Colors.transparent, + ), + appBarTheme: const AppBarTheme( + titleTextStyle: TextStyle( + color: Colors.white, + fontSize: 18, + ), + iconTheme: IconThemeData( + color: Colors.white, + ), + ), + dividerTheme: const DividerThemeData( + thickness: 2, + indent: 0, + endIndent: 0, + color: Color(0xFF18181b), + ), + textButtonTheme: const TextButtonThemeData( + style: ButtonStyle( + textStyle: WidgetStatePropertyAll( + TextStyle( + fontSize: 12, + ), + ), + foregroundColor: WidgetStatePropertyAll( + Colors.white + ), + ), + ), switchTheme: SwitchThemeData( thumbColor: WidgetStateProperty.resolveWith( (Set states) { @@ -74,13 +116,61 @@ class Themes { ), textTheme: const TextTheme( bodyLarge: TextStyle(color: Colors.black), - bodyMedium: TextStyle(color: Color.fromARGB(255, 75, 75, 75)), + bodyMedium: TextStyle(color: Colors.black), ), primaryIconTheme: const IconThemeData(color: Colors.black), - inputDecorationTheme: const InputDecorationTheme( - border: OutlineInputBorder( + inputDecorationTheme: InputDecorationTheme( + border: const OutlineInputBorder( borderSide: BorderSide(color: Colors.black), ), + helperStyle: const TextStyle( + color: Color.fromARGB(255, 28, 25, 25), + ), + hintStyle: const TextStyle( + color: Color.fromARGB(255, 75, 75, 75), + fontSize: 16, + ), + labelStyle: TextStyle( + color: Colors.deepPurpleAccent[200], + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey[600]!), + ), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.deepPurpleAccent[200]!), + ), + ), + tabBarTheme: TabBarTheme( + labelColor: Colors.deepPurpleAccent[200], + unselectedLabelColor: Colors.black, + dividerColor: Colors.transparent, + ), + appBarTheme: const AppBarTheme( + titleTextStyle: TextStyle( + color: Colors.black, + fontSize: 18, + ), + iconTheme: IconThemeData( + color: Colors.black, + ), + ), + dividerTheme: const DividerThemeData( + thickness: 2, + indent: 0, + endIndent: 0, + color: Color(0xFFefeff1), + ), + textButtonTheme: const TextButtonThemeData( + style: ButtonStyle( + textStyle: WidgetStatePropertyAll( + TextStyle( + fontSize: 12, + ), + ), + foregroundColor: WidgetStatePropertyAll( + Colors.white + ), + ), ), switchTheme: SwitchThemeData( thumbColor: WidgetStateProperty.resolveWith( diff --git a/lib/src/presentation/views/home_view.dart b/lib/src/presentation/views/home_view.dart index a6b9c680..c3fba3da 100644 --- a/lib/src/presentation/views/home_view.dart +++ b/lib/src/presentation/views/home_view.dart @@ -71,8 +71,7 @@ class HomeView extends GetView { child: SplitView( controller: controller.splitViewController, gripColor: context.theme.colorScheme.secondary, - gripColorActive: - context.theme.colorScheme.secondary, + gripColorActive: context.theme.colorScheme.secondary, gripSize: 8, viewMode: context.isPortrait ? SplitViewMode.Vertical @@ -204,13 +203,10 @@ class HomeView extends GetView { () => TabBar( controller: controller.tabController, isScrollable: true, - labelColor: Theme.of(context).colorScheme.tertiary, - unselectedLabelColor: Theme.of(context).textTheme.bodyLarge!.color, indicatorColor: Theme.of(context).colorScheme.tertiary, labelPadding: const EdgeInsets.symmetric(horizontal: 30), indicatorSize: TabBarIndicatorSize.tab, indicatorWeight: 2, - dividerColor: Colors.transparent, onTap: (index) { controller.tabIndex.value = index; }, @@ -288,16 +284,9 @@ class HomeView extends GetView { controller.isPickingEmote.value = false; }, textInputAction: TextInputAction.send, - style: Theme.of(context).textTheme.bodyLarge, maxLines: 1, decoration: InputDecoration( border: InputBorder.none, - hintStyle: TextStyle( - color: Theme.of(context) - .textTheme - .bodyLarge! - .backgroundColor, - fontSize: 16), hintText: controller.settings.value.generalSettings! .displayViewerCount ? '${Get.find().twitchStreamInfos.value.viewerCount} viewers' @@ -451,7 +440,7 @@ class HomeView extends GetView { child: InkWell( onTap: () async { controller.displayDashboard.value = - !controller.displayDashboard.value; + !controller.displayDashboard.value; }, child: Icon( Icons.dashboard_rounded, @@ -546,10 +535,10 @@ class HomeView extends GetView { (int index) => Tab( height: 30, child: Text( - controller.channels[index].chatGroup.channels - .map((e) => e.channel) - .join(", "), - style: Theme.of(context).textTheme.bodyLarge), + controller.channels[index].chatGroup.channels + .map((e) => e.channel) + .join(", "), + ), ), ), ); diff --git a/lib/src/presentation/views/login_view.dart b/lib/src/presentation/views/login_view.dart index b611def2..c10b7084 100644 --- a/lib/src/presentation/views/login_view.dart +++ b/lib/src/presentation/views/login_view.dart @@ -70,7 +70,6 @@ class LoginView extends GetView { child: Obx( () => Text( controller.loadingMessage.value, - style: Theme.of(context).textTheme.bodyLarge, ), ), ), diff --git a/lib/src/presentation/views/settings_view.dart b/lib/src/presentation/views/settings_view.dart index d23b30f3..5b98217d 100644 --- a/lib/src/presentation/views/settings_view.dart +++ b/lib/src/presentation/views/settings_view.dart @@ -36,9 +36,8 @@ class SettingsView extends GetView { () => Scaffold( appBar: AppBar( leading: IconButton( - icon: Icon( + icon: const Icon( Icons.arrow_back, - color: Theme.of(context).textTheme.bodyLarge!.color, ), onPressed: () => Get.back(), ), @@ -55,7 +54,6 @@ class SettingsView extends GetView { } }, style: TextButton.styleFrom( - textStyle: const TextStyle(fontSize: 12), backgroundColor: controller.homeViewController.twitchData != null ? Colors.red @@ -71,11 +69,8 @@ class SettingsView extends GetView { ), ], backgroundColor: Theme.of(context).colorScheme.secondary, - title: Text( + title: const Text( "Settings", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), centerTitle: false, ), @@ -88,12 +83,8 @@ class SettingsView extends GetView { const EdgeInsets.only(top: 8, left: 10, right: 10, bottom: 8), children: [ Subscription(controller: controller), - Divider( + const Divider( height: 20, - thickness: 2, - indent: 0, - endIndent: 0, - color: Theme.of(context).colorScheme.secondary, ), chatSettings(context, width), Divider( @@ -104,20 +95,12 @@ class SettingsView extends GetView { color: Theme.of(context).colorScheme.secondary, ), connectionsSettings(context, width), - Divider( + const Divider( height: 20, - thickness: 2, - indent: 0, - endIndent: 0, - color: Theme.of(context).colorScheme.secondary, ), generalSettings(context, width), - Divider( + const Divider( height: 20, - thickness: 2, - indent: 0, - endIndent: 0, - color: Theme.of(context).colorScheme.secondary, ), contactSettings(context, width), Container( @@ -162,10 +145,9 @@ class SettingsView extends GetView { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "FFZ, BTTV & 7TV emotes", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -186,17 +168,13 @@ class SettingsView extends GetView { children: [ Text( "text_size".tr, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - fontSize: 18), + style: const TextStyle(fontSize: 18), ), Text( controller.homeViewController.settings.value.textSize! .ceil() .toString(), - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - fontSize: 18)), + style: const TextStyle(fontSize: 18)), Slider( onChanged: (value) { controller.homeViewController.settings.value = @@ -219,9 +197,7 @@ class SettingsView extends GetView { children: [ Text( "show_timestamp".tr, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - fontSize: 18), + style: const TextStyle(fontSize: 18), ), Switch( onChanged: (value) { @@ -238,11 +214,9 @@ class SettingsView extends GetView { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Hide deleted messages", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - fontSize: 18), + style: TextStyle(fontSize: 18), ), Switch( onChanged: (value) { @@ -346,8 +320,7 @@ class SettingsView extends GetView { children: [ Text( "dark_mode".tr, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, + style: const TextStyle( fontSize: 18, ), ), @@ -376,8 +349,7 @@ class SettingsView extends GetView { Expanded( child: Text( "prevent_speaker".tr, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, + style: const TextStyle( fontSize: 18, ), ), @@ -401,11 +373,10 @@ class SettingsView extends GetView { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Expanded( + const Expanded( child: Text( "Display viewer count", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -431,8 +402,7 @@ class SettingsView extends GetView { children: [ Text( "language".tr, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, + style: const TextStyle( fontSize: 18, ), ), @@ -509,10 +479,9 @@ class SettingsView extends GetView { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "OBS", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -682,8 +651,7 @@ class SettingsView extends GetView { padding: const EdgeInsets.only(left: 10), child: Text( title, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, + style: const TextStyle( fontSize: 18, ), ), diff --git a/lib/src/presentation/widgets/chats/chat_message/shared/author_name.dart b/lib/src/presentation/widgets/chats/chat_message/shared/author_name.dart index db7603aa..39c591a2 100644 --- a/lib/src/presentation/widgets/chats/chat_message/shared/author_name.dart +++ b/lib/src/presentation/widgets/chats/chat_message/shared/author_name.dart @@ -21,8 +21,8 @@ class AuthorName extends StatelessWidget { @override Widget build(BuildContext context) { - return RichText( - text: TextSpan( + return Text.rich( + TextSpan( text: username != displayName.toLowerCase() ? username : displayName, style: TextStyle( color: Color(int.parse(color.replaceAll('#', '0xff'))), diff --git a/lib/src/presentation/widgets/chats/chat_message/shared/word.dart b/lib/src/presentation/widgets/chats/chat_message/shared/word.dart index b7c910cb..c79a05a1 100644 --- a/lib/src/presentation/widgets/chats/chat_message/shared/word.dart +++ b/lib/src/presentation/widgets/chats/chat_message/shared/word.dart @@ -31,8 +31,8 @@ class Word extends StatelessWidget { fontStyle: isAction ? FontStyle.italic : FontStyle.normal, ), ) - : RichText( - text: TextSpan( + : Text.rich( + TextSpan( text: "$word ", style: TextStyle( color: Colors.lightBlue, diff --git a/lib/src/presentation/widgets/chats/chat_message/twitch/moderation_bottom_sheet.dart b/lib/src/presentation/widgets/chats/chat_message/twitch/moderation_bottom_sheet.dart index 304c861f..39532730 100644 --- a/lib/src/presentation/widgets/chats/chat_message/twitch/moderation_bottom_sheet.dart +++ b/lib/src/presentation/widgets/chats/chat_message/twitch/moderation_bottom_sheet.dart @@ -245,7 +245,6 @@ class ModerationBottomSheet extends StatelessWidget { decoration: const InputDecoration( enabledBorder: InputBorder.none, focusedBorder: InputBorder.none, - hintStyle: TextStyle(color: Colors.grey, fontSize: 16), hintText: 'Custom duration (s)', isDense: true, contentPadding: EdgeInsets.only(left: 5), diff --git a/lib/src/presentation/widgets/dashboard.dart b/lib/src/presentation/widgets/dashboard.dart index fe9004e1..e5be8163 100644 --- a/lib/src/presentation/widgets/dashboard.dart +++ b/lib/src/presentation/widgets/dashboard.dart @@ -128,7 +128,6 @@ class Dashboard extends GetView { alignment: Alignment.center, child: TextButton( style: TextButton.styleFrom( - textStyle: const TextStyle(fontSize: 12), backgroundColor: event.color, ), onPressed: () { diff --git a/lib/src/presentation/widgets/emote_picker_view.dart b/lib/src/presentation/widgets/emote_picker_view.dart index 4130a34d..275e3d7a 100644 --- a/lib/src/presentation/widgets/emote_picker_view.dart +++ b/lib/src/presentation/widgets/emote_picker_view.dart @@ -47,7 +47,6 @@ class EmotePickerView extends GetView { size: 20, ), border: InputBorder.none, - hintStyle: TextStyle(color: Colors.grey, fontSize: 16), hintText: 'Emote name', isDense: true, contentPadding: EdgeInsets.only(left: 5), diff --git a/lib/src/presentation/widgets/poll.dart b/lib/src/presentation/widgets/poll.dart index 48cc0414..977d576a 100644 --- a/lib/src/presentation/widgets/poll.dart +++ b/lib/src/presentation/widgets/poll.dart @@ -11,15 +11,12 @@ Widget poll( TwitchPoll poll, ) { if (poll.status == PollStatus.empty) { - return Row( + return const Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( "No poll running", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), ], ); @@ -28,10 +25,9 @@ Widget poll( return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( + const Text( "Poll", style: TextStyle( - color: Theme.of(Get.context!).textTheme.bodyLarge!.color, fontSize: 16, fontWeight: FontWeight.bold, ), @@ -56,8 +52,7 @@ Widget poll( children: [ Text( choice.title, - style: TextStyle( - color: Theme.of(Get.context!).textTheme.bodyLarge!.color, + style: const TextStyle( fontSize: 14, fontWeight: FontWeight.bold, ), @@ -94,7 +89,6 @@ Widget poll( children: [ TextButton( style: TextButton.styleFrom( - textStyle: const TextStyle(fontSize: 12), backgroundColor: Theme.of(context).colorScheme.tertiaryContainer, ), @@ -110,7 +104,6 @@ Widget poll( ), TextButton( style: TextButton.styleFrom( - textStyle: const TextStyle(fontSize: 12), backgroundColor: Colors.green, ), onPressed: () { diff --git a/lib/src/presentation/widgets/prediction.dart b/lib/src/presentation/widgets/prediction.dart index 45923d93..c8950181 100644 --- a/lib/src/presentation/widgets/prediction.dart +++ b/lib/src/presentation/widgets/prediction.dart @@ -12,14 +12,13 @@ Widget prediction( TwitchPrediction prediction, ) { if (prediction.status == PredictionStatus.empty) { - return Row( + return const Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( "No prediction running", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, ), ), ], @@ -28,10 +27,9 @@ Widget prediction( return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( + const Text( "Prediction", style: TextStyle( - color: Theme.of(Get.context!).textTheme.bodyLarge!.color, fontSize: 16, fontWeight: FontWeight.bold, ), @@ -120,7 +118,6 @@ Widget prediction( children: [ TextButton( style: TextButton.styleFrom( - textStyle: const TextStyle(fontSize: 12), backgroundColor: Theme.of(context).colorScheme.tertiaryContainer, ), @@ -136,7 +133,6 @@ Widget prediction( ), TextButton( style: TextButton.styleFrom( - textStyle: const TextStyle(fontSize: 12), backgroundColor: Colors.green, ), onPressed: () { diff --git a/lib/src/presentation/widgets/settings/chat_events.dart b/lib/src/presentation/widgets/settings/chat_events.dart index 8ed786b0..f4dd0069 100644 --- a/lib/src/presentation/widgets/settings/chat_events.dart +++ b/lib/src/presentation/widgets/settings/chat_events.dart @@ -26,11 +26,9 @@ class ChatEvents extends StatelessWidget { ), actions: const [], backgroundColor: Theme.of(context).colorScheme.secondary, - title: Text( + title: const Text( "Chat events", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), + style: TextStyle(), ), centerTitle: false, ), @@ -63,10 +61,9 @@ class ChatEvents extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "First time chatter", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -90,12 +87,8 @@ class ChatEvents extends StatelessWidget { ), ], ), - Divider( + const Divider( height: 20, - thickness: 2, - indent: 0, - endIndent: 0, - color: Theme.of(context).colorScheme.secondary, ), Column( children: [ @@ -115,10 +108,9 @@ class ChatEvents extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Subscriptions", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -142,12 +134,8 @@ class ChatEvents extends StatelessWidget { ), ], ), - Divider( + const Divider( height: 20, - thickness: 2, - indent: 0, - endIndent: 0, - color: Theme.of(context).colorScheme.secondary, ), Column( children: [ @@ -167,10 +155,9 @@ class ChatEvents extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Bits donations", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -194,12 +181,8 @@ class ChatEvents extends StatelessWidget { ), ], ), - Divider( + const Divider( height: 20, - thickness: 2, - indent: 0, - endIndent: 0, - color: Theme.of(context).colorScheme.secondary, ), Column( children: [ @@ -219,10 +202,9 @@ class ChatEvents extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Announcements", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -246,12 +228,8 @@ class ChatEvents extends StatelessWidget { ), ], ), - Divider( + const Divider( height: 20, - thickness: 2, - indent: 0, - endIndent: 0, - color: Theme.of(context).colorScheme.secondary, ), Column( children: [ @@ -271,10 +249,9 @@ class ChatEvents extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Incoming raids", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -298,12 +275,8 @@ class ChatEvents extends StatelessWidget { ), ], ), - Divider( + const Divider( height: 20, - thickness: 2, - indent: 0, - endIndent: 0, - color: Theme.of(context).colorScheme.secondary, ), Column( children: [ @@ -323,10 +296,9 @@ class ChatEvents extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Channelpoint redemptions", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), diff --git a/lib/src/presentation/widgets/settings/chats_joined.dart b/lib/src/presentation/widgets/settings/chats_joined.dart index f8adae7d..4683d296 100644 --- a/lib/src/presentation/widgets/settings/chats_joined.dart +++ b/lib/src/presentation/widgets/settings/chats_joined.dart @@ -25,11 +25,9 @@ class ChatsJoined extends GetView { ), actions: const [], backgroundColor: Theme.of(context).colorScheme.secondary, - title: Text( + title: const Text( "Chats joined", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), + style: TextStyle(), ), centerTitle: false, ), @@ -42,20 +40,36 @@ class ChatsJoined extends GetView { Container( color: Theme.of(context).colorScheme.secondary, padding: const EdgeInsets.only( - left: 20, right: 20, bottom: 10, top: 10), - margin: const EdgeInsets.only(bottom: 5, top: 5), + left: 20, + right: 20, + bottom: 10, + top: 10, + ), + margin: const EdgeInsets.only( + bottom: 5, + top: 5, + ), child: InkWell( onTap: () {}, child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, children: [ + const Image( + width: 18, + height: 18, + image: AssetImage( + "lib/assets/twitch/twitch_logo.png", + ), + filterQuality: FilterQuality.high, + ), + const SizedBox( + width: 8, + ), Text( controller.homeViewController.twitchData?.twitchUser - .login ?? + .displayName ?? '', - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, + style: const TextStyle( fontSize: 20, ), ), @@ -402,21 +416,9 @@ class ChatsJoined extends GetView { }, decoration: InputDecoration( helperText: _getHelperText(selectedPlatform.value), - helperStyle: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), isDense: true, contentPadding: const EdgeInsets.symmetric(horizontal: 8, vertical: 12), - enabledBorder: - Theme.of(context).inputDecorationTheme.border, - hintStyle: TextStyle( - color: Theme.of(context).textTheme.bodyMedium!.color, - fontSize: 16, - ), - labelStyle: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), hintText: _getHintText(selectedPlatform.value), labelText: _getHintText(selectedPlatform.value), ), diff --git a/lib/src/presentation/widgets/settings/dashboard_settings_view.dart b/lib/src/presentation/widgets/settings/dashboard_settings_view.dart index 93579195..deaec37a 100644 --- a/lib/src/presentation/widgets/settings/dashboard_settings_view.dart +++ b/lib/src/presentation/widgets/settings/dashboard_settings_view.dart @@ -46,11 +46,8 @@ class DashboardSettingsView extends GetView { ), ], backgroundColor: Theme.of(context).colorScheme.secondary, - title: Text( + title: const Text( "Dashboard events", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), centerTitle: false, ), @@ -154,9 +151,6 @@ class DashboardSettingsView extends GetView { title: "New event".tr, cancel: null, confirm: Container(), - titleStyle: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), backgroundColor: Theme.of(context).colorScheme.surface, buttonColor: const Color(0xFF9147ff), cancelTextColor: const Color(0xFF9147ff), @@ -201,9 +195,6 @@ Widget _addDialog(context, DashboardController dashboardController) { const EdgeInsets.symmetric(horizontal: 8, vertical: 7), hintText: 'Event title', labelText: 'Event title', - labelStyle: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), validator: (value) { if (value == null || value.isEmpty) { @@ -295,9 +286,6 @@ Widget _addDialog(context, DashboardController dashboardController) { const EdgeInsets.symmetric(horizontal: 8, vertical: 7), hintText: 'Your message', labelText: 'Your message', - labelStyle: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), validator: (value) { if (value == null || value.isEmpty) { diff --git a/lib/src/presentation/widgets/settings/dialogs/in_app_purchase_dialog.dart b/lib/src/presentation/widgets/settings/dialogs/in_app_purchase_dialog.dart index bddbeec5..9c5b4d63 100644 --- a/lib/src/presentation/widgets/settings/dialogs/in_app_purchase_dialog.dart +++ b/lib/src/presentation/widgets/settings/dialogs/in_app_purchase_dialog.dart @@ -54,10 +54,10 @@ Widget inAppPurchaseDialog( Radius.circular(8), ), ), - child: Column( + child: const Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Text( + Text( 'StreamElements', style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold), @@ -65,19 +65,17 @@ Widget inAppPurchaseDialog( Wrap( crossAxisAlignment: WrapCrossAlignment.center, children: [ - const Icon( + Icon( Icons.check_circle_outline_rounded, size: 18, color: Colors.green, ), - const SizedBox( + SizedBox( width: 4, ), Text( 'Events list view', style: TextStyle( - color: - Theme.of(context).textTheme.bodyLarge!.color, fontSize: 13), ) ], @@ -85,40 +83,38 @@ Widget inAppPurchaseDialog( Wrap( crossAxisAlignment: WrapCrossAlignment.center, children: [ - const Icon( + Icon( Icons.check_circle_outline_rounded, size: 18, color: Colors.green, ), - const SizedBox( + SizedBox( width: 4, ), Text( 'Media request control (no audio)', style: TextStyle( - color: - Theme.of(context).textTheme.bodyLarge!.color, - fontSize: 13), + fontSize: 13, + ), ) ], ), Wrap( crossAxisAlignment: WrapCrossAlignment.center, children: [ - const Icon( + Icon( Icons.check_circle_outline_rounded, size: 18, color: Colors.green, ), - const SizedBox( + SizedBox( width: 4, ), Text( 'Overlays (audio on Android only)', style: TextStyle( - color: - Theme.of(context).textTheme.bodyLarge!.color, - fontSize: 13), + fontSize: 13, + ), ) ], ), @@ -140,15 +136,14 @@ Widget inAppPurchaseDialog( Get.back(); }, style: TextButton.styleFrom( - textStyle: const TextStyle(fontSize: 12), backgroundColor: Theme.of(context).colorScheme.tertiaryContainer, ), - child: Text( + child: const Text( "Cancel", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - fontSize: 13), + fontSize: 13, + ), textAlign: TextAlign.center, ), ), @@ -158,14 +153,13 @@ Widget inAppPurchaseDialog( controller.storeController.purchase(); }, style: TextButton.styleFrom( - textStyle: const TextStyle(fontSize: 12), backgroundColor: Colors.deepPurpleAccent, ), child: Text( "Subscribe for $price", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - fontSize: 13), + style: const TextStyle( + fontSize: 13, + ), textAlign: TextAlign.center, ), ), diff --git a/lib/src/presentation/widgets/settings/manage_list_browser_tabs.dart b/lib/src/presentation/widgets/settings/manage_list_browser_tabs.dart index f21350e6..ef5f8793 100644 --- a/lib/src/presentation/widgets/settings/manage_list_browser_tabs.dart +++ b/lib/src/presentation/widgets/settings/manage_list_browser_tabs.dart @@ -42,11 +42,8 @@ class ManageListBrowserTabs extends GetView { ] : const [], backgroundColor: Theme.of(context).colorScheme.secondary, - title: Text( + title: const Text( "Manage browser tabs", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), centerTitle: false, ), @@ -62,11 +59,8 @@ class ManageListBrowserTabs extends GetView { .homeViewController.settings.value.browserTabs!.isEmpty ? Container( padding: const EdgeInsets.only(top: 20), - child: Text( + child: const Text( "Nothing in the list!", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), ) : ReorderableListView.builder( @@ -100,12 +94,6 @@ class ManageListBrowserTabs extends GetView { child: ListTile( title: Text( elem['title'], - style: TextStyle( - color: Theme.of(context) - .textTheme - .bodyLarge! - .color, - ), ), trailing: !controller.browserTabsSelected .contains(elem) @@ -124,12 +112,6 @@ class ManageListBrowserTabs extends GetView { title: 'Edit', textCancel: "cancel".tr, textConfirm: "confirm".tr, - titleStyle: TextStyle( - color: Theme.of(context) - .textTheme - .bodyLarge! - .color, - ), backgroundColor: Theme.of(context) .colorScheme .surface, @@ -155,12 +137,6 @@ class ManageListBrowserTabs extends GetView { title: 'Delete', textCancel: "cancel".tr, textConfirm: "confirm".tr, - titleStyle: TextStyle( - color: Theme.of(context) - .textTheme - .bodyLarge! - .color, - ), backgroundColor: Theme.of(context) .colorScheme .surface, @@ -221,10 +197,6 @@ class ManageListBrowserTabs extends GetView { title: "add".tr, textCancel: "cancel".tr, textConfirm: "add".tr, - titleStyle: TextStyle( - color: - Theme.of(context).textTheme.bodyLarge!.color, - ), backgroundColor: Theme.of(context).colorScheme.surface, buttonColor: const Color(0xFF9147ff), @@ -266,9 +238,6 @@ Widget _addDialog(context, SettingsViewController controller) { child: TextFormField( controller: controller.addBrowserTitleController, textInputAction: TextInputAction.send, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), maxLines: 1, validator: (value) { if (value == null || value.isEmpty) { @@ -276,17 +245,10 @@ Widget _addDialog(context, SettingsViewController controller) { } return null; }, - decoration: InputDecoration( + decoration: const InputDecoration( isDense: true, contentPadding: - const EdgeInsets.symmetric(horizontal: 8, vertical: 12), - enabledBorder: Theme.of(context).inputDecorationTheme.border, - hintStyle: TextStyle( - color: Theme.of(context).textTheme.bodyMedium!.color, - fontSize: 16), - labelStyle: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), + EdgeInsets.symmetric(horizontal: 8, vertical: 12), hintText: 'Tab title', labelText: 'Title', ), @@ -300,9 +262,6 @@ Widget _addDialog(context, SettingsViewController controller) { child: TextFormField( controller: controller.addBrowserUrlController, textInputAction: TextInputAction.send, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), maxLines: 1, textCapitalization: TextCapitalization.none, validator: (value) { @@ -311,17 +270,10 @@ Widget _addDialog(context, SettingsViewController controller) { } return null; }, - decoration: InputDecoration( + decoration: const InputDecoration( isDense: true, contentPadding: - const EdgeInsets.symmetric(horizontal: 8, vertical: 12), - enabledBorder: Theme.of(context).inputDecorationTheme.border, - hintStyle: TextStyle( - color: Theme.of(context).textTheme.bodyMedium!.color, - fontSize: 16), - labelStyle: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), + EdgeInsets.symmetric(horizontal: 8, vertical: 12), hintText: 'Tab url', labelText: 'URL', ), @@ -330,10 +282,9 @@ Widget _addDialog(context, SettingsViewController controller) { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Enabled", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -352,10 +303,9 @@ Widget _addDialog(context, SettingsViewController controller) { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Is an audio source", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -388,7 +338,6 @@ Widget _editDialog(context, SettingsViewController controller, elem) { child: TextFormField( controller: controller.addBrowserTitleController, textInputAction: TextInputAction.send, - style: Theme.of(context).textTheme.bodyLarge, maxLines: 1, validator: (value) { if (value == null || value.isEmpty) { @@ -396,19 +345,12 @@ Widget _editDialog(context, SettingsViewController controller, elem) { } return null; }, - decoration: InputDecoration( + decoration: const InputDecoration( isDense: true, contentPadding: - const EdgeInsets.symmetric(horizontal: 8, vertical: 12), - enabledBorder: Theme.of(context).inputDecorationTheme.border, - hintStyle: TextStyle( - color: Theme.of(context).textTheme.bodyMedium!.color, - fontSize: 16), + EdgeInsets.symmetric(horizontal: 8, vertical: 12), hintText: 'Tab title', labelText: 'Title', - labelStyle: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), ), ), @@ -420,7 +362,6 @@ Widget _editDialog(context, SettingsViewController controller, elem) { child: TextFormField( controller: controller.addBrowserUrlController, textInputAction: TextInputAction.send, - style: Theme.of(context).textTheme.bodyLarge, maxLines: 1, textCapitalization: TextCapitalization.none, validator: (value) { @@ -429,29 +370,21 @@ Widget _editDialog(context, SettingsViewController controller, elem) { } return null; }, - decoration: InputDecoration( + decoration: const InputDecoration( isDense: true, contentPadding: - const EdgeInsets.symmetric(horizontal: 8, vertical: 12), - enabledBorder: Theme.of(context).inputDecorationTheme.border, - hintStyle: TextStyle( - color: Theme.of(context).textTheme.bodyMedium!.color, - fontSize: 16), + EdgeInsets.symmetric(horizontal: 8, vertical: 12), hintText: 'Tab url', labelText: 'URL', - labelStyle: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), ), ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Enabled", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -470,10 +403,9 @@ Widget _editDialog(context, SettingsViewController controller, elem) { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Is an audio source", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), diff --git a/lib/src/presentation/widgets/settings/manage_list_hidden_users.dart b/lib/src/presentation/widgets/settings/manage_list_hidden_users.dart index d5651788..c2ddcc7d 100644 --- a/lib/src/presentation/widgets/settings/manage_list_hidden_users.dart +++ b/lib/src/presentation/widgets/settings/manage_list_hidden_users.dart @@ -26,11 +26,8 @@ class ManageListHiddenUsers extends GetView { ), actions: const [], backgroundColor: Theme.of(context).colorScheme.secondary, - title: Text( + title: const Text( "Manage hidden users", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), centerTitle: false, ), @@ -46,11 +43,9 @@ class ManageListHiddenUsers extends GetView { .hiddenUsersIds!.isEmpty ? Container( padding: const EdgeInsets.only(top: 20), - child: Text( - "Nothing in the list!", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), + child: const Text( + "Nothing in the list! To add users, select them in a chat and press 'Hide user'", + textAlign: TextAlign.center, ), ) : controller.usernamesHiddenUsers.length != @@ -58,20 +53,14 @@ class ManageListHiddenUsers extends GetView { .hiddenUsersIds!.length ? Container( padding: const EdgeInsets.only(top: 20), - child: Column( + child: const Column( children: [ - const CircularProgressIndicator(), - const SizedBox( + CircularProgressIndicator(), + SizedBox( height: 10, ), Text( "Loading...", - style: TextStyle( - color: Theme.of(context) - .textTheme - .bodyLarge! - .color, - ), ), ], ), diff --git a/lib/src/presentation/widgets/settings/obs_settings.dart b/lib/src/presentation/widgets/settings/obs_settings.dart index 338bd64f..09da049f 100644 --- a/lib/src/presentation/widgets/settings/obs_settings.dart +++ b/lib/src/presentation/widgets/settings/obs_settings.dart @@ -37,15 +37,10 @@ class ObsSettings extends StatelessWidget { .copyWith(obsWebsocketUrl: value); controller.saveSettings(); }, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), decoration: InputDecoration( isDense: true, contentPadding: const EdgeInsets.symmetric( horizontal: 8, vertical: 7), - enabledBorder: - Theme.of(context).inputDecorationTheme.border, hintText: 'url', labelText: 'Websocket Url', labelStyle: TextStyle( @@ -80,20 +75,12 @@ class ObsSettings extends StatelessWidget { .copyWith(obsWebsocketPassword: value); controller.saveSettings(); }, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), decoration: InputDecoration( isDense: true, contentPadding: const EdgeInsets.symmetric( horizontal: 8, vertical: 7), - enabledBorder: - Theme.of(context).inputDecorationTheme.border, hintText: 'password', labelText: 'Websocket Password', - labelStyle: TextStyle( - color: Theme.of(context).colorScheme.tertiary, - ), suffixIcon: IconButton( icon: Icon(controller.obsWebsocketPasswordShow.value ? Icons.visibility @@ -115,14 +102,12 @@ class ObsSettings extends StatelessWidget { Expanded( child: TextButton( style: TextButton.styleFrom( - textStyle: const TextStyle(fontSize: 12), backgroundColor: Theme.of(context).colorScheme.tertiary, fixedSize: const Size(50, 20), ), onPressed: () { MobileScannerController cameraController = MobileScannerController(); - Get.dialog( _qrPasswordScanner( cameraController, @@ -130,7 +115,6 @@ class ObsSettings extends StatelessWidget { context, ), ); - FocusManager.instance.primaryFocus?.unfocus(); }, child: Row( @@ -138,9 +122,6 @@ class ObsSettings extends StatelessWidget { children: [ Text( 'scan_qr'.tr, - style: const TextStyle( - color: Colors.white, - ), ), const SizedBox(width: 5), const Icon(Icons.qr_code, color: Colors.white), @@ -152,7 +133,6 @@ class ObsSettings extends StatelessWidget { Expanded( child: TextButton( style: TextButton.styleFrom( - textStyle: const TextStyle(fontSize: 12), backgroundColor: Theme.of(context).colorScheme.tertiaryContainer, fixedSize: const Size(50, 20), @@ -174,9 +154,6 @@ class ObsSettings extends StatelessWidget { children: [ Text( 'history'.tr, - style: const TextStyle( - color: Colors.white, - ), ), const SizedBox(width: 10), const Icon(Icons.history, color: Colors.white), diff --git a/lib/src/presentation/widgets/settings/stream_elements.dart b/lib/src/presentation/widgets/settings/stream_elements.dart index 8b2d2f4b..e09cbc06 100644 --- a/lib/src/presentation/widgets/settings/stream_elements.dart +++ b/lib/src/presentation/widgets/settings/stream_elements.dart @@ -21,10 +21,9 @@ class StreamElements extends GetView { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( 'StreamElements', style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -35,16 +34,15 @@ class StreamElements extends GetView { color: Theme.of(context).colorScheme.tertiary, borderRadius: BorderRadius.circular(20), ), - child: Wrap( + child: const Wrap( children: [ Text( "Premium feature", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 12, ), ), - const Icon( + Icon( CupertinoIcons.sparkles, size: 12, color: Colors.yellow, @@ -99,12 +97,6 @@ class StreamElements extends GetView { ); controller.saveSettings(); }, - style: TextStyle( - color: Theme.of(context) - .textTheme - .bodyLarge! - .color, - ), decoration: InputDecoration( isDense: true, contentPadding: const EdgeInsets.symmetric( @@ -121,16 +113,16 @@ class StreamElements extends GetView { ), suffixIcon: IconButton( icon: Icon( - controller.obsWebsocketUrlShow.value + controller.seJwtShow.value ? Icons.visibility : Icons.visibility_off), color: Theme.of(context) .primaryIconTheme .color, onPressed: () { - controller.obsWebsocketUrlShow.value = + controller.seJwtShow.value = !controller - .obsWebsocketUrlShow.value; + .seJwtShow.value; }, ), ), @@ -167,12 +159,6 @@ class StreamElements extends GetView { ); controller.saveSettings(); }, - style: TextStyle( - color: Theme.of(context) - .textTheme - .bodyLarge! - .color, - ), decoration: InputDecoration( isDense: true, contentPadding: const EdgeInsets.symmetric( @@ -189,16 +175,16 @@ class StreamElements extends GetView { ), suffixIcon: IconButton( icon: Icon( - controller.obsWebsocketUrlShow.value + controller.seOverlayTokenShow.value ? Icons.visibility : Icons.visibility_off), color: Theme.of(context) .primaryIconTheme .color, onPressed: () { - controller.obsWebsocketUrlShow.value = + controller.seOverlayTokenShow.value = !controller - .obsWebsocketUrlShow.value; + .seOverlayTokenShow.value; }, ), ), @@ -206,12 +192,8 @@ class StreamElements extends GetView { ), ], ), - Text( + const Text( 'Same as above for the overlay token', - style: TextStyle( - color: - Theme.of(context).textTheme.bodyLarge!.color, - ), ), const SizedBox( height: 8, @@ -244,7 +226,9 @@ class StreamElements extends GetView { ), Text( 'Logout', - style: TextStyle(fontSize: 16), + style: TextStyle( + fontSize: 16, + ), ), ], ), @@ -297,15 +281,12 @@ class StreamElements extends GetView { } Widget _jwtExplanation(BuildContext context) { - return RichText( + return Text.rich( textAlign: TextAlign.center, - text: TextSpan( + TextSpan( children: [ - TextSpan( + const TextSpan( text: 'To get your Access Token ', - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), WidgetSpan( child: InkWell( @@ -323,11 +304,8 @@ class StreamElements extends GetView { ), ), ), - TextSpan( + const TextSpan( text: '. Then press "Show Secret" and copy your JWT Token!', - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), ], ), diff --git a/lib/src/presentation/widgets/settings/subscription.dart b/lib/src/presentation/widgets/settings/subscription.dart index 474b1ac9..0b8ff486 100644 --- a/lib/src/presentation/widgets/settings/subscription.dart +++ b/lib/src/presentation/widgets/settings/subscription.dart @@ -66,9 +66,7 @@ class Subscription extends StatelessWidget { ), child: Text( "Only $price", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - fontSize: 13), + style: const TextStyle(fontSize: 13), textAlign: TextAlign.center, ), ), diff --git a/lib/src/presentation/widgets/settings/tts.dart b/lib/src/presentation/widgets/settings/tts.dart index d906776b..30696134 100644 --- a/lib/src/presentation/widgets/settings/tts.dart +++ b/lib/src/presentation/widgets/settings/tts.dart @@ -26,9 +26,6 @@ class Tts extends StatelessWidget { backgroundColor: Theme.of(context).colorScheme.secondary, title: Text( "text_to_speech".tr, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), centerTitle: false, ), @@ -44,8 +41,7 @@ class Tts extends StatelessWidget { children: [ Text( "enable_tts".tr, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, + style: const TextStyle( fontSize: 18, ), ), @@ -70,8 +66,7 @@ class Tts extends StatelessWidget { children: [ Text( "language".tr, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, + style: const TextStyle( fontSize: 18, ), ), @@ -110,9 +105,7 @@ class Tts extends StatelessWidget { children: [ Text( "voice".tr, - style: TextStyle( - color: - Theme.of(context).textTheme.bodyLarge!.color, + style: const TextStyle( fontSize: 18, ), ), @@ -154,10 +147,9 @@ class Tts extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Volume", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -184,8 +176,7 @@ class Tts extends StatelessWidget { children: [ Text( "speech_rate".tr, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, + style: const TextStyle( fontSize: 18, ), ), @@ -212,8 +203,7 @@ class Tts extends StatelessWidget { children: [ Text( "pitch".tr, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, + style: const TextStyle( fontSize: 18, ), ), @@ -239,10 +229,9 @@ class Tts extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Mute viewer name", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -266,10 +255,9 @@ class Tts extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Only read VIP messages", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -293,10 +281,9 @@ class Tts extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Only read Moderators messages", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -320,10 +307,9 @@ class Tts extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( + const Text( "Only read Subscriber messages", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontSize: 18, ), ), @@ -409,11 +395,7 @@ class Tts extends StatelessWidget { children: [ Text( "prefixs_ignored".tr, - style: TextStyle( - color: Theme.of(context) - .textTheme - .bodyLarge! - .color, + style: const TextStyle( fontSize: 18, ), ), @@ -501,11 +483,7 @@ class Tts extends StatelessWidget { children: [ Text( "prefixs_allowed".tr, - style: TextStyle( - color: Theme.of(context) - .textTheme - .bodyLarge! - .color, + style: const TextStyle( fontSize: 18, ), ), @@ -591,9 +569,7 @@ class Tts extends StatelessWidget { children: [ Text( "ignored_users".tr, - style: TextStyle( - color: - Theme.of(context).textTheme.bodyLarge!.color, + style: const TextStyle( fontSize: 18, ), ), @@ -705,11 +681,6 @@ class Tts extends StatelessWidget { }, child: Text( "add".tr, - style: TextStyle( - color: Theme.of(Get.context!) - .textTheme - .bodyLarge! - .color), ), ), ), diff --git a/lib/src/presentation/widgets/stream_elements/se_activities_list.dart b/lib/src/presentation/widgets/stream_elements/se_activities_list.dart index 87479e1b..ae8d8106 100644 --- a/lib/src/presentation/widgets/stream_elements/se_activities_list.dart +++ b/lib/src/presentation/widgets/stream_elements/se_activities_list.dart @@ -80,11 +80,8 @@ class SeActivitiesList extends GetView { () => CheckboxListTile( activeColor: Colors.deepPurple[600], controlAffinity: ListTileControlAffinity.leading, - title: Text( + title: const Text( "Followers", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), value: controller.homeViewController.settings.value .streamElementsSettings!.showFollowerActivity, @@ -107,11 +104,8 @@ class SeActivitiesList extends GetView { () => CheckboxListTile( activeColor: Colors.deepPurple[600], controlAffinity: ListTileControlAffinity.leading, - title: Text( + title: const Text( "Subscriptions", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), value: controller.homeViewController.settings.value .streamElementsSettings!.showSubscriberActivity, @@ -134,11 +128,8 @@ class SeActivitiesList extends GetView { () => CheckboxListTile( activeColor: Colors.deepPurple[600], controlAffinity: ListTileControlAffinity.leading, - title: Text( + title: const Text( "Bits", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), value: controller.homeViewController.settings.value .streamElementsSettings!.showCheerActivity, @@ -161,11 +152,8 @@ class SeActivitiesList extends GetView { () => CheckboxListTile( activeColor: Colors.deepPurple[600], controlAffinity: ListTileControlAffinity.leading, - title: Text( + title: const Text( "Donations", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), value: controller.homeViewController.settings.value .streamElementsSettings!.showDonationActivity, @@ -188,11 +176,8 @@ class SeActivitiesList extends GetView { () => CheckboxListTile( activeColor: Colors.deepPurple[600], controlAffinity: ListTileControlAffinity.leading, - title: Text( + title: const Text( "Raids", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), value: controller.homeViewController.settings.value .streamElementsSettings!.showRaidActivity, @@ -215,11 +200,8 @@ class SeActivitiesList extends GetView { () => CheckboxListTile( activeColor: Colors.deepPurple[600], controlAffinity: ListTileControlAffinity.leading, - title: Text( + title: const Text( "Hosts", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), value: controller.homeViewController.settings.value .streamElementsSettings!.showHostActivity, @@ -260,9 +242,9 @@ Widget _activityCollapsed( activity.getIcon(), const SizedBox(width: 4), Expanded( - child: RichText( + child: Text.rich( overflow: TextOverflow.ellipsis, - text: TextSpan( + TextSpan( children: [ TextSpan( text: activity.textFromEnum(), @@ -319,8 +301,8 @@ Widget _activityExpanded( activity.getIcon(), const SizedBox(width: 4), Expanded( - child: RichText( - text: TextSpan(children: [ + child: Text.rich( + TextSpan(children: [ TextSpan( text: activity.textFromEnum(), style: TextStyle( diff --git a/lib/src/presentation/widgets/stream_elements/se_song_requests.dart b/lib/src/presentation/widgets/stream_elements/se_song_requests.dart index 1ead2f71..39785205 100644 --- a/lib/src/presentation/widgets/stream_elements/se_song_requests.dart +++ b/lib/src/presentation/widgets/stream_elements/se_song_requests.dart @@ -56,10 +56,9 @@ class SeSongRequests extends GetView { const Padding( padding: EdgeInsets.only(top: 10), ), - Text( + const Text( 'Now Playing', style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontWeight: FontWeight.bold, ), ), @@ -69,21 +68,17 @@ class SeSongRequests extends GetView { const Padding( padding: EdgeInsets.only(bottom: 15), ), - RichText( + Text.rich( overflow: TextOverflow.ellipsis, - text: TextSpan(children: [ - TextSpan( + TextSpan(children: [ + const TextSpan( text: "Queue ", style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, fontWeight: FontWeight.bold, ), ), TextSpan( text: "(${controller.songRequestQueue.length} videos)", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), ]), ), @@ -121,53 +116,42 @@ class SeSongRequests extends GetView { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - RichText( + Text.rich( overflow: TextOverflow.ellipsis, - text: TextSpan( + TextSpan( children: [ TextSpan( text: song.channel, - style: TextStyle( + style: const TextStyle( fontWeight: FontWeight.bold, - color: Theme.of(context).textTheme.bodyLarge!.color, ), ), - TextSpan( + const TextSpan( text: " - ", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), + style: TextStyle(), ), TextSpan( text: song.title, - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), + style: const TextStyle(), ) ], ), ), - RichText( + Text.rich( overflow: TextOverflow.ellipsis, - text: TextSpan(children: [ - TextSpan( + TextSpan(children: [ + const TextSpan( text: "Duration: ", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), + style: TextStyle(), ), TextSpan( text: song.duration.toString(), - style: TextStyle( + style: const TextStyle( fontWeight: FontWeight.bold, - color: Theme.of(context).textTheme.bodyLarge!.color, ), ), - TextSpan( + const TextSpan( text: "s", - style: TextStyle( - color: Theme.of(context).textTheme.bodyLarge!.color, - ), ), ]), ), diff --git a/lib/src/presentation/widgets/tabs/obs_tab_view.dart b/lib/src/presentation/widgets/tabs/obs_tab_view.dart index ead00d56..3396e205 100644 --- a/lib/src/presentation/widgets/tabs/obs_tab_view.dart +++ b/lib/src/presentation/widgets/tabs/obs_tab_view.dart @@ -162,10 +162,6 @@ class ObsTabView extends GetView { // ), Divider( height: 40, - thickness: 4, - indent: 0, - endIndent: 0, - color: Theme.of(context).colorScheme.secondary, ), Wrap(children: [ Text( @@ -179,12 +175,8 @@ class ObsTabView extends GetView { child: getScenes(), ), ]), - Divider( + const Divider( height: 40, - thickness: 4, - indent: 0, - endIndent: 0, - color: Theme.of(context).colorScheme.secondary, ), Wrap(children: [ Text( diff --git a/lib/src/presentation/widgets/tabs/streamelements_tab_view.dart b/lib/src/presentation/widgets/tabs/streamelements_tab_view.dart index 128aae48..965535a9 100644 --- a/lib/src/presentation/widgets/tabs/streamelements_tab_view.dart +++ b/lib/src/presentation/widgets/tabs/streamelements_tab_view.dart @@ -20,14 +20,10 @@ class StreamelementsTabView extends GetView { child: TabBar( controller: controller.tabController, isScrollable: true, - labelColor: Theme.of(context).colorScheme.tertiary, - unselectedLabelColor: - context.theme.textTheme.bodyLarge!.color, indicator: const BoxDecoration( border: null, ), tabAlignment: TabAlignment.center, - dividerColor: Colors.transparent, tabs: const [ Text("Activities"), Text("Song Requests"), diff --git a/lib/src/presentation/widgets/tabs/twitch_tab_view.dart b/lib/src/presentation/widgets/tabs/twitch_tab_view.dart index b330f7a6..c3a10490 100644 --- a/lib/src/presentation/widgets/tabs/twitch_tab_view.dart +++ b/lib/src/presentation/widgets/tabs/twitch_tab_view.dart @@ -64,12 +64,6 @@ class TwitchTabView extends GetView { controller.twitchStreamInfos.value.isOnline! ? "live".tr : "offline".tr, - style: TextStyle( - color: Theme.of(Get.context!) - .textTheme - .bodyLarge! - .color, - ), ), ], ), @@ -99,12 +93,6 @@ class TwitchTabView extends GetView { ), Text( "viewers".tr, - style: TextStyle( - color: Theme.of(Get.context!) - .textTheme - .bodyLarge! - .color, - ), ), ], ), @@ -120,24 +108,21 @@ class TwitchTabView extends GetView { child: TextFormField( controller: controller.titleFormController, focusNode: controller.focus, - style: Theme.of(Get.context!).textTheme.bodyLarge, decoration: InputDecoration( contentPadding: const EdgeInsets.symmetric( - horizontal: 8, vertical: 7), + horizontal: 8, + vertical: 7, + ), hintText: 'Your stream\'s title', labelText: 'stream_title'.tr, - labelStyle: TextStyle( - color: Theme.of(context).colorScheme.tertiary, - ), ), ), ), ), TextButton( style: TextButton.styleFrom( - textStyle: const TextStyle(fontSize: 11), backgroundColor: Colors.deepPurpleAccent, - fixedSize: const Size(50, 20), + fixedSize: const Size(80, 20), ), onPressed: () { controller.setStreamTitle(); @@ -152,17 +137,12 @@ class TwitchTabView extends GetView { ), ], ), - Divider( + const Divider( height: 40, - thickness: 4, - indent: 0, - endIndent: 0, - color: Theme.of(context).colorScheme.secondary, ), Text( "shortcuts".tr, - style: TextStyle( - color: Theme.of(Get.context!).textTheme.bodyLarge!.color, + style: const TextStyle( fontSize: 16, fontWeight: FontWeight.bold, ), @@ -214,12 +194,8 @@ class TwitchTabView extends GetView { ), ], ), - Divider( + const Divider( height: 40, - thickness: 4, - indent: 0, - endIndent: 0, - color: Theme.of(context).colorScheme.secondary, ), _shortcutButton( onTap: () { @@ -274,12 +250,8 @@ class TwitchTabView extends GetView { context: context, isOn: false, ), - Divider( + const Divider( height: 40, - thickness: 4, - indent: 0, - endIndent: 0, - color: Theme.of(context).colorScheme.secondary, ), Get.find().twitchEventSub != null ? prediction( @@ -288,12 +260,8 @@ class TwitchTabView extends GetView { controller.twitchEventSub!.currentPrediction.value, ) : Container(), - Divider( + const Divider( height: 40, - thickness: 4, - indent: 0, - endIndent: 0, - color: Theme.of(context).colorScheme.secondary, ), controller.twitchEventSub != null ? poll(