Upgrade dependencies after upgrade Flutter 3.22.2

This commit is contained in:
DatDang
2024-07-09 11:32:42 +07:00
committed by Dat H. Pham
parent 1b70226c0f
commit e8eb67bf63
58 changed files with 552 additions and 326 deletions
+2 -2
View File
@@ -14,9 +14,9 @@ class ThemeUtils {
dividerTheme: _dividerTheme,
visualDensity: VisualDensity.adaptivePlatformDensity,
scrollbarTheme: ScrollbarThemeData(
thickness: MaterialStateProperty.all(8.0),
thickness: WidgetStateProperty.all(8.0),
radius: const Radius.circular(8.0),
thumbColor: MaterialStateProperty.all(AppColor.thumbScrollbarColor)),
thumbColor: WidgetStateProperty.all(AppColor.thumbScrollbarColor)),
);
}
@@ -61,7 +61,7 @@ class ConfirmationDialogActionSheetBuilder {
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 10),
color: Colors.white,
child: MouseRegion(
cursor: PlatformInfo.isWeb ? MaterialStateMouseCursor.clickable : MouseCursor.defer,
cursor: PlatformInfo.isWeb ? WidgetStateMouseCursor.clickable : MouseCursor.defer,
child: CupertinoActionSheetAction(
child: Text(
_messageText ?? '',
@@ -76,7 +76,7 @@ class ConfirmationDialogActionSheetBuilder {
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 10),
color: Colors.white,
child: MouseRegion(
cursor: PlatformInfo.isWeb ? MaterialStateMouseCursor.clickable : MouseCursor.defer,
cursor: PlatformInfo.isWeb ? WidgetStateMouseCursor.clickable : MouseCursor.defer,
child: CupertinoActionSheetAction(
child: RichText(text: TextSpan(
style: _styleMessage ?? const TextStyle(fontSize: 14, color: AppColor.colorMessageConfirmDialog),
@@ -89,7 +89,7 @@ class ConfirmationDialogActionSheetBuilder {
Container(
color: Colors.white,
child: MouseRegion(
cursor: PlatformInfo.isWeb ? MaterialStateMouseCursor.clickable : MouseCursor.defer,
cursor: PlatformInfo.isWeb ? WidgetStateMouseCursor.clickable : MouseCursor.defer,
child: CupertinoActionSheetAction(
child: Text(
_confirmText ?? '',
@@ -100,7 +100,7 @@ class ConfirmationDialogActionSheetBuilder {
),
],
cancelButton: MouseRegion(
cursor: PlatformInfo.isWeb ? MaterialStateMouseCursor.clickable : MouseCursor.defer,
cursor: PlatformInfo.isWeb ? WidgetStateMouseCursor.clickable : MouseCursor.defer,
child: CupertinoActionSheetAction(
child: Text(
_cancelText ?? '',
@@ -91,11 +91,11 @@ Widget buildTextButton(String text, {
child: ElevatedButton(
focusNode: focusNode,
style: ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith((states) => backgroundColor ?? AppColor.colorTextButton),
elevation: MaterialStateProperty.resolveWith((states) => 0),
padding: MaterialStateProperty.resolveWith<EdgeInsetsGeometry>(
(Set<MaterialState> states) => padding ?? const EdgeInsets.symmetric(horizontal: 8)),
shape: MaterialStateProperty.all(RoundedRectangleBorder(borderRadius: BorderRadius.circular(radius ?? 0)))),
backgroundColor: WidgetStateProperty.resolveWith((states) => backgroundColor ?? AppColor.colorTextButton),
elevation: WidgetStateProperty.resolveWith((states) => 0),
padding: WidgetStateProperty.resolveWith<EdgeInsetsGeometry>(
(Set<WidgetState> states) => padding ?? const EdgeInsets.symmetric(horizontal: 8)),
shape: WidgetStateProperty.all(RoundedRectangleBorder(borderRadius: BorderRadius.circular(radius ?? 0)))),
child: Text(
text,
textAlign: TextAlign.center,
@@ -127,17 +127,17 @@ Widget buildButtonWrapText(String name, {
focusNode: focusNode,
onPressed: () => onTap?.call(),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith<Color>(
(Set<MaterialState> states) => bgColor ?? AppColor.colorTextButton),
shape: MaterialStateProperty.all(RoundedRectangleBorder(
backgroundColor: WidgetStateProperty.resolveWith<Color>(
(Set<WidgetState> states) => bgColor ?? AppColor.colorTextButton),
shape: WidgetStateProperty.all(RoundedRectangleBorder(
borderRadius: BorderRadius.circular(radius ?? 8),
side: BorderSide(
width: borderColor != null ? 1 : 0,
color: borderColor ?? bgColor ?? AppColor.colorTextButton))),
padding: MaterialStateProperty.resolveWith<EdgeInsets>(
(Set<MaterialState> states) => const EdgeInsets.symmetric(horizontal: 16)),
elevation: MaterialStateProperty.resolveWith<double>(
(Set<MaterialState> states) => 0)),
padding: WidgetStateProperty.resolveWith<EdgeInsets>(
(Set<WidgetState> states) => const EdgeInsets.symmetric(horizontal: 16)),
elevation: WidgetStateProperty.resolveWith<double>(
(Set<WidgetState> states) => 0)),
child: Text(name,
textAlign: TextAlign.center,
style: textStyle ??
@@ -155,17 +155,17 @@ class EditTextDialogBuilder {
child: ElevatedButton(
onPressed: () => action?.call(),
style: ButtonStyle(
foregroundColor: MaterialStateProperty.resolveWith<Color>(
(Set<MaterialState> states) => bgColor ?? AppColor.colorTextButton),
backgroundColor: MaterialStateProperty.resolveWith<Color>(
(Set<MaterialState> states) => bgColor ?? AppColor.colorTextButton),
shape: MaterialStateProperty.all(RoundedRectangleBorder(
foregroundColor: WidgetStateProperty.resolveWith<Color>(
(Set<WidgetState> states) => bgColor ?? AppColor.colorTextButton),
backgroundColor: WidgetStateProperty.resolveWith<Color>(
(Set<WidgetState> states) => bgColor ?? AppColor.colorTextButton),
shape: WidgetStateProperty.all(RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
side: BorderSide(width: 0, color: bgColor ?? AppColor.colorTextButton),
)),
padding: MaterialStateProperty.resolveWith<EdgeInsets>(
(Set<MaterialState> states) => const EdgeInsets.symmetric(horizontal: 16)),
elevation: MaterialStateProperty.resolveWith<double>((Set<MaterialState> states) => 0)),
padding: WidgetStateProperty.resolveWith<EdgeInsets>(
(Set<WidgetState> states) => const EdgeInsets.symmetric(horizontal: 16)),
elevation: WidgetStateProperty.resolveWith<double>((Set<WidgetState> states) => 0)),
child: Text(name ?? '',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17, fontWeight: FontWeight.w500, color: nameColor ?? Colors.white)),