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

@@ -59,10 +59,10 @@ class _DetailDeviceScreenState extends State<DetailDeviceScreen> {
BoxDecoration boxDecoration = BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.grey.withOpacity(0.1),
color: Colors.grey.withValues(alpha: 0.1),
border: Border.all(
width: 1,
color: Colors.grey.withOpacity(0.6),
color: Colors.grey.withValues(alpha: 0.6),
),
);
@@ -439,7 +439,8 @@ class _DetailDeviceScreenState extends State<DetailDeviceScreen> {
width: double.infinity,
height: 20,
decoration: BoxDecoration(
color: Colors.grey.withOpacity(0.3),
color: Colors.grey
.withValues(alpha: 0.3),
borderRadius:
BorderRadius.circular(10),
),

View File

@@ -1,4 +1,4 @@
import 'package:google_maps_cluster_manager/google_maps_cluster_manager.dart';
import 'package:google_maps_cluster_manager_2/google_maps_cluster_manager_2.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
// class Device {

View File

@@ -187,7 +187,7 @@ class _DeviceUpdateScreenState extends State<DeviceUpdateScreen> {
child: IconButton.filled(
style: const ButtonStyle(
backgroundColor:
MaterialStatePropertyAll(
WidgetStatePropertyAll(
Colors
.lightGreen)),
// iconSize: 24,
@@ -379,7 +379,7 @@ class _DeviceUpdateScreenState extends State<DeviceUpdateScreen> {
decoration: BoxDecoration(
borderRadius:
const BorderRadius
.all(
.all(
Radius.circular(
20)),
border: Border.all()),
@@ -429,11 +429,11 @@ class _DeviceUpdateScreenState extends State<DeviceUpdateScreen> {
child: TextButton(
style: ButtonStyle(
foregroundColor:
MaterialStateProperty
WidgetStateProperty
.all(Colors
.white),
backgroundColor:
MaterialStateProperty
WidgetStateProperty
.all(Colors
.blue)),
onPressed: () async {

View File

@@ -51,7 +51,7 @@ class _DevicesManagerScreenState extends State<DevicesManagerScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
// backgroundColor: Colors.grey.withOpacity(0.6),
// backgroundColor: Colors.grey.withValues(alpha: 0.6),
body: SafeArea(
child: StreamBuilder<List<Device>>(
stream: devicesManagerBloc.streamAllDevices,
@@ -138,11 +138,10 @@ class _DevicesManagerScreenState extends State<DevicesManagerScreen> {
IconButton(
style: ButtonStyle(
backgroundColor:
MaterialStateProperty.all<Color>(
WidgetStateProperty.all<Color>(
Colors.green),
iconColor:
MaterialStateProperty.all<Color>(
Colors.white)),
iconColor: WidgetStateProperty.all<Color>(
Colors.white)),
onPressed: () {
ScaffoldMessenger.of(context)
.clearSnackBars();
@@ -163,7 +162,7 @@ class _DevicesManagerScreenState extends State<DevicesManagerScreen> {
),
SizedBox(height: context.lowValue),
Text(
appLocalization(context).overview_message,
appLocalization(context).overview_message,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,