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
|
|
@ -70,14 +70,12 @@ class CustomStep {
|
|||
///
|
||||
/// The [title], [content], and [state] arguments must not be null.
|
||||
const CustomStep({
|
||||
@required this.title,
|
||||
required this.title,
|
||||
this.subtitle,
|
||||
@required this.content,
|
||||
this.state: CustomStepState.indexed,
|
||||
this.isActive: false,
|
||||
}) : assert(title != null),
|
||||
assert(content != null),
|
||||
assert(state != null);
|
||||
required this.content,
|
||||
this.state = CustomStepState.indexed,
|
||||
this.isActive= false,
|
||||
});
|
||||
|
||||
/// The title of the step that typically describes it.
|
||||
final Widget title;
|
||||
|
|
@ -124,16 +122,13 @@ class CustomStepper extends StatefulWidget {
|
|||
/// The [steps], [type], and [currentCustomStep] arguments must not be null.
|
||||
CustomStepper({
|
||||
Key key,
|
||||
@required this.steps,
|
||||
this.type: CustomStepperType.vertical,
|
||||
this.currentCustomStep: 0,
|
||||
required this.steps,
|
||||
this.type = CustomStepperType.vertical,
|
||||
this.currentCustomStep = 0,
|
||||
this.onCustomStepTapped,
|
||||
this.onCustomStepContinue,
|
||||
this.onCustomStepCancel,
|
||||
}) : assert(steps != null),
|
||||
assert(type != null),
|
||||
assert(currentCustomStep != null),
|
||||
assert(0 <= currentCustomStep && currentCustomStep < steps.length),
|
||||
}) : assert(0 <= currentCustomStep && currentCustomStep < steps.length),
|
||||
super(key: key);
|
||||
|
||||
/// The steps of the stepper whose titles, subtitles, icons always get shown.
|
||||
|
|
@ -221,7 +216,6 @@ class _CustomStepperState extends State<CustomStepper> {
|
|||
final CustomStepState state =
|
||||
oldState ? _oldStates[index] : widget.steps[index].state;
|
||||
final bool isDarkActive = _isDark() && widget.steps[index].isActive;
|
||||
assert(state != null);
|
||||
switch (state) {
|
||||
case CustomStepState.indexed:
|
||||
case CustomStepState.disabled:
|
||||
|
|
@ -255,8 +249,8 @@ class _CustomStepperState extends State<CustomStepper> {
|
|||
: Colors.black38;
|
||||
} else {
|
||||
return widget.steps[index].isActive
|
||||
? themeData.accentColor
|
||||
: themeData.backgroundColor;
|
||||
? themeData.colorScheme.secondary
|
||||
: themeData.colorScheme.surface;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -341,7 +335,6 @@ class _CustomStepperState extends State<CustomStepper> {
|
|||
break;
|
||||
}
|
||||
|
||||
assert(cancelColor != null);
|
||||
|
||||
// final ThemeData themeData = Theme.of(context);
|
||||
// final MaterialLocalizations localizations =
|
||||
|
|
@ -379,17 +372,16 @@ class _CustomStepperState extends State<CustomStepper> {
|
|||
final ThemeData themeData = Theme.of(context);
|
||||
final TextTheme textTheme = themeData.textTheme;
|
||||
|
||||
assert(widget.steps[index].state != null);
|
||||
switch (widget.steps[index].state) {
|
||||
case CustomStepState.indexed:
|
||||
case CustomStepState.editing:
|
||||
case CustomStepState.complete:
|
||||
return textTheme.bodyText1;
|
||||
return textTheme.bodyLarge;
|
||||
case CustomStepState.disabled:
|
||||
return textTheme.bodyText1
|
||||
return textTheme.bodyLarge
|
||||
.copyWith(color: _isDark() ? _kDisabledDark : _kDisabledLight);
|
||||
case CustomStepState.error:
|
||||
return textTheme.bodyText1
|
||||
return textTheme.bodyLarge
|
||||
.copyWith(color: _isDark() ? _kErrorDark : _kErrorLight);
|
||||
}
|
||||
return null;
|
||||
|
|
@ -399,17 +391,16 @@ class _CustomStepperState extends State<CustomStepper> {
|
|||
final ThemeData themeData = Theme.of(context);
|
||||
final TextTheme textTheme = themeData.textTheme;
|
||||
|
||||
assert(widget.steps[index].state != null);
|
||||
switch (widget.steps[index].state) {
|
||||
case CustomStepState.indexed:
|
||||
case CustomStepState.editing:
|
||||
case CustomStepState.complete:
|
||||
return textTheme.caption;
|
||||
return textTheme.bodySmall;
|
||||
case CustomStepState.disabled:
|
||||
return textTheme.caption
|
||||
return textTheme.bodySmall
|
||||
.copyWith(color: _isDark() ? _kDisabledDark : _kDisabledLight);
|
||||
case CustomStepState.error:
|
||||
return textTheme.caption
|
||||
return textTheme.bodySmall
|
||||
.copyWith(color: _isDark() ? _kErrorDark : _kErrorLight);
|
||||
}
|
||||
return null;
|
||||
|
|
@ -425,18 +416,17 @@ class _CustomStepperState extends State<CustomStepper> {
|
|||
),
|
||||
];
|
||||
|
||||
if (widget.steps[index].subtitle != null)
|
||||
children.add(
|
||||
new Container(
|
||||
margin: const EdgeInsets.only(top: 2.0),
|
||||
child: new AnimatedDefaultTextStyle(
|
||||
style: _subtitleStyle(index),
|
||||
duration: kThemeAnimationDuration,
|
||||
curve: Curves.fastOutSlowIn,
|
||||
child: widget.steps[index].subtitle,
|
||||
),
|
||||
children.add(
|
||||
new Container(
|
||||
margin: const EdgeInsets.only(top: 2.0),
|
||||
child: new AnimatedDefaultTextStyle(
|
||||
style: _subtitleStyle(index),
|
||||
duration: kThemeAnimationDuration,
|
||||
curve: Curves.fastOutSlowIn,
|
||||
child: widget.steps[index].subtitle,
|
||||
),
|
||||
);
|
||||
),
|
||||
);
|
||||
|
||||
return new Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
|
@ -523,8 +513,7 @@ class _CustomStepperState extends State<CustomStepper> {
|
|||
duration: kThemeAnimationDuration,
|
||||
);
|
||||
|
||||
if (widget.onCustomStepTapped != null)
|
||||
widget.onCustomStepTapped(i);
|
||||
widget.onCustomStepTapped(i);
|
||||
}
|
||||
: null,
|
||||
child: _buildVerticalHeader(i)),
|
||||
|
|
@ -546,8 +535,7 @@ class _CustomStepperState extends State<CustomStepper> {
|
|||
new InkResponse(
|
||||
onTap: widget.steps[i].state != CustomStepState.disabled
|
||||
? () {
|
||||
if (widget.onCustomStepTapped != null)
|
||||
widget.onCustomStepTapped(i);
|
||||
widget.onCustomStepTapped(i);
|
||||
}
|
||||
: null,
|
||||
child: new Row(
|
||||
|
|
@ -598,7 +586,6 @@ class _CustomStepperState extends State<CustomStepper> {
|
|||
new AnimatedSize(
|
||||
curve: Curves.fastOutSlowIn,
|
||||
duration: kThemeAnimationDuration,
|
||||
vsync: null,
|
||||
child: widget.steps[widget.currentCustomStep].content,
|
||||
),
|
||||
_buildVerticalControls(),
|
||||
|
|
@ -620,7 +607,6 @@ class _CustomStepperState extends State<CustomStepper> {
|
|||
'https://material.google.com/components/steppers.html#steppers-usage\n');
|
||||
return true;
|
||||
}());
|
||||
assert(widget.type != null);
|
||||
switch (widget.type) {
|
||||
case CustomStepperType.vertical:
|
||||
return _buildVertical();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue