From 046ffc5c20edfd7e03f7c02c179c870fa48205a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nick=20=C3=98stergaard?= Date: Tue, 1 Dec 2020 19:01:48 +0100 Subject: [PATCH 1/2] Add new required environment spec Otherwise flutter throws an error and abort building. Fixes #774 --- example/pubspec.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index ba334d16f..3423937b1 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,6 +1,9 @@ name: flutter_map_example description: A new Flutter project. +environment: + sdk: '>=2.10.0 <3.0.0' + dependencies: flutter: sdk: flutter From 3dd6c85562a2f68fbeb1738f5a197a27d22ff15a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nick=20=C3=98stergaard?= Date: Tue, 1 Dec 2020 19:02:50 +0100 Subject: [PATCH 2/2] Update usage of API for text colors As suggested by joselbr2099 the API have changed in flutter. Replace only colors parameter with textColor. Fixes #774 --- example/lib/pages/animated_map_controller.dart | 4 ++-- example/lib/pages/home.dart | 6 +++--- example/lib/pages/live_location.dart | 2 +- example/lib/pages/map_controller.dart | 4 ++-- example/lib/pages/marker_anchor.dart | 4 ++-- example/lib/pages/on_tap.dart | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/example/lib/pages/animated_map_controller.dart b/example/lib/pages/animated_map_controller.dart index 91af3e95a..593601217 100644 --- a/example/lib/pages/animated_map_controller.dart +++ b/example/lib/pages/animated_map_controller.dart @@ -90,7 +90,7 @@ class AnimatedMapControllerPageState extends State builder: (ctx) => Container( child: FlutterLogo( key: Key('green'), - colors: Colors.green, + textColor: Colors.green, ), ), ), @@ -100,7 +100,7 @@ class AnimatedMapControllerPageState extends State point: paris, builder: (ctx) => Container( key: Key('purple'), - child: FlutterLogo(colors: Colors.purple), + child: FlutterLogo(textColor: Colors.purple), ), ), ]; diff --git a/example/lib/pages/home.dart b/example/lib/pages/home.dart index ef4144314..621a3fbc3 100644 --- a/example/lib/pages/home.dart +++ b/example/lib/pages/home.dart @@ -16,7 +16,7 @@ class HomePage extends StatelessWidget { point: LatLng(51.5, -0.09), builder: (ctx) => Container( child: FlutterLogo( - colors: Colors.blue, + textColor: Colors.blue, key: ObjectKey(Colors.blue), ), ), @@ -27,7 +27,7 @@ class HomePage extends StatelessWidget { point: LatLng(53.3498, -6.2603), builder: (ctx) => Container( child: FlutterLogo( - colors: Colors.green, + textColor: Colors.green, key: ObjectKey(Colors.green), ), ), @@ -38,7 +38,7 @@ class HomePage extends StatelessWidget { point: LatLng(48.8566, 2.3522), builder: (ctx) => Container( child: FlutterLogo( - colors: Colors.purple, + textColor: Colors.purple, key: ObjectKey(Colors.purple), ), ), diff --git a/example/lib/pages/live_location.dart b/example/lib/pages/live_location.dart index 25666bc21..9d1c3aa1d 100644 --- a/example/lib/pages/live_location.dart +++ b/example/lib/pages/live_location.dart @@ -105,7 +105,7 @@ class _LiveLocationPageState extends State { point: currentLatLng, builder: (ctx) => Container( child: FlutterLogo( - colors: Colors.blue, + textColor: Colors.blue, key: ObjectKey(Colors.blue), ), ), diff --git a/example/lib/pages/map_controller.dart b/example/lib/pages/map_controller.dart index ba622c16b..4bd1d25e1 100644 --- a/example/lib/pages/map_controller.dart +++ b/example/lib/pages/map_controller.dart @@ -48,7 +48,7 @@ class MapControllerPageState extends State { builder: (ctx) => Container( child: FlutterLogo( key: Key('green'), - colors: Colors.green, + textColor: Colors.green, ), ), ), @@ -58,7 +58,7 @@ class MapControllerPageState extends State { point: paris, builder: (ctx) => Container( key: Key('purple'), - child: FlutterLogo(colors: Colors.purple), + child: FlutterLogo(textColor: Colors.purple), ), ), ]; diff --git a/example/lib/pages/marker_anchor.dart b/example/lib/pages/marker_anchor.dart index c92dc08fa..f8dfb89c5 100644 --- a/example/lib/pages/marker_anchor.dart +++ b/example/lib/pages/marker_anchor.dart @@ -51,7 +51,7 @@ class MarkerAnchorPageState extends State { point: LatLng(53.3498, -6.2603), builder: (ctx) => Container( child: FlutterLogo( - colors: Colors.green, + textColor: Colors.green, ), ), anchorPos: anchorPos, @@ -61,7 +61,7 @@ class MarkerAnchorPageState extends State { height: 80.0, point: LatLng(48.8566, 2.3522), builder: (ctx) => Container( - child: FlutterLogo(colors: Colors.purple), + child: FlutterLogo(textColor: Colors.purple), ), anchorPos: anchorPos, ), diff --git a/example/lib/pages/on_tap.dart b/example/lib/pages/on_tap.dart index 5e9dad0c2..71ccb546f 100644 --- a/example/lib/pages/on_tap.dart +++ b/example/lib/pages/on_tap.dart @@ -48,7 +48,7 @@ class OnTapPageState extends State { )); }, child: FlutterLogo( - colors: Colors.green, + textColor: Colors.green, ), )), ), @@ -63,7 +63,7 @@ class OnTapPageState extends State { content: Text('Tapped on purple FlutterLogo Marker'), )); }, - child: FlutterLogo(colors: Colors.purple), + child: FlutterLogo(textColor: Colors.purple), )), ), ];