Skip to content

Commit

Permalink
Warning message on using useDelayedDisposal
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Irmančnik committed Oct 10, 2022
1 parent 7eead7c commit 63b3d71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ xml ...

[Recommended](https://docs.mapbox.com/help/tutorials/first-steps-ios-sdk/#display-the-users-location) explanation about "Shows your location on the map and helps improve the map".

## Flutter 3.x.x issues
Since Flutter 3.x.x was introduced, it exposed some race conditions resulting in occasional crashes upon map disposal. The parameter `useDelayedDisposal` was introduced as a workaround for this issue until Flutter and/or Mapbox fix this issue properly. Use with caution.
## Flutter 3.x.x issues and experimental workarounds
Since Flutter 3.x.x was introduced, it exposed some race conditions resulting in occasional crashes upon map disposal. The parameter `useDelayedDisposal` was introduced as a workaround for this issue until Flutter and/or Mapbox fix this issue properly. Use with caution - this is not yet production ready since several users still report crashes after using this workaround.

## Running the example code
See the [documentation about this topic](doc/RUNNING_EXAMPLE_CODE.md)
Expand Down
1 change: 1 addition & 0 deletions lib/src/mapbox_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ class MapboxMap extends StatefulWidget {
final OnMapIdleCallback? onMapIdle;

/// Use delayed disposal of Android View Controller to avoid flutter 3.x.x crashes
/// Use with caution - this is not yet production ready since several users still report crashes after using this workaround
final bool? useDelayedDisposal;

/// Override hybrid mode per map instance
Expand Down

0 comments on commit 63b3d71

Please sign in to comment.