1
This commit is contained in:
14
lib/theme/custom_colors.dart
Normal file
14
lib/theme/custom_colors.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
///扩展颜色
|
||||
extension CustomColors on ColorScheme {
|
||||
Color get success => const Color(0xff57be80);
|
||||
|
||||
Color get warning => const Color(0xffff9800);
|
||||
|
||||
Color get info => const Color(0xff909399);
|
||||
|
||||
Color get danger => const Color(0xfff44545);
|
||||
|
||||
Color get primaryEnd => const Color(0xff06b6d4);
|
||||
}
|
||||
18
lib/theme/decorations/app_shadows.dart
Normal file
18
lib/theme/decorations/app_shadows.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
///阴影卡片
|
||||
final shadowDecoration = BoxDecoration(
|
||||
border: Border.all(color: Colors.black, width: 2),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
color: Colors.white,
|
||||
boxShadow: const [
|
||||
BoxShadow(
|
||||
color: Color(0xffb5b5b5),
|
||||
blurRadius: 2,
|
||||
offset: Offset(6, 6),
|
||||
spreadRadius: 0,
|
||||
blurStyle: BlurStyle.normal,
|
||||
),
|
||||
],
|
||||
);
|
||||
49
lib/theme/theme.dart
Normal file
49
lib/theme/theme.dart
Normal file
@@ -0,0 +1,49 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
///颜色
|
||||
final scheme = ColorScheme.fromSeed(
|
||||
primary: Color(0xff3784f1),
|
||||
seedColor: Color(0xff3885f2),
|
||||
brightness: Brightness.light,
|
||||
//卡片色
|
||||
surface: Colors.white,
|
||||
surfaceContainerLow: Color(0xFFF4F8FB),
|
||||
surfaceContainer: Color(0xFFE9ECF3),
|
||||
surfaceContainerHigh: Color(0xffbababa),
|
||||
//颜色
|
||||
onSurfaceVariant: Color(0xFFBEBEBE),
|
||||
|
||||
shadow: Color.fromRGBO(0, 0, 0, 0.1),
|
||||
);
|
||||
|
||||
///字体
|
||||
final textTheme = TextTheme(
|
||||
titleLarge: TextStyle(
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: scheme.onSurface,
|
||||
letterSpacing: 0.5,
|
||||
),
|
||||
titleMedium: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: scheme.onSurface,
|
||||
letterSpacing: 0.5,
|
||||
),
|
||||
titleSmall: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: scheme.onSurface,
|
||||
letterSpacing: 0.5,
|
||||
),
|
||||
bodyLarge: TextStyle(fontSize: 18, letterSpacing: 0.5),
|
||||
bodyMedium: TextStyle(
|
||||
fontSize: 16,
|
||||
letterSpacing: 0.5,
|
||||
color: scheme.onSurface,
|
||||
),
|
||||
bodySmall: TextStyle(fontSize: 14, letterSpacing: 0.5),
|
||||
labelLarge: TextStyle(fontSize: 16, color: scheme.onSurfaceVariant, letterSpacing: 0.5),
|
||||
labelMedium: TextStyle(fontSize: 14, color: scheme.onSurfaceVariant, letterSpacing: 0.5),
|
||||
labelSmall: TextStyle(fontSize: 12, color: scheme.onSurfaceVariant, letterSpacing: 0.5),
|
||||
);
|
||||
Reference in New Issue
Block a user