Support Flutter 3.22.2

Support Flutter 3.22.2
This commit is contained in:
Binance3980
2024-07-01 15:26:49 +08:00
parent c91ea3ab5c
commit 64cf920b59
101 changed files with 260 additions and 1951 deletions
+3 -42
View File
@@ -1,5 +1,6 @@
// ignore_for_file: file_names
import 'package:flutter/material.dart';
import 'package:sail/resources/app_theme.dart';
class ThemeCollection extends ChangeNotifier {
/// _colorSwatch method or function take RGB color as argument and after processing
@@ -28,46 +29,6 @@ class ThemeCollection extends ChangeNotifier {
notifyListeners();
}
// ThemeData themeData = ThemeData(
// primarySwatch: AppColors.themeColor,
// visualDensity: VisualDensity.adaptivePlatformDensity,
// );
ThemeData get getActiveTheme => isDarkActive ? _darkTheme : lightTheme;
// Let's define a light theme for our Application
ThemeData get lightTheme => ThemeData(
primarySwatch: MaterialColor(0xffFFFFFF, _colorSwatch(1, 117, 194)),
primaryColor: Colors.green,
// accentColor: const Color(0xffAE77FF),
canvasColor: const Color(0xffFFFFFF),
// backgroundColor: const Color(0xffFFFFFF),
iconTheme: const IconThemeData(color: Colors.green),
primaryTextTheme: TextTheme(
bodyText1: const TextStyle(color: Colors.black, fontSize: 15),
bodyText2: const TextStyle(color: Colors.black54, fontSize: 15),
subtitle1: const TextStyle(color: Colors.black),
headline3: const TextStyle(
color: Colors.black, fontSize: 27, fontWeight: FontWeight.bold),
headline6: const TextStyle(color: Colors.black),
caption: TextStyle(
color: Colors.grey.shade700, wordSpacing: -1, fontSize: 12)));
// Now define a dark theme for our Application
ThemeData get _darkTheme => ThemeData(
primarySwatch: MaterialColor(0xff0B0415, _colorSwatch(2, 86, 155)),
primaryColor: Colors.green,
// accentColor: const Color(0xffAE77FF),
canvasColor: const Color(0xff0B0415),
// backgroundColor: const Color(0xff0B0415),
iconTheme: const IconThemeData(color: Colors.white),
primaryTextTheme: const TextTheme(
bodyText1: TextStyle(color: Colors.white, fontSize: 15),
bodyText2: TextStyle(color: Colors.white70, fontSize: 15),
subtitle1: TextStyle(color: Colors.white),
headline3: TextStyle(
color: Colors.white, fontSize: 27, fontWeight: FontWeight.bold),
headline6: const TextStyle(color: Colors.white),
caption:
TextStyle(color: Colors.white54, wordSpacing: -1, fontSize: 12)));
ThemeData get getActiveTheme =>
isDarkActive ? AppTheme.lightThemeData : AppTheme.darkThemeData;
}