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

@@ -4,7 +4,7 @@ import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
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';
import 'package:sfm_app/feature/devices/device_model.dart';
import 'package:sfm_app/feature/map/map_bloc.dart';

View File

@@ -94,8 +94,8 @@ onTapMarker(
);
},
style: const ButtonStyle(
backgroundColor: MaterialStatePropertyAll(Colors.blue),
foregroundColor: MaterialStatePropertyAll(Colors.white),
backgroundColor: WidgetStatePropertyAll(Colors.blue),
foregroundColor: WidgetStatePropertyAll(Colors.white),
),
child: Row(
children: [
@@ -127,8 +127,8 @@ onTapMarker(
);
},
style: const ButtonStyle(
backgroundColor: MaterialStatePropertyAll(Colors.pink),
foregroundColor: MaterialStatePropertyAll(Colors.white),
backgroundColor: WidgetStatePropertyAll(Colors.pink),
foregroundColor: WidgetStatePropertyAll(Colors.white),
),
icon: IconConstants.instance
.getMaterialIcon(Icons.local_hospital),
@@ -156,8 +156,8 @@ onTapMarker(
);
},
style: const ButtonStyle(
backgroundColor: MaterialStatePropertyAll(Colors.red),
foregroundColor: MaterialStatePropertyAll(Colors.white),
backgroundColor: WidgetStatePropertyAll(Colors.red),
foregroundColor: WidgetStatePropertyAll(Colors.white),
),
icon: IconConstants.instance
.getMaterialIcon(Icons.fire_truck_outlined),
@@ -279,7 +279,7 @@ class DeviceSource extends DataTableSource {
String deviceState =
DeviceUtils.instance.checkStateDevice(context, device.state!);
return DataRow.byIndex(
color: MaterialStatePropertyAll(
color: WidgetStatePropertyAll(
DeviceUtils.instance.getTableRowColor(device.state ?? -1),
),
index: index,

View File

@@ -112,7 +112,7 @@ showDirections(
),
style: ButtonStyle(
backgroundColor:
MaterialStateProperty.all<Color>(Colors.blue[300]!),
WidgetStateProperty.all<Color>(Colors.blue[300]!),
),
),
],

View File

@@ -158,9 +158,9 @@ showNearPlacesSideSheet(
child: ElevatedButton.icon(
style: const ButtonStyle(
backgroundColor:
MaterialStatePropertyAll(Colors.blue),
WidgetStatePropertyAll(Colors.blue),
foregroundColor:
MaterialStatePropertyAll(Colors.white),
WidgetStatePropertyAll(Colors.white),
),
onPressed: () async {
Navigator.pop(modalBottomSheetContext);