diff --git a/lib/app.dart b/lib/app.dart index 631007b0..89ecb7b0 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -42,6 +42,10 @@ class MyApp extends StatelessWidget { final radioTheme = RadioThemeData( fillColor: materialColor, ); + final iconBtnTheme = IconButtonThemeData( + style: ButtonStyle( + iconColor: primaryColor.materialStateColor, + )); return MaterialApp( localizationsDelegates: const [ @@ -57,6 +61,7 @@ class MyApp extends StatelessWidget { appBarTheme: appBarTheme, floatingActionButtonTheme: fabTheme, iconTheme: iconTheme, + iconButtonTheme: iconBtnTheme, primaryIconTheme: iconTheme, switchTheme: switchTheme, inputDecorationTheme: inputDecorationTheme, @@ -64,15 +69,20 @@ class MyApp extends StatelessWidget { ), darkTheme: ThemeData.dark().copyWith( useMaterial3: false, - primaryColor: primaryColor, floatingActionButtonTheme: fabTheme, iconTheme: iconTheme, + iconButtonTheme: iconBtnTheme, primaryIconTheme: iconTheme, switchTheme: switchTheme, inputDecorationTheme: inputDecorationTheme, radioTheme: radioTheme, + colorScheme: ColorScheme.fromSwatch( + primarySwatch: primaryColor.materialColor, + brightness: Brightness.dark, + accentColor: primaryColor + ) ), - home: MyHomePage(primaryColor: primaryColor), + home: const MyHomePage(), ); }, ); diff --git a/lib/data/res/build_data.dart b/lib/data/res/build_data.dart index c455377e..5e1395f7 100644 --- a/lib/data/res/build_data.dart +++ b/lib/data/res/build_data.dart @@ -2,9 +2,9 @@ class BuildData { static const String name = "ServerBox"; - static const int build = 205; + static const int build = 206; static const String engine = "Flutter 3.7.0 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision b06b8b2710 (8 days ago) • 2023-01-23 16:55:55 -0800\nEngine • revision b24591ed32\nTools • Dart 2.19.0 • DevTools 2.20.1\n"; - static const String buildAt = "2023-02-01 14:57:28.662965"; - static const int modifications = 5; + static const String buildAt = "2023-02-01 17:24:19.787396"; + static const int modifications = 4; } diff --git a/lib/view/page/convert.dart b/lib/view/page/convert.dart index 444ed724..2e09d8ca 100644 --- a/lib/view/page/convert.dart +++ b/lib/view/page/convert.dart @@ -52,7 +52,7 @@ class _ConvertPageState extends State children: [ const SizedBox(height: 13), _buildInputTop(), - _buildTypeOption(), + _buildMiddleBtns(), _buildResult(), ], ), @@ -96,7 +96,7 @@ class _ConvertPageState extends State ); } - Widget _buildTypeOption() { + Widget _buildMiddleBtns() { final decode = _s.decode; final encode = _s.encode; final List typeOption = [ diff --git a/lib/view/page/home.dart b/lib/view/page/home.dart index d551f746..b225a544 100644 --- a/lib/view/page/home.dart +++ b/lib/view/page/home.dart @@ -1,6 +1,5 @@ import 'package:after_layout/after_layout.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:get_it/get_it.dart'; import '../../core/analysis.dart'; @@ -11,6 +10,7 @@ import '../../data/model/app/dynamic_color.dart'; import '../../data/model/app/navigation_item.dart'; import '../../data/provider/server.dart'; import '../../data/res/build_data.dart'; +import '../../data/res/color.dart'; import '../../data/res/font_style.dart'; import '../../data/res/icon.dart'; import '../../data/res/tab.dart'; @@ -33,8 +33,7 @@ final _bottomItemOverlayColor = DynamicColor(Colors.black.withOpacity(0.07), Colors.white12); class MyHomePage extends StatefulWidget { - const MyHomePage({Key? key, required this.primaryColor}) : super(key: key); - final Color primaryColor; + const MyHomePage({Key? key}) : super(key: key); @override State createState() => _MyHomePageState(); @@ -159,7 +158,10 @@ class _MyHomePageState extends State (item) { int itemIndex = tabItems.indexOf(item); return _buildBottomItem( - itemIndex, item, _selectIndex == itemIndex,); + itemIndex, + item, + _selectIndex == itemIndex, + ); }, ).toList(), ), @@ -282,7 +284,7 @@ class _MyHomePageState extends State ConstrainedBox( constraints: const BoxConstraints(maxHeight: 53, maxWidth: 53), child: Container( - color: widget.primaryColor, + color: primaryColor, ), ), ConstrainedBox( diff --git a/lib/view/page/setting.dart b/lib/view/page/setting.dart index 557838dd..d1d3bf75 100644 --- a/lib/view/page/setting.dart +++ b/lib/view/page/setting.dart @@ -219,8 +219,9 @@ class _SettingPageState extends State { title: Text( tabTitleName(context, tabs.indexOf(e)), style: TextStyle( - fontSize: 14, - color: _theme.textTheme.bodyMedium!.color!.withAlpha(177),), + fontSize: 14, + color: _theme.textTheme.bodyMedium!.color!.withAlpha(177), + ), ), trailing: _buildRadio(tabs.indexOf(e)), ),