| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- import 'package:flutter/animation.dart';
- import 'package:flutter/material.dart';
- class AppTheme {
- static Color primaryColor = const Color(0xff06DDE2);
- static Color primaryDarkColor = const Color(0xff09c4c9);
- static Color secondaryColor = const Color(0xffF3F3F3);
- static Color whiteColor = const Color(0xffffffff);
- static Color lightWhiteColor =const Color(0xfff4f4f4);
- static Color blackColor = const Color(0xff000000);
- static Color grayColor = const Color(0xff808080);
- static Color orangeColor = const Color(0xffFfa500);
- static Color pinkColor = const Color(0xffFFC0CB);
- static Color blueColor = const Color(0xff0000ff);
- static Color redColor = const Color(0xffFF0000);
- static Color purpleColor = const Color(0xff800080);
- static Color yellowColor = const Color(0xffFFFF00);
- static Color darkYellowColor = const Color(0xffFCDA2A);
- static Color magentaColor = const Color(0xffFF00FF);
- static Color brownColor = const Color(0xffA52A2A);
- static Color cyanColor = const Color(0xff00FFFF);
- static Color lightGrayColor = const Color(0xff7d7f88);
- static Color lightGrayBgColor = const Color(0xffE3E3E7);
- static Color greenColor = Colors.green;
- static LinearGradient primaryGradientColor = LinearGradient(
- begin: const Alignment(-1, -0.897),
- end: const Alignment(0.862, 1),
- colors: <Color>[primaryColor, primaryDarkColor],
- stops: const <double>[0.313, 1],
- );
- static LinearGradient disableGradientColor = LinearGradient(
- begin: const Alignment(-1, -0.897),
- end: const Alignment(0.862, 1),
- colors: <Color>[grayColor.withOpacity(0.5), grayColor],
- stops: const <double>[0.313, 1],
- );
- // AppTheme({this.secondaryColor});
- }
- MaterialColor buildMaterialColor(Color color) {
- List strengths = <double>[.05];
- Map<int, Color> swatch = <int, Color>{};
- final int r = color.red, g = color.green, b = color.blue;
- for (int i = 1; i < 10; i++) {
- strengths.add(0.1 * i);
- }
- for (var strength in strengths) {
- final double ds = 0.5 - strength;
- swatch[(strength * 1000).round()] = Color.fromRGBO(
- r + ((ds < 0 ? r : (255 - r)) * ds).round(),
- g + ((ds < 0 ? g : (255 - g)) * ds).round(),
- b + ((ds < 0 ? b : (255 - b)) * ds).round(),
- 1,
- );
- }
- return MaterialColor(color.value, swatch);
- }
|