add flex_color_scheme
This commit is contained in:
parent
f9976f0148
commit
cf546b2721
3 changed files with 44 additions and 3 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:flex_color_scheme/flex_color_scheme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
|
|
@ -10,7 +11,8 @@ void main() async {
|
|||
Hive.registerAdapter(ModelMangaAdapter());
|
||||
await Hive.openBox<ModelManga>(
|
||||
HiveConstant.hiveBoxManga,
|
||||
); await Hive.openBox(
|
||||
);
|
||||
await Hive.openBox(
|
||||
HiveConstant.hiveBoxMangaInfo,
|
||||
);
|
||||
runApp(const ProviderScope(child: MyApp()));
|
||||
|
|
@ -24,7 +26,23 @@ class MyApp extends ConsumerWidget {
|
|||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final router = ref.watch(routerProvider);
|
||||
return MaterialApp.router(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
theme: FlexThemeData.light(
|
||||
colors: ThemeAA.schemes[6].light,
|
||||
surfaceMode: FlexSurfaceMode.highScaffoldLevelSurface,
|
||||
blendLevel: 24,
|
||||
appBarOpacity: 0.00,
|
||||
subThemesData: const FlexSubThemesData(
|
||||
blendOnLevel: 24,
|
||||
thinBorderWidth: 2.0,
|
||||
unselectedToggleIsColored: true,
|
||||
inputDecoratorRadius: 24.0,
|
||||
chipRadius: 24.0,
|
||||
dialogBackgroundSchemeColor: SchemeColor.background,
|
||||
),
|
||||
useMaterial3ErrorColors: true,
|
||||
visualDensity: FlexColorScheme.comfortablePlatformDensity,
|
||||
useMaterial3: true,
|
||||
),
|
||||
debugShowCheckedModeBanner: false,
|
||||
routeInformationParser: router.routeInformationParser,
|
||||
routerDelegate: router.routerDelegate,
|
||||
|
|
@ -33,3 +51,9 @@ class MyApp extends ConsumerWidget {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ThemeAA {
|
||||
static const List<FlexSchemeData> schemes = <FlexSchemeData>[
|
||||
...FlexColor.schemesList,
|
||||
];
|
||||
}
|
||||
|
|
|
|||
18
pubspec.lock
18
pubspec.lock
|
|
@ -297,6 +297,22 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
flex_color_scheme:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flex_color_scheme
|
||||
sha256: d72aac83f525bf7a0fae66a90837817c73adcd52af4b4a8f310fb40a1b57055b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
flex_seed_scheme:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flex_seed_scheme
|
||||
sha256: "7058288ef97d348657ac95cea25d65a9aac181ca08387ede891fd7230ad7600f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.3"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
|
|
@ -911,4 +927,4 @@ packages:
|
|||
version: "3.1.1"
|
||||
sdks:
|
||||
dart: ">=2.19.5 <3.0.0"
|
||||
flutter: ">=3.3.0"
|
||||
flutter: ">=3.7.0"
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ dependencies:
|
|||
blur: ^3.1.0
|
||||
draggable_home: ^1.0.4
|
||||
expandable_text: ^2.3.0
|
||||
flex_color_scheme: ^7.0.0
|
||||
|
||||
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
|
|
|
|||
Loading…
Reference in a new issue