diff --git a/app/lib/widget/viewer_detail_pane.dart b/app/lib/widget/viewer_detail_pane.dart index 9248ef59..2d93cddf 100644 --- a/app/lib/widget/viewer_detail_pane.dart +++ b/app/lib/widget/viewer_detail_pane.dart @@ -355,7 +355,7 @@ class _ViewerDetailPaneState extends State { height: 256, child: ValueStreamBuilder( stream: context.read().gpsMapProvider, - builder: (context, gpsMapProvider) => GpsMap( + builder: (context, gpsMapProvider) => StaticMap( providerHint: gpsMapProvider.requireData, location: CameraPosition(center: _gps!, zoom: 16), onTap: _onMapTap, diff --git a/np_gps_map/lib/np_gps_map.dart b/np_gps_map/lib/np_gps_map.dart index 00f47d03..979ba137 100644 --- a/np_gps_map/lib/np_gps_map.dart +++ b/np_gps_map/lib/np_gps_map.dart @@ -1,7 +1,7 @@ library np_gps_map; -export 'src/gps_map.dart'; export 'src/interactive_map.dart'; export 'src/place_picker.dart'; +export 'src/static_map.dart'; export 'src/type.dart'; export 'src/util.dart' show initGpsMap; diff --git a/np_gps_map/lib/src/interactive_map.dart b/np_gps_map/lib/src/interactive_map.dart index 369175ec..c3fdc027 100644 --- a/np_gps_map/lib/src/interactive_map.dart +++ b/np_gps_map/lib/src/interactive_map.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:np_gps_map/src/gps_map.dart'; import 'package:np_gps_map/src/interactive_map/google.dart'; import 'package:np_gps_map/src/interactive_map/osm.dart'; import 'package:np_gps_map/src/type.dart'; diff --git a/np_gps_map/lib/src/place_picker.dart b/np_gps_map/lib/src/place_picker.dart index 612efc95..5a2bda2d 100644 --- a/np_gps_map/lib/src/place_picker.dart +++ b/np_gps_map/lib/src/place_picker.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:np_gps_map/src/gps_map.dart'; import 'package:np_gps_map/src/interactive_map.dart'; import 'package:np_gps_map/src/type.dart'; diff --git a/np_gps_map/lib/src/gps_map.dart b/np_gps_map/lib/src/static_map.dart similarity index 91% rename from np_gps_map/lib/src/gps_map.dart rename to np_gps_map/lib/src/static_map.dart index 1030c802..b78750eb 100644 --- a/np_gps_map/lib/src/gps_map.dart +++ b/np_gps_map/lib/src/static_map.dart @@ -6,14 +6,8 @@ import 'package:np_gps_map/src/type.dart'; import 'package:np_gps_map/src/util.dart'; import 'package:np_platform_util/np_platform_util.dart'; -enum GpsMapProvider { - google, - osm, - ; -} - -class GpsMap extends StatelessWidget { - const GpsMap({ +class StaticMap extends StatelessWidget { + const StaticMap({ super.key, required this.providerHint, required this.location, diff --git a/np_gps_map/lib/src/type.dart b/np_gps_map/lib/src/type.dart index e6be7f4f..4607f58c 100644 --- a/np_gps_map/lib/src/type.dart +++ b/np_gps_map/lib/src/type.dart @@ -3,6 +3,12 @@ import 'package:google_maps_flutter/google_maps_flutter.dart' as gmap; import 'package:latlong2/latlong.dart'; import 'package:np_common/type.dart'; +enum GpsMapProvider { + google, + osm, + ; +} + /// A pair of latitude and longitude coordinates, stored as degrees class MapCoord { const MapCoord(this.latitude, this.longitude);