diff --git a/example/lib/main.dart b/example/lib/main.dart index 8ed427d..9e66bd5 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,6 +1,5 @@ import 'dart:async'; import 'dart:math'; -import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart' show rootBundle; diff --git a/example/pubspec.lock b/example/pubspec.lock index bedfe3c..ac2605d 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -184,6 +184,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" meta: dependency: transitive description: @@ -272,7 +279,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.3" + version: "0.4.8" typed_data: dependency: transitive description: diff --git a/lib/google_track_trace.dart b/lib/google_track_trace.dart index 299169c..4423771 100644 --- a/lib/google_track_trace.dart +++ b/lib/google_track_trace.dart @@ -7,9 +7,9 @@ import 'dart:math'; import 'dart:typed_data'; import 'dart:ui' as ui; -import 'package:flutter/cupertino.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; import 'package:flutter_polyline_points/flutter_polyline_points.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:http/http.dart' as http; diff --git a/lib/src/directions_repository.dart b/lib/src/directions_repository.dart index 5365f90..b6b6bc8 100644 --- a/lib/src/directions_repository.dart +++ b/lib/src/directions_repository.dart @@ -38,7 +38,8 @@ class DirectionsRepository { debugPrint(e.message); } throw GoogleMapsException( - 'Unable to retrieve directions from Google Maps API',); + 'Unable to retrieve directions from Google Maps API', + ); } } diff --git a/lib/src/google_map.dart b/lib/src/google_map.dart index 2a5b00a..da125a3 100644 --- a/lib/src/google_map.dart +++ b/lib/src/google_map.dart @@ -114,6 +114,9 @@ class _GoogleTrackTraceMapState extends State { @override Widget build(BuildContext context) { return GoogleMap( + gestureRecognizers: { + Factory(() => EagerGestureRecognizer()) + }, initialCameraPosition: calculateCameraPosition( controller.start.position, controller.end.position,