chore(deps): upgrade Flutter SDK from 3.10.1 to 3.27.1

- Update Flutter SDK version to 3.27.1
- Update minimum dart SDK version
- Update dependencies to compatible versions
- Fix deprecated method calls
- Run migration for breaking changes
This commit is contained in:
anhtunz
2025-01-05 18:48:11 +07:00
parent 178a00f5ba
commit fb12c44505
30 changed files with 266 additions and 212 deletions

View File

@@ -335,8 +335,8 @@ class _DetailGroupScreenState extends State<DetailGroupScreen> {
);
},
style: const ButtonStyle(
backgroundColor: MaterialStatePropertyAll(Colors.red),
foregroundColor: MaterialStatePropertyAll(Colors.white),
backgroundColor: WidgetStatePropertyAll(Colors.red),
foregroundColor: WidgetStatePropertyAll(Colors.white),
),
child: Text(
appLocalization(context).delete_group_title,
@@ -383,7 +383,8 @@ class _DetailGroupScreenState extends State<DetailGroupScreen> {
child: Text(
appLocalization(context)
.confirm_button_content,
style: const TextStyle(color: Colors.red),
style: const TextStyle(
color: Colors.red),
))
],
);
@@ -391,8 +392,8 @@ class _DetailGroupScreenState extends State<DetailGroupScreen> {
});
},
style: const ButtonStyle(
backgroundColor: MaterialStatePropertyAll(Colors.red),
foregroundColor: MaterialStatePropertyAll(Colors.white),
backgroundColor: WidgetStatePropertyAll(Colors.red),
foregroundColor: WidgetStatePropertyAll(Colors.white),
),
child: Text(
appLocalization(context).leave_group_title,
@@ -437,16 +438,19 @@ class _DetailGroupScreenState extends State<DetailGroupScreen> {
itemCount: devices.length,
itemBuilder: (BuildContext context, int index) {
return ListTile(
title: Text(devices[index].alias != ""
? devices[index].alias!
: devices[index].name!,),
title: Text(
devices[index].alias != ""
? devices[index].alias!
: devices[index].name!,
),
trailing: Text(
DeviceUtils.instance.checkStateDevice(
context, devices[index].state!),
style: TextStyle(
color: DeviceUtils.instance
.getTableRowColor(
devices[index].state!,),),
color: DeviceUtils.instance.getTableRowColor(
devices[index].state!,
),
),
),
);
},
@@ -454,7 +458,8 @@ class _DetailGroupScreenState extends State<DetailGroupScreen> {
),
],
);
},),
},
),
),
);
}
@@ -500,8 +505,8 @@ class _DetailGroupScreenState extends State<DetailGroupScreen> {
Center(
child: TextButton(
style: const ButtonStyle(
foregroundColor: MaterialStatePropertyAll(Colors.white),
backgroundColor: MaterialStatePropertyAll(Colors.green)),
foregroundColor: WidgetStatePropertyAll(Colors.white),
backgroundColor: WidgetStatePropertyAll(Colors.green)),
onPressed: () async {
ScaffoldMessenger.of(context).hideCurrentSnackBar();
String alias = aliasController.text;