Migrate fires_flutter to flutter_map v6.1.0 and complete major null-safety fixes
- Updated Android build files: gradle plugin 8.2.2, gradle 8.3, SDK 34, minSdk 21 - Ran dart fix --apply for 87 automatic null-safety fixes - Migrated flutter_map v6 API breaking changes: - MapOptions: center → initialCenter, zoom → initialZoom - layers → children structure - TileLayerOptions/MarkerLayerOptions/PolylineLayerOptions → TileLayer/MarkerLayer/PolylineLayer - Removed plugin_api.dart imports - Converted old plugin system (ZoomMapPlugin, AttributionPlugin, etc.) to direct widgets - Updated onTap callback signature: (TapPosition) → (TapPosition, LatLng) - Migrated all marker/polyline creation to v6 API - Fixed FlatButton → TextButton deprecation - Fixed stackTrace access with catch(e, stackTrace) pattern - Removed deprecated flutter_google_places_autocomplete dependency - Removed deprecated dependencies: latlong, connectivity, launch_review - Updated all imports from latlong → latlong2 - Placeholder implementation for places autocomplete (feature temporarily disabled) Remaining tasks (non-blocking for build): - Complete null-safety fixes for _location variables in genericMap.dart - Fix theme.dart MaterialTheme parameter issues - Fix customStepper.dart null-safety issues - Final build and testing
This commit is contained in:
parent
292cf65bbc
commit
eb0d19621c
46 changed files with 586 additions and 697 deletions
|
|
@ -3,8 +3,8 @@ import 'dart:async';
|
|||
import 'package:comunes_flutter/comunes_flutter.dart';
|
||||
import 'package:fires_flutter/models/yourLocation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_fab_dialer/flutter_fab_dialer.dart';
|
||||
import 'package:flutter_redux/flutter_redux.dart';
|
||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
|
||||
import 'colors.dart';
|
||||
|
|
@ -29,13 +29,13 @@ class _ViewModel {
|
|||
final bool isLoading;
|
||||
|
||||
_ViewModel(
|
||||
{@required this.onAdd,
|
||||
@required this.onDelete,
|
||||
@required this.onToggleSubs,
|
||||
@required this.onTap,
|
||||
@required this.onRefresh,
|
||||
@required this.yourLocations,
|
||||
@required this.isLoading});
|
||||
{required this.onAdd,
|
||||
required this.onDelete,
|
||||
required this.onToggleSubs,
|
||||
required this.onTap,
|
||||
required this.onRefresh,
|
||||
required this.yourLocations,
|
||||
required this.isLoading});
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
|
|
@ -59,25 +59,35 @@ class ActiveFiresPage extends StatefulWidget {
|
|||
class _ActiveFiresPageState extends State<ActiveFiresPage> {
|
||||
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
|
||||
|
||||
List<FabMiniMenuItem> _fabMiniMenuItemList(
|
||||
List<SpeedDialChild> _fabMiniMenuItemList(
|
||||
BuildContext context, AddYourLocationFunction onAdd) {
|
||||
return [
|
||||
new FabMiniMenuItem.withText(
|
||||
new Icon(Icons.location_searching),
|
||||
fires600,
|
||||
8.0,
|
||||
S.of(context).addYourCurrentPosition,
|
||||
() {
|
||||
SpeedDialChild(
|
||||
child: const Icon(Icons.location_searching),
|
||||
backgroundColor: fires600,
|
||||
label: S.of(context).addYourCurrentPosition,
|
||||
labelWidget: Container(
|
||||
color: Colors.white,
|
||||
child: Text(S.of(context).addYourCurrentPosition,
|
||||
style: const TextStyle(color: Colors.black38)),
|
||||
),
|
||||
onTap: () {
|
||||
onAddYourLocation(onAdd);
|
||||
},
|
||||
S.of(context).addYourCurrentPosition,
|
||||
Colors.black38,
|
||||
Colors.white,
|
||||
),
|
||||
new FabMiniMenuItem.withText(new Icon(Icons.edit_location), fires600, 8.0,
|
||||
S.of(context).addSomePlace, () {
|
||||
onAddOtherLocation(onAdd);
|
||||
}, S.of(context).addSomePlace, Colors.black38, Colors.white)
|
||||
SpeedDialChild(
|
||||
child: const Icon(Icons.edit_location),
|
||||
backgroundColor: fires600,
|
||||
label: S.of(context).addSomePlace,
|
||||
labelWidget: Container(
|
||||
color: Colors.white,
|
||||
child: Text(S.of(context).addSomePlace,
|
||||
style: const TextStyle(color: Colors.black38)),
|
||||
),
|
||||
onTap: () {
|
||||
onAddOtherLocation(onAdd);
|
||||
},
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -243,9 +253,12 @@ class _ActiveFiresPageState extends State<ActiveFiresPage> {
|
|||
view.onRefresh(completer);
|
||||
return completer.future;
|
||||
}),
|
||||
// TODO: Evaluate: https://github.com/tiagojencmartins/unicornspeeddial
|
||||
new FabDialer(_fabMiniMenuItemList(context, view.onAdd),
|
||||
fires600, new Icon(Icons.add))
|
||||
SpeedDial(
|
||||
icon: Icons.add,
|
||||
activeIcon: Icons.close,
|
||||
backgroundColor: fires600,
|
||||
children: _fabMiniMenuItemList(context, view.onAdd),
|
||||
)
|
||||
])
|
||||
: new Center(
|
||||
child: new CenteredColumn(children: <Widget>[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue