Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to sound null-safety #870

Merged
merged 62 commits into from Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
911ca0d
Add actions/stale@v3 GitHub Action
johnpryan Mar 19, 2021
dfb91ef
updated to latest master version
escamoteur Jan 6, 2021
49119d1
updated dependcies to compile again
escamoteur Mar 22, 2021
f084f2a
updated latlong import
escamoteur Mar 22, 2021
98ebcff
migrated to unsound null safety
escamoteur Mar 22, 2021
d210359
removed .packages from repository
escamoteur Mar 23, 2021
5633366
small fixes
escamoteur Mar 23, 2021
0bf64bf
Update lib/src/core/point.dart
escamoteur Mar 25, 2021
c7d523a
Update pubspec.yaml
escamoteur Mar 25, 2021
48f361e
Update lib/src/gestures/latlng_tween.dart
escamoteur Mar 25, 2021
d1be78e
type '_ControllerStream<LatLng?>' is not a subtype of type 'Stream<La…
tazik561 Mar 25, 2021
f2aaf92
changes according to review
escamoteur Mar 25, 2021
2affa2c
made key nullable
escamoteur Apr 2, 2021
34bf621
made rebuild nullable again
escamoteur Apr 2, 2021
cd6ec35
Fix polyline border drawing
Ahmed-gubara Apr 6, 2021
53be3ce
corrected typo in dependency_overrides
escamoteur Apr 8, 2021
8bb439c
Removed unnecessary null-checks
kengu Apr 8, 2021
2b509ad
Limit number of purges in TileLayer and cancel pending on dispose
kengu Apr 14, 2021
235dea9
Fix error messages in mocked classes
kengu Apr 14, 2021
2ff083d
Set ready to true always (state is never null)
kengu Apr 14, 2021
0145354
Merge improved fling physics into sound null-safety branch
kengu Apr 25, 2021
2a71f18
Merge Added new plugin to README
kengu Apr 27, 2021
622d7e8
make bounds, getBounds and getCenter null safe
kengu Apr 27, 2021
daf1dbb
Merge Optimize markers calculations as null safe
kengu Apr 28, 2021
37e8f07
Merge Added onMapCreated callback
kengu Apr 30, 2021
09b306a
Merge Add a fastReplace option to TileLayerOptions
kengu Apr 30, 2021
72786e6
use http.RetryClient instead of flutter_image
josxha May 10, 2021
a1496c5
formatting
josxha May 10, 2021
0c7462f
add change notes
josxha May 10, 2021
45c94ea
Added example page for NetworkTileProvider
kengu May 15, 2021
d9dd158
Added dependency on null safe version 0.17.0 of package intl (would n…
kengu May 15, 2021
e72a6f0
Changed to master branch of flutter_image that is now null-safe
kengu May 15, 2021
f132c35
Change override of package flutter_image to new location in flutter p…
kengu May 15, 2021
85146e2
Merge Add a key for markers to preserve state
kengu May 15, 2021
de5d4da
Merge remote-tracking branch 'fleaflet/issues/829-nullsafety' into is…
ThexXTURBOXx May 19, 2021
910f701
Update git repo link
ThexXTURBOXx May 19, 2021
079daaf
Fix typos
ThexXTURBOXx May 19, 2021
918d65b
Sort dependencies
ThexXTURBOXx May 19, 2021
8c36591
Reformat and improve pub score
ThexXTURBOXx May 19, 2021
c7da0c9
Upgraded to flutter_image ^4.0.1
kengu May 19, 2021
932d6d8
Merge remote-tracking branch 'fleaflet/issues/829-nullsafety' into is…
ThexXTURBOXx May 19, 2021
793b4f0
Reformatted files to standard settings
kengu May 19, 2021
00fa7fb
Merge remote-tracking branch 'fleaflet/issues/829-nullsafety' into is…
ThexXTURBOXx May 19, 2021
6023f61
Reformatted crs.dart that wasn't changed using command line
kengu May 19, 2021
a4e1b5d
Merge remote-tracking branch 'fleaflet/issues/829-nullsafety' into is…
ThexXTURBOXx May 19, 2021
1882f32
Random Fixes Everywhere (#910)
ThexXTURBOXx May 20, 2021
8899a7b
Merge remote-tracking branch 'fleaflet/issues/829-nullsafety' into is…
ThexXTURBOXx May 20, 2021
252bbc4
Merge pull request #1 from ThexXTURBOXx/issues/829-nullsafety
josxha May 20, 2021
d9674b5
Merge pull request #894 from josxha/issues/829-nullsafety
kengu May 22, 2021
8378acb
remove TODO
johnpryan Jun 4, 2021
705e32c
Clarification of all options available for offline mapping (#913)
JaffaKetchup Jun 4, 2021
a249d23
Merge branch 'master' of github.com:fleaflet/flutter_map into issues/…
johnpryan Jun 4, 2021
618bc12
Merge branch 'issues/829-nullsafety' of github.com:fleaflet/flutter_m…
johnpryan Jun 4, 2021
b870970
fix Group Layer Options constructor wrong nullability (#921)
tlserver Jun 4, 2021
36154f4
null check regex in template()
johnpryan Jun 4, 2021
863c797
Merge remote-tracking branch 'origin/issues/829-nullsafety' into issu…
johnpryan Jun 4, 2021
9e6dd84
re-apply #913 into null safety branch
johnpryan Jun 4, 2021
c3659d9
Review comments from issues/829-nullsafety (#919)
andreandersson Jun 4, 2021
a86caca
dart format
johnpryan Jun 4, 2021
40d3a59
make urlTemplate required, make throttleSTreamTransformerWithTrailing…
johnpryan Jun 4, 2021
3ea0500
use late final where possible
johnpryan Jun 4, 2021
2765f26
revert making urlTemplate non-nullable
johnpryan Jun 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,19 @@
## [0.13.0] - xx/xx/2021
This version has support for sound null safety. For this purpose, some inactive packages were exchanged with active forks.

- Sound null safety migration (#851, #870)
- requires flutter version 2.0.0 or higher
- latlong is replaced with latlong2
- ready-flag on map has been removed
- Remove the package flutter_image and add http instead (#894)
- http has to be version 0.13.2 or higher for this package (#894)
- Removed deprecated properties
- debug property has been removed
- interactive has been replaced by interactiveFlags
- Bounds getCenter has been replaced by center getter

Thanks to escamoteur, ThexXTURBOXx, Sata51, tazik561, kengu, passsy, Ahmed-gubara, johnpryan, josxha and andreandersson for this release!

## [0.12.0] - 3/16/2021
TileLayerOptions now takes some additional options, templateFunction,
tileBuilder, tilesContainerBuilder, and evictErrorTileStrategy
Expand Down
79 changes: 68 additions & 11 deletions README.md
Expand Up @@ -243,18 +243,71 @@ See the `example/` folder for a working example app.
To run it, in a terminal cd into the folder. Then execute `ulimit -S -n 2048`
([ref][ulimit-comment]). Then execute `flutter run` with a running emulator.

## Preconfigured offline maps
## Downloading and caching offline maps

This method is only to use preconfigured and prepackaged offline maps. For
advanced caching and ability to dynamically download an area, see the
[flutter_map_tile_caching][flutter_map_tile_caching] plugin.
This section provides an overview of the available caching tile providers. If
you would like to provide preconfigured and prepackaged map tiles to your app
users, see the 'Preconfigured Offline Maps' section below.

First, find which tiles you would like to use through a service such as
[tilemill][tilemill]. You should have tiles exported into the `.mbtiles` format.
The two available options included in flutter_map

Then use [mbtilesToPng][mbtilesToPngs] to unpack into `/{z}/{x}/{y}.png`. Move
this to the assets folder and add the asset directories to `pubspec.yaml`. The
minimum required fields for offline maps are:
### 1. Use `NetworkImage` by using `NonCachingNetworkTileProvider`

Whilst the name might make you think differently, it is designed to prevent you
from using it and expecting it to cache; because it doesn't.

The `FlutterMap` `NonCachingNetworkTileProvider` implementaion uses
`NetworkImage` which should cache images in memory until the app restart
(through `Image.network`). See the [Image.network][Image.network] docs and
[NetworkImage][NetworkImage-caching] docs for more details.

### 2. Using the `cached_network_image` dependency

This dependency has an `ImageProvider` that caches images to disk, which means
the cache persists through an app restart. You'll need to [include the
package](https://pub.dev/packages/cached_network_image/install) in your
`pubspec.yaml`.

Create your own provider using the code below:
```dart
import 'package:cached_network_image/cached_network_image.dart';
class CachedTileProvider extends TileProvider {
const CachedTileProvider();
@override
ImageProvider getImage(Coords<num> coords, TileLayerOptions options) {
return CachedNetworkImageProvider(
getTileUrl(coords, options),
//Now you can set options that determine how the image gets cached via whichever plugin you use.
);
}
}
```
Then, add the `CachedTileProvider` `TileProvider` to the appropriate
`TileLayerOptions`:

```dart
TileLayerOptions(
urlTemplate: 'https://example.com/{x}/{y}/{z}',
tileProvider: const CachedTileProvider()
)
```

## Offline Maps using TileMill

This section provides instructions for preconfigured and prepackaged offline
maps. To see how to setup caching and downloading, see the 'Dynamically
Downloading & Caching Offline Maps' section above.

This guide uses an open source program called [TileMill][tilemill-homepage].

First, [install TileMill][install-tilemill] on your machine. Then, follow [these
instructions][tilemill].

Once you have your map exported to `.mbtiles`, you can use
[mbtilesToPng][mbTilesToPngs] to unpack into `/{z}/{x}/{y}.png`.

Move this to assets folder and add the appropriate asset directories to
`pubspec.yaml`. Minimum required fields for this solution are:

```dart
Widget build(ctx) {
Expand Down Expand Up @@ -300,13 +353,17 @@ See also `FileTileProvider()`, which loads tiles from the filesystem.
For the latest roadmap, please see the [Issue Tracker]

[Issue Tracker]: https://github.com/johnpryan/flutter_map/issues
[Leaflet]: http://leafletjs.com/
[Leaflet]: https://leafletjs.com/
[Mapbox]: https://www.mapbox.com/
[azure-maps-instructions]: https://docs.microsoft.com/en-us/azure/azure-maps/quick-demo-map-app
[custom-crs-readme]: ./example/lib/pages/custom_crs/Readme.md
[flutter_map_tile_caching]: https://github.com/JaffaKetchup/flutter_map_tile_caching
[mbTilesToPng]: https://github.com/alfanhui/mbtilesToPngs
[open-street-map]: https://openstreetmap.org
[proj4dart]: https://github.com/maRci002/proj4dart
[tilemill]: https://tilemill-project.github.io/tilemill/docs/guides/osm-bright-mac-quickstart/
[install-tilemill]: https://tilemill-project.github.io/tilemill/docs/install/
[ulimit-comment]: https://github.com/trentpiercy/trace/issues/1#issuecomment-404494469
[proj4dart]: https://github.com/maRci002/proj4dart
[Image.network]: https://api.flutter.dev/flutter/widgets/Image/Image.network.html
[NetworkImage-caching]: https://flutter.dev/docs/cookbook/images/network-image#placeholders-and-caching
[tilemill-homepage]: https://tilemill-project.github.io/tilemill/
1 change: 1 addition & 0 deletions analysis_options.yaml
Expand Up @@ -36,6 +36,7 @@ linter:
- prefer_null_aware_operators
- prefer_single_quotes
- prefer_typing_uninitialized_variables
- sort_pub_dependencies
- test_types_in_equals
- throw_in_finally
- unnecessary_brace_in_string_interps
Expand Down
1 change: 1 addition & 0 deletions example/ios/Flutter/Debug.xcconfig
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 1 addition & 0 deletions example/ios/Flutter/Release.xcconfig
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
68 changes: 68 additions & 0 deletions example/ios/Runner.xcodeproj/project.pbxproj
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
127B2300FA5CE87549434CC2 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A72EECE5117AE803156E244 /* Pods_Runner.framework */; };
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
Expand All @@ -31,7 +32,9 @@
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3A72EECE5117AE803156E244 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
4928082F7E2BC0BADA4A6955 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
Expand All @@ -42,19 +45,41 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
CF9AFCBF84244C1D44C2E795 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
E1DF330ADC8450B8B567025E /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
127B2300FA5CE87549434CC2 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
13FB0627975E846BA76A343C /* Pods */ = {
isa = PBXGroup;
children = (
CF9AFCBF84244C1D44C2E795 /* Pods-Runner.debug.xcconfig */,
4928082F7E2BC0BADA4A6955 /* Pods-Runner.release.xcconfig */,
E1DF330ADC8450B8B567025E /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
1DB0744A0D67D7FBC7C14ADA /* Frameworks */ = {
isa = PBXGroup;
children = (
3A72EECE5117AE803156E244 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
Expand All @@ -72,6 +97,8 @@
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
13FB0627975E846BA76A343C /* Pods */,
1DB0744A0D67D7FBC7C14ADA /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -105,12 +132,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
2655651DCB6AEB0882B90CC1 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
C1C85694F6D3CCB2E45E23F9 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -169,6 +198,28 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
2655651DCB6AEB0882B90CC1 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -197,6 +248,23 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
C1C85694F6D3CCB2E45E23F9 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
3 changes: 3 additions & 0 deletions example/ios/Runner.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions example/lib/main.dart
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_map_example/pages/network_tile_provider.dart';

import './pages/animated_map_controller.dart';
import './pages/circle.dart';
Expand Down Expand Up @@ -40,6 +41,7 @@ class MyApp extends StatelessWidget {
),
home: HomePage(),
routes: <String, WidgetBuilder>{
NetworkTileProviderPage.route: (context) => NetworkTileProviderPage(),
WidgetsPage.route: (context) => WidgetsPage(),
TapToAddPage.route: (context) => TapToAddPage(),
EsriPage.route: (context) => EsriPage(),
Expand Down
2 changes: 1 addition & 1 deletion example/lib/pages/animated_map_controller.dart
Expand Up @@ -29,7 +29,7 @@ class AnimatedMapControllerPageState extends State<AnimatedMapControllerPage>
static LatLng paris = LatLng(48.8566, 2.3522);
static LatLng dublin = LatLng(53.3498, -6.2603);

MapController mapController;
late final MapController mapController;

@override
void initState() {
Expand Down
12 changes: 6 additions & 6 deletions example/lib/pages/custom_crs/custom_crs.dart
Expand Up @@ -14,30 +14,30 @@ class CustomCrsPage extends StatefulWidget {
}

class _CustomCrsPageState extends State<CustomCrsPage> {
Proj4Crs epsg3413CRS;
late final Proj4Crs epsg3413CRS;

double maxZoom;
double? maxZoom;

// Define start center
proj4.Point point = proj4.Point(x: 65.05166470332148, y: -19.171744826394896);

String initText = 'Map centered to';

proj4.Projection epsg4326;
late final proj4.Projection epsg4326;

proj4.Projection epsg3413;
late final proj4.Projection epsg3413;

@override
void initState() {
super.initState();

// EPSG:4326 is a predefined projection ships with proj4dart
epsg4326 = proj4.Projection('EPSG:4326');
epsg4326 = proj4.Projection.get('EPSG:4326')!;

// EPSG:3413 is a user-defined projection from a valid Proj4 definition string
// From: http://epsg.io/3413, proj definition: http://epsg.io/3413.proj4
// Find Projection by name or define it if not exists
epsg3413 = proj4.Projection('EPSG:3413') ??
epsg3413 = proj4.Projection.get('EPSG:3413') ??
proj4.Projection.add('EPSG:3413',
'+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs');

Expand Down
6 changes: 3 additions & 3 deletions example/lib/pages/interactive_test_page.dart
Expand Up @@ -16,12 +16,12 @@ class InteractiveTestPage extends StatefulWidget {
}

class _InteractiveTestPageState extends State<InteractiveTestPage> {
MapController mapController;
late final MapController mapController;

// Enable pinchZoom and doubleTapZoomBy by default
int flags = InteractiveFlag.pinchZoom | InteractiveFlag.doubleTapZoom;

StreamSubscription<MapEvent> subscription;
late final StreamSubscription<MapEvent> subscription;

@override
void initState() {
Expand Down Expand Up @@ -159,7 +159,7 @@ class _InteractiveTestPageState extends State<InteractiveTestPage> {
}

return Text(
'Current event: ${snapshot.data.runtimeType}\nSource: ${snapshot.data.source}',
'Current event: ${snapshot.data.runtimeType}\nSource: ${snapshot.data!.source}',
textAlign: TextAlign.center,
);
},
Expand Down