mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
fix: btn theme color
This commit is contained in:
14
lib/app.dart
14
lib/app.dart
@@ -42,6 +42,10 @@ class MyApp extends StatelessWidget {
|
|||||||
final radioTheme = RadioThemeData(
|
final radioTheme = RadioThemeData(
|
||||||
fillColor: materialColor,
|
fillColor: materialColor,
|
||||||
);
|
);
|
||||||
|
final iconBtnTheme = IconButtonThemeData(
|
||||||
|
style: ButtonStyle(
|
||||||
|
iconColor: primaryColor.materialStateColor,
|
||||||
|
));
|
||||||
|
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
localizationsDelegates: const [
|
localizationsDelegates: const [
|
||||||
@@ -57,6 +61,7 @@ class MyApp extends StatelessWidget {
|
|||||||
appBarTheme: appBarTheme,
|
appBarTheme: appBarTheme,
|
||||||
floatingActionButtonTheme: fabTheme,
|
floatingActionButtonTheme: fabTheme,
|
||||||
iconTheme: iconTheme,
|
iconTheme: iconTheme,
|
||||||
|
iconButtonTheme: iconBtnTheme,
|
||||||
primaryIconTheme: iconTheme,
|
primaryIconTheme: iconTheme,
|
||||||
switchTheme: switchTheme,
|
switchTheme: switchTheme,
|
||||||
inputDecorationTheme: inputDecorationTheme,
|
inputDecorationTheme: inputDecorationTheme,
|
||||||
@@ -64,15 +69,20 @@ class MyApp extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
darkTheme: ThemeData.dark().copyWith(
|
darkTheme: ThemeData.dark().copyWith(
|
||||||
useMaterial3: false,
|
useMaterial3: false,
|
||||||
primaryColor: primaryColor,
|
|
||||||
floatingActionButtonTheme: fabTheme,
|
floatingActionButtonTheme: fabTheme,
|
||||||
iconTheme: iconTheme,
|
iconTheme: iconTheme,
|
||||||
|
iconButtonTheme: iconBtnTheme,
|
||||||
primaryIconTheme: iconTheme,
|
primaryIconTheme: iconTheme,
|
||||||
switchTheme: switchTheme,
|
switchTheme: switchTheme,
|
||||||
inputDecorationTheme: inputDecorationTheme,
|
inputDecorationTheme: inputDecorationTheme,
|
||||||
radioTheme: radioTheme,
|
radioTheme: radioTheme,
|
||||||
|
colorScheme: ColorScheme.fromSwatch(
|
||||||
|
primarySwatch: primaryColor.materialColor,
|
||||||
|
brightness: Brightness.dark,
|
||||||
|
accentColor: primaryColor
|
||||||
|
)
|
||||||
),
|
),
|
||||||
home: MyHomePage(primaryColor: primaryColor),
|
home: const MyHomePage(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
class BuildData {
|
class BuildData {
|
||||||
static const String name = "ServerBox";
|
static const String name = "ServerBox";
|
||||||
static const int build = 205;
|
static const int build = 206;
|
||||||
static const String engine =
|
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";
|
"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 String buildAt = "2023-02-01 17:24:19.787396";
|
||||||
static const int modifications = 5;
|
static const int modifications = 4;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class _ConvertPageState extends State<ConvertPage>
|
|||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 13),
|
const SizedBox(height: 13),
|
||||||
_buildInputTop(),
|
_buildInputTop(),
|
||||||
_buildTypeOption(),
|
_buildMiddleBtns(),
|
||||||
_buildResult(),
|
_buildResult(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -96,7 +96,7 @@ class _ConvertPageState extends State<ConvertPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildTypeOption() {
|
Widget _buildMiddleBtns() {
|
||||||
final decode = _s.decode;
|
final decode = _s.decode;
|
||||||
final encode = _s.encode;
|
final encode = _s.encode;
|
||||||
final List<String> typeOption = [
|
final List<String> typeOption = [
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'package:after_layout/after_layout.dart';
|
import 'package:after_layout/after_layout.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:get_it/get_it.dart';
|
import 'package:get_it/get_it.dart';
|
||||||
|
|
||||||
import '../../core/analysis.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/model/app/navigation_item.dart';
|
||||||
import '../../data/provider/server.dart';
|
import '../../data/provider/server.dart';
|
||||||
import '../../data/res/build_data.dart';
|
import '../../data/res/build_data.dart';
|
||||||
|
import '../../data/res/color.dart';
|
||||||
import '../../data/res/font_style.dart';
|
import '../../data/res/font_style.dart';
|
||||||
import '../../data/res/icon.dart';
|
import '../../data/res/icon.dart';
|
||||||
import '../../data/res/tab.dart';
|
import '../../data/res/tab.dart';
|
||||||
@@ -33,8 +33,7 @@ final _bottomItemOverlayColor =
|
|||||||
DynamicColor(Colors.black.withOpacity(0.07), Colors.white12);
|
DynamicColor(Colors.black.withOpacity(0.07), Colors.white12);
|
||||||
|
|
||||||
class MyHomePage extends StatefulWidget {
|
class MyHomePage extends StatefulWidget {
|
||||||
const MyHomePage({Key? key, required this.primaryColor}) : super(key: key);
|
const MyHomePage({Key? key}) : super(key: key);
|
||||||
final Color primaryColor;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MyHomePage> createState() => _MyHomePageState();
|
State<MyHomePage> createState() => _MyHomePageState();
|
||||||
@@ -159,7 +158,10 @@ class _MyHomePageState extends State<MyHomePage>
|
|||||||
(item) {
|
(item) {
|
||||||
int itemIndex = tabItems.indexOf(item);
|
int itemIndex = tabItems.indexOf(item);
|
||||||
return _buildBottomItem(
|
return _buildBottomItem(
|
||||||
itemIndex, item, _selectIndex == itemIndex,);
|
itemIndex,
|
||||||
|
item,
|
||||||
|
_selectIndex == itemIndex,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
).toList(),
|
).toList(),
|
||||||
),
|
),
|
||||||
@@ -282,7 +284,7 @@ class _MyHomePageState extends State<MyHomePage>
|
|||||||
ConstrainedBox(
|
ConstrainedBox(
|
||||||
constraints: const BoxConstraints(maxHeight: 53, maxWidth: 53),
|
constraints: const BoxConstraints(maxHeight: 53, maxWidth: 53),
|
||||||
child: Container(
|
child: Container(
|
||||||
color: widget.primaryColor,
|
color: primaryColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ConstrainedBox(
|
ConstrainedBox(
|
||||||
|
|||||||
@@ -220,7 +220,8 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
tabTitleName(context, tabs.indexOf(e)),
|
tabTitleName(context, tabs.indexOf(e)),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: _theme.textTheme.bodyMedium!.color!.withAlpha(177),),
|
color: _theme.textTheme.bodyMedium!.color!.withAlpha(177),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
trailing: _buildRadio(tabs.indexOf(e)),
|
trailing: _buildRadio(tabs.indexOf(e)),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user