From ddbd1f78ffe97dca8c2918731950300fa3ebd71e Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Sun, 12 Nov 2023 14:03:55 +0000 Subject: [PATCH 1/4] Removed all leftover deprecated symbols Minor refactoring of example app Live Web Demo introduction dialog --- example/lib/pages/home.dart | 156 ++++++++------- lib/flutter_map.dart | 1 - .../flutter_map_interactive_viewer.dart | 6 +- .../tile_layer/tile_error_evict_callback.dart | 10 - lib/src/layer/tile_layer/tile_layer.dart | 38 +--- lib/src/map/camera/camera.dart | 14 -- lib/src/map/controller/impl.dart | 130 ------------ lib/src/map/controller/map_controller.dart | 95 --------- lib/src/map/options/interaction.dart | 12 -- lib/src/map/options/options.dart | 189 +----------------- lib/src/map/widget.dart | 59 +----- lib/src/misc/fit_bounds_options.dart | 25 --- lib/src/misc/point_extensions.dart | 29 --- 13 files changed, 94 insertions(+), 670 deletions(-) delete mode 100644 lib/src/misc/fit_bounds_options.dart diff --git a/example/lib/pages/home.dart b/example/lib/pages/home.dart index 25c5cf533..884d9939d 100644 --- a/example/lib/pages/home.dart +++ b/example/lib/pages/home.dart @@ -20,80 +20,7 @@ class _HomePageState extends State { @override void initState() { super.initState(); - - const seenIntroBoxKey = 'seenIntroBox(a)'; - if (kIsWeb && Uri.base.host.trim() == 'demo.fleaflet.dev') { - SchedulerBinding.instance.addPostFrameCallback( - (_) async { - final prefs = await SharedPreferences.getInstance(); - if (prefs.getBool(seenIntroBoxKey) ?? false) return; - - if (!mounted) return; - - final width = MediaQuery.of(context).size.width; - await showDialog( - context: context, - builder: (context) => AlertDialog( - icon: UnconstrainedBox( - child: SizedBox.square( - dimension: 64, - child: - Image.asset('assets/ProjectIcon.png', fit: BoxFit.fill), - ), - ), - title: const Text('flutter_map Live Web Demo'), - content: ConstrainedBox( - constraints: BoxConstraints( - maxWidth: width < 750 - ? double.infinity - : (width / (width < 1100 ? 1.5 : 2.5)), - ), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Text( - "This is built automatically off of the latest commits to 'master', so may not reflect the latest release available on pub.dev.\nThis is hosted on Firebase Hosting, meaning there's limited bandwidth to share between all users, so please keep loads to a minimum.", - textAlign: TextAlign.center, - ), - Padding( - padding: - const EdgeInsets.only(right: 8, top: 16, bottom: 4), - child: Align( - alignment: Alignment.centerRight, - child: Text( - "This won't be shown again", - style: TextStyle( - color: Theme.of(context) - .colorScheme - .inverseSurface - .withOpacity(0.5), - ), - textAlign: TextAlign.right, - ), - ), - ), - ], - ), - ), - actions: [ - TextButton.icon( - onPressed: () => Navigator.of(context).pop(), - label: const Text('OK'), - icon: const Icon(Icons.done), - ), - ], - contentPadding: const EdgeInsets.only( - left: 24, - top: 16, - bottom: 0, - right: 24, - ), - ), - ); - await prefs.setBool(seenIntroBoxKey, true); - }, - ); - } + _displayWebDemoIntroDialog(); } @override @@ -121,7 +48,6 @@ class _HomePageState extends State { RichAttributionWidget( popupInitialDisplayDuration: const Duration(seconds: 5), animationConfig: const ScaleRAWA(), - showFlutterMapAttribution: false, attributions: [ TextSourceAttribution( 'OpenStreetMap contributors', @@ -168,4 +94,84 @@ class _HomePageState extends State { ), ); } + + // Displays an introduction dialog when the Live Web Demo is first loaded for + // a user + void _displayWebDemoIntroDialog() { + // Changing this will cause the dialog to show again for all users + const seenIntroDialogKey = 'seenIntroDialog'; + + if (kIsWeb && Uri.base.host.trim() == 'demo.fleaflet.dev') { + SchedulerBinding.instance.addPostFrameCallback( + (_) async { + final prefs = await SharedPreferences.getInstance(); + if (prefs.getBool(seenIntroDialogKey) ?? false) return; + + if (!mounted) return; + + final width = MediaQuery.of(context).size.width; + await showDialog( + context: context, + builder: (context) => AlertDialog( + icon: UnconstrainedBox( + child: SizedBox.square( + dimension: 64, + child: + Image.asset('assets/ProjectIcon.png', fit: BoxFit.fill), + ), + ), + title: const Text('flutter_map Live Web Demo'), + content: ConstrainedBox( + constraints: BoxConstraints( + maxWidth: width < 750 + ? double.infinity + : (width / (width < 1100 ? 1.5 : 2.5)), + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + const Text( + "This is built automatically off of the latest commits to 'master', so may not reflect the latest release available on pub.dev.\nThis is hosted on Firebase Hosting, meaning there's limited bandwidth to share between all users, so please keep loads to a minimum.", + textAlign: TextAlign.center, + ), + Padding( + padding: + const EdgeInsets.only(right: 8, top: 16, bottom: 4), + child: Align( + alignment: Alignment.centerRight, + child: Text( + "This won't be shown again", + style: TextStyle( + color: Theme.of(context) + .colorScheme + .inverseSurface + .withOpacity(0.5), + ), + textAlign: TextAlign.right, + ), + ), + ), + ], + ), + ), + actions: [ + TextButton.icon( + onPressed: () => Navigator.of(context).pop(), + label: const Text('OK'), + icon: const Icon(Icons.done), + ), + ], + contentPadding: const EdgeInsets.only( + left: 24, + top: 16, + bottom: 0, + right: 24, + ), + ), + ); + await prefs.setBool(seenIntroDialogKey, true); + }, + ); + } + } } diff --git a/lib/flutter_map.dart b/lib/flutter_map.dart index 56474a837..aad7d80b8 100644 --- a/lib/flutter_map.dart +++ b/lib/flutter_map.dart @@ -57,7 +57,6 @@ export 'package:flutter_map/src/map/options/options.dart'; export 'package:flutter_map/src/map/widget.dart'; export 'package:flutter_map/src/misc/bounds.dart'; export 'package:flutter_map/src/misc/center_zoom.dart'; -export 'package:flutter_map/src/misc/fit_bounds_options.dart'; export 'package:flutter_map/src/misc/move_and_rotate_result.dart'; export 'package:flutter_map/src/misc/point_extensions.dart'; export 'package:flutter_map/src/misc/position.dart'; diff --git a/lib/src/gestures/flutter_map_interactive_viewer.dart b/lib/src/gestures/flutter_map_interactive_viewer.dart index 8fac4ec3c..98598cb28 100644 --- a/lib/src/gestures/flutter_map_interactive_viewer.dart +++ b/lib/src/gestures/flutter_map_interactive_viewer.dart @@ -388,10 +388,8 @@ class FlutterMapInteractiveViewerState void _onPointerSignal(PointerSignalEvent pointerSignal) { // Handle mouse scroll events if the enableScrollWheel parameter is enabled if (pointerSignal is PointerScrollEvent && - (InteractiveFlag.hasFlag( - _interactionOptions.flags, InteractiveFlag.scrollWheelZoom) || - // ignore: deprecated_member_use_from_same_package - _interactionOptions.enableScrollWheel) && + InteractiveFlag.hasFlag( + _interactionOptions.flags, InteractiveFlag.scrollWheelZoom) && pointerSignal.scrollDelta.dy != 0) { // Prevent scrolling of parent/child widgets simultaneously. See // [PointerSignalResolver] documentation for more information. diff --git a/lib/src/layer/tile_layer/tile_error_evict_callback.dart b/lib/src/layer/tile_layer/tile_error_evict_callback.dart index e5a88c264..a67d08bb7 100644 --- a/lib/src/layer/tile_layer/tile_error_evict_callback.dart +++ b/lib/src/layer/tile_layer/tile_error_evict_callback.dart @@ -1,15 +1,5 @@ part of 'tile_layer.dart'; -@Deprecated( - 'Prefer creating a custom `TileProvider` instead. ' - 'This option has been deprecated as it is out of scope for the `TileLayer`. ' - 'This option is deprecated since v6.', -) -typedef TemplateFunction = String Function( - String str, - Map data, -); - enum EvictErrorTileStrategy { /// Never evict images for tiles which failed to load. none, diff --git a/lib/src/layer/tile_layer/tile_layer.dart b/lib/src/layer/tile_layer/tile_layer.dart index 02c415958..92dc32f1c 100644 --- a/lib/src/layer/tile_layer/tile_layer.dart +++ b/lib/src/layer/tile_layer/tile_layer.dart @@ -135,14 +135,6 @@ class TileLayer extends StatefulWidget { // Defaults to TileDisplay.fadeIn(). final TileDisplay tileDisplay; - /// Color shown behind the tiles - @Deprecated( - 'Prefer `MapOptions.backgroundColor`. ' - 'This property has been removed simplify interaction when using multiple `TileLayer`s. ' - 'This property is deprecated since v6.', - ) - final Color? backgroundColor; - /// Provider with which to load map tiles /// /// The default is [NetworkTileProvider] which supports both IO and web @@ -199,13 +191,6 @@ class TileLayer extends StatefulWidget { /// This callback will be executed if an error occurs when fetching tiles. final ErrorTileCallBack? errorTileCallback; - @Deprecated( - 'Prefer creating a custom `TileProvider` instead. ' - 'This option has been deprecated as it is out of scope for the `TileLayer`. ' - 'This option is deprecated since v6.', - ) - final TemplateFunction? templateFunction; - /// Function which may Wrap Tile with custom Widget /// There are predefined examples in 'tile_builder.dart' final TileBuilder? tileBuilder; @@ -250,12 +235,6 @@ class TileLayer extends StatefulWidget { this.subdomains = const ['a', 'b', 'c'], this.keepBuffer = 2, this.panBuffer = 1, - @Deprecated( - 'Prefer `MapOptions.backgroundColor`. ' - 'This property has been removed simplify interaction when using multiple `TileLayer`s. ' - 'This property is deprecated since v6.', - ) - this.backgroundColor, this.errorImage, final TileProvider? tileProvider, this.tms = false, @@ -267,12 +246,6 @@ class TileLayer extends StatefulWidget { /// Defaults to `false` when `null`. final bool? retinaMode, this.errorTileCallback, - @Deprecated( - 'Prefer creating a custom `TileProvider` instead. ' - 'This option has been deprecated as it is out of scope for the `TileLayer`. ' - 'This option is deprecated since v6.', - ) - this.templateFunction, this.tileBuilder, this.evictErrorTileStrategy = EvictErrorTileStrategy.none, this.reset, @@ -570,19 +543,10 @@ class _TileLayerState extends State with TickerProviderStateMixin { } return MobileLayerTransformer( - // ignore: deprecated_member_use_from_same_package - child: _addBackgroundColor( - Stack(children: tiles..sort(renderOrder)), - ), + child: Stack(children: tiles..sort(renderOrder)), ); } - @Deprecated('Remove once `backgroundColor` is removed') - Widget _addBackgroundColor(Widget child) { - final color = widget.backgroundColor; - return color == null ? child : ColoredBox(color: color, child: child); - } - TileImage _createTileImage({ required TileCoordinates coordinates, required TileBoundsAtZoom tileBoundsAtZoom, diff --git a/lib/src/map/camera/camera.dart b/lib/src/map/camera/camera.dart index c02392a69..edf731b59 100644 --- a/lib/src/map/camera/camera.dart +++ b/lib/src/map/camera/camera.dart @@ -37,13 +37,6 @@ class MapCamera { /// value in radians. final double rotation; - @Deprecated( - 'Prefer `nonRotatedSize`. ' - 'This getter has been changed to fix the capitalization. ' - 'This getter is deprecated since v6.', - ) - Point get nonrotatedSize => nonRotatedSize; - /// The size of the map view ignoring rotation. This will be the size of the /// FlutterMap widget. final Point nonRotatedSize; @@ -63,13 +56,6 @@ class MapCamera { /// Lazily calculated field double? _rotationRad; - @Deprecated( - 'Prefer `visibleBounds`. ' - 'This getter has been changed to clarify its meaning. ' - 'This getter is deprecated since v6.', - ) - LatLngBounds get bounds => visibleBounds; - /// This is the [LatLngBounds] corresponding to four corners of this camera. /// This takes rotation in to account. LatLngBounds get visibleBounds => _bounds ??= LatLngBounds( diff --git a/lib/src/map/controller/impl.dart b/lib/src/map/controller/impl.dart index e54085a1d..900cacff6 100644 --- a/lib/src/map/controller/impl.dart +++ b/lib/src/map/controller/impl.dart @@ -2,16 +2,12 @@ import 'dart:async'; import 'dart:math'; import 'package:flutter/widgets.dart'; -import 'package:flutter_map/src/geo/latlng_bounds.dart'; import 'package:flutter_map/src/gestures/map_events.dart'; import 'package:flutter_map/src/map/camera/camera.dart'; import 'package:flutter_map/src/map/camera/camera_fit.dart'; import 'package:flutter_map/src/map/controller/internal.dart'; import 'package:flutter_map/src/map/controller/map_controller.dart'; -import 'package:flutter_map/src/misc/center_zoom.dart'; -import 'package:flutter_map/src/misc/fit_bounds_options.dart'; import 'package:flutter_map/src/misc/move_and_rotate_result.dart'; -import 'package:flutter_map/src/misc/point_extensions.dart'; import 'package:latlong2/latlong.dart'; /// Implements [MapController] whilst exposing methods for internal use which @@ -98,132 +94,6 @@ class MapControllerImpl implements MapController { @override MapCamera get camera => _internalController.camera; - @override - @Deprecated( - 'Prefer `fitCamera` with a CameraFit.bounds() or CameraFit.insideBounds() instead. ' - 'This method has been changed to use the new `CameraFit` classes which allows different kinds of fit. ' - 'This method is deprecated since v6.', - ) - bool fitBounds( - LatLngBounds bounds, { - FitBoundsOptions options = - const FitBoundsOptions(padding: EdgeInsets.all(12)), - }) => - fitCamera( - options.inside - ? CameraFit.insideBounds( - bounds: bounds, - padding: options.padding, - maxZoom: options.maxZoom, - forceIntegerZoomLevel: options.forceIntegerZoomLevel, - ) - : CameraFit.bounds( - bounds: bounds, - padding: options.padding, - maxZoom: options.maxZoom, - forceIntegerZoomLevel: options.forceIntegerZoomLevel, - ), - ); - - @override - @Deprecated( - 'Prefer `CameraFit.bounds(bounds: bounds).fit(controller.camera)` or `CameraFit.insideBounds(bounds: bounds).fit(controller.camera)`. ' - 'This method is replaced by applying a CameraFit to the MapCamera. ' - 'This method is deprecated since v6.', - ) - CenterZoom centerZoomFitBounds( - LatLngBounds bounds, { - FitBoundsOptions options = - const FitBoundsOptions(padding: EdgeInsets.all(12)), - }) { - final cameraFit = options.inside - ? CameraFit.insideBounds( - bounds: bounds, - padding: options.padding, - maxZoom: options.maxZoom, - forceIntegerZoomLevel: options.forceIntegerZoomLevel, - ) - : CameraFit.bounds( - bounds: bounds, - padding: options.padding, - maxZoom: options.maxZoom, - forceIntegerZoomLevel: options.forceIntegerZoomLevel, - ); - - final fittedState = cameraFit.fit(camera); - return CenterZoom( - center: fittedState.center, - zoom: fittedState.zoom, - ); - } - - @override - @Deprecated( - 'Prefer `controller.camera.pointToLatLng()`. ' - 'This method is now accessible via the camera. ' - 'This method is deprecated since v6.', - ) - LatLng pointToLatLng(Point screenPoint) => - camera.pointToLatLng(screenPoint); - - @override - @Deprecated( - 'Prefer `controller.camera.latLngToScreenPoint()`. ' - 'This method is now accessible via the camera. ' - 'This method is deprecated since v6.', - ) - Point latLngToScreenPoint(LatLng mapCoordinate) => - camera.latLngToScreenPoint(mapCoordinate); - - @override - @Deprecated( - 'Prefer `controller.camera.rotatePoint()`. ' - 'This method is now accessible via the camera. ' - 'This method is deprecated since v6.', - ) - Point rotatePoint( - Point mapCenter, - Point point, { - bool counterRotation = true, - }) => - camera.rotatePoint( - mapCenter.toDoublePoint(), - point.toDoublePoint(), - counterRotation: counterRotation, - ); - - @override - @Deprecated( - 'Prefer `controller.camera.center`. ' - 'This getter is now accessible via the camera. ' - 'This getter is deprecated since v6.', - ) - LatLng get center => camera.center; - - @override - @Deprecated( - 'Prefer `controller.camera.visibleBounds`. ' - 'This getter is now accessible via the camera. ' - 'This getter is deprecated since v6.', - ) - LatLngBounds? get bounds => camera.visibleBounds; - - @override - @Deprecated( - 'Prefer `controller.camera.zoom`. ' - 'This getter is now accessible via the camera. ' - 'This getter is deprecated since v6.', - ) - double get zoom => camera.zoom; - - @override - @Deprecated( - 'Prefer `controller.camera.rotation`. ' - 'This getter is now accessible via the camera. ' - 'This getter is deprecated since v6.', - ) - double get rotation => camera.rotation; - @override void dispose() { _mapEventStreamController.close(); diff --git a/lib/src/map/controller/map_controller.dart b/lib/src/map/controller/map_controller.dart index 7b3b46d71..9ffb23bae 100644 --- a/lib/src/map/controller/map_controller.dart +++ b/lib/src/map/controller/map_controller.dart @@ -2,15 +2,12 @@ import 'dart:async'; import 'dart:math'; import 'package:flutter/material.dart'; -import 'package:flutter_map/src/geo/latlng_bounds.dart'; import 'package:flutter_map/src/gestures/map_events.dart'; import 'package:flutter_map/src/map/camera/camera.dart'; import 'package:flutter_map/src/map/camera/camera_fit.dart'; import 'package:flutter_map/src/map/controller/impl.dart'; import 'package:flutter_map/src/map/inherited_model.dart'; import 'package:flutter_map/src/map/widget.dart'; -import 'package:flutter_map/src/misc/center_zoom.dart'; -import 'package:flutter_map/src/misc/fit_bounds_options.dart'; import 'package:flutter_map/src/misc/move_and_rotate_result.dart'; import 'package:latlong2/latlong.dart'; @@ -146,98 +143,6 @@ abstract class MapController { /// From inside a [FlutterMap]'s [BuildContext], prefer using [MapCamera.of]. MapCamera get camera; - /// Move and zoom the map to perfectly fit [bounds], with additional - /// configurable [options] - /// - /// For information about return value meaning and emitted events, see [move]'s - /// documentation. - @Deprecated( - 'Prefer `fitCamera` with a CameraFit.bounds() instead. ' - 'This method has been changed to use the new `CameraFit` classes which allows different kinds of fit. ' - 'This method is deprecated since v6.', - ) - bool fitBounds( - LatLngBounds bounds, { - FitBoundsOptions options = - const FitBoundsOptions(padding: EdgeInsets.all(12)), - }); - - /// Calculates the appropriate center and zoom level for the map to perfectly - /// fit [bounds], with additional configurable [options] - /// - /// Does not move/zoom the map: see [fitBounds]. - @Deprecated( - 'Prefer `CameraFit.bounds(bounds: bounds).fit(controller.camera)`. ' - 'This method is replaced by applying a CameraFit to the MapCamera. ' - 'This method is deprecated since v6.', - ) - CenterZoom centerZoomFitBounds( - LatLngBounds bounds, { - FitBoundsOptions options = - const FitBoundsOptions(padding: EdgeInsets.all(12)), - }); - - /// Convert a screen point (x/y) to its corresponding map coordinate (lat/lng), - /// based on the map's current properties - @Deprecated( - 'Prefer `controller.camera.pointToLatLng()`. ' - 'This method is now accessible via the camera. ' - 'This method is deprecated since v6.', - ) - LatLng pointToLatLng(Point screenPoint); - - /// Convert a map coordinate (lat/lng) to its corresponding screen point (x/y), - /// based on the map's current screen positioning - @Deprecated( - 'Prefer `controller.camera.latLngToScreenPoint()`. ' - 'This method is now accessible via the camera. ' - 'This method is deprecated since v6.', - ) - Point latLngToScreenPoint(LatLng mapCoordinate); - - @Deprecated( - 'Prefer `controller.camera.rotatePoint()`. ' - 'This method is now accessible via the camera. ' - 'This method is deprecated since v6.', - ) - Point rotatePoint( - Point mapCenter, - Point point, { - bool counterRotation = true, - }); - - /// Current center coordinates - @Deprecated( - 'Prefer `controller.camera.center`. ' - 'This getter is now accessible via the camera. ' - 'This getter is deprecated since v6.', - ) - LatLng get center; - - /// Current outer points/boundaries coordinates - @Deprecated( - 'Prefer `controller.camera.visibleBounds`. ' - 'This getter is now accessible via the camera. ' - 'This getter is deprecated since v6.', - ) - LatLngBounds? get bounds; - - /// Current zoom level - @Deprecated( - 'Prefer `controller.camera.zoom`. ' - 'This getter is now accessible via the camera. ' - 'This getter is deprecated since v6.', - ) - double get zoom; - - /// Current rotation in degrees, where 0° is North - @Deprecated( - 'Prefer `controller.camera.rotation`. ' - 'This getter is now accessible via the camera. ' - 'This getter is deprecated since v6.', - ) - double get rotation; - /// Dispose of this controller. void dispose(); } diff --git a/lib/src/map/options/interaction.dart b/lib/src/map/options/interaction.dart index ac4ba3a34..10fc0cfce 100644 --- a/lib/src/map/options/interaction.dart +++ b/lib/src/map/options/interaction.dart @@ -59,13 +59,6 @@ final class InteractionOptions { /// gestures will take effect see [MultiFingerGesture] for custom settings final int pinchMoveWinGestures; - @Deprecated( - 'Prefer `flags.scrollWheelZoom`. ' - 'This property was moved as it better suited being an `InteractiveFlag`. ' - 'This property is deprecated since v6.', - ) - final bool enableScrollWheel; - final double scrollWheelVelocity; /// Options to configure cursor/keyboard rotation @@ -94,7 +87,6 @@ final class InteractionOptions { this.pinchMoveThreshold = 40.0, this.pinchMoveWinGestures = MultiFingerGesture.pinchZoom | MultiFingerGesture.pinchMove, - this.enableScrollWheel = true, this.scrollWheelVelocity = 0.005, this.cursorKeyboardRotationOptions = const CursorKeyboardRotationOptions(), }) : assert( @@ -122,8 +114,6 @@ final class InteractionOptions { pinchZoomWinGestures == other.pinchZoomWinGestures && pinchMoveThreshold == other.pinchMoveThreshold && pinchMoveWinGestures == other.pinchMoveWinGestures && - // ignore: deprecated_member_use_from_same_package - enableScrollWheel == other.enableScrollWheel && scrollWheelVelocity == other.scrollWheelVelocity; @override @@ -137,8 +127,6 @@ final class InteractionOptions { pinchZoomWinGestures, pinchMoveThreshold, pinchMoveWinGestures, - // ignore: deprecated_member_use_from_same_package - enableScrollWheel, scrollWheelVelocity, ); } diff --git a/lib/src/map/options/options.dart b/lib/src/map/options/options.dart index cf816c8c9..900e1b8f0 100644 --- a/lib/src/map/options/options.dart +++ b/lib/src/map/options/options.dart @@ -2,10 +2,7 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_map/src/geo/crs.dart'; -import 'package:flutter_map/src/geo/latlng_bounds.dart'; -import 'package:flutter_map/src/gestures/interactive_flag.dart'; import 'package:flutter_map/src/gestures/map_events.dart'; -import 'package:flutter_map/src/gestures/multi_finger_gesture.dart'; import 'package:flutter_map/src/gestures/positioned_tap_detector_2.dart'; import 'package:flutter_map/src/layer/general/translucent_pointer.dart'; import 'package:flutter_map/src/map/camera/camera_constraint.dart'; @@ -13,7 +10,6 @@ import 'package:flutter_map/src/map/camera/camera_fit.dart'; import 'package:flutter_map/src/map/inherited_model.dart'; import 'package:flutter_map/src/map/options/interaction.dart'; import 'package:flutter_map/src/map/widget.dart'; -import 'package:flutter_map/src/misc/fit_bounds_options.dart'; import 'package:flutter_map/src/misc/position.dart'; import 'package:latlong2/latlong.dart'; @@ -58,28 +54,11 @@ class MapOptions { /// over [initialCenter]/[initialZoom]. final CameraFit? initialCameraFit; - final LatLngBounds? bounds; - final FitBoundsOptions boundsOptions; - - final bool? _debugMultiFingerGestureWinner; - final bool? _enableMultiFingerGestureRace; - final double? _rotationThreshold; - final int? _rotationWinGestures; - final double? _pinchZoomThreshold; - final int? _pinchZoomWinGestures; - final double? _pinchMoveThreshold; - final int? _pinchMoveWinGestures; - final bool? _enableScrollWheel; - final double? _scrollWheelVelocity; - final double? minZoom; final double? maxZoom; final Color backgroundColor; - /// see [InteractiveFlag] for custom settings - final int? _interactiveFlags; - final TapCallback? onTap; final TapCallback? onSecondaryTap; final LongPressCallback? onLongPress; @@ -91,7 +70,7 @@ class MapOptions { final MapEventCallback? onMapEvent; /// Define limits for viewing the map. - final CameraConstraint? _cameraConstraint; + final CameraConstraint cameraConstraint; /// OnMapReady is called after the map runs it's initState. /// At that point the map has assigned its state to the controller @@ -101,8 +80,6 @@ class MapOptions { /// In initState to controll the map before the next frame. final VoidCallback? onMapReady; - final LatLngBounds? maxBounds; - /// Flag to enable the built in keep alive functionality /// /// If the map is within a complex layout, such as a [ListView] or [PageView], @@ -127,112 +104,16 @@ class MapOptions { /// manually applied to individual layers. final bool applyPointerTranslucencyToLayers; - final InteractionOptions? _interactionOptions; + final InteractionOptions interactionOptions; const MapOptions({ this.crs = const Epsg3857(), - @Deprecated( - 'Prefer `initialCenter` instead. ' - 'This option has been renamed to clarify its meaning. ' - 'This option is deprecated since v6.', - ) - LatLng? center, - LatLng initialCenter = const LatLng(50.5, 30.51), - @Deprecated( - 'Prefer `initialZoom` instead. ' - 'This option has been renamed to clarify its meaning. ' - 'This option is deprecated since v6.', - ) - double? zoom, - double initialZoom = 13.0, - @Deprecated( - 'Prefer `initialRotation` instead. ' - 'This option has been renamed to clarify its meaning. ' - 'This option is deprecated since v6.', - ) - double? rotation, - double initialRotation = 0.0, - @Deprecated( - 'Prefer `initialCameraFit` instead. ' - 'This option is now part of `initalCameraFit`. ' - 'This option is deprecated since v6.', - ) - this.bounds, - @Deprecated( - 'Prefer `initialCameraFit` instead. ' - 'This option is now part of `initalCameraFit`. ' - 'This option is deprecated since v6.', - ) - this.boundsOptions = const FitBoundsOptions(), + this.initialCenter = const LatLng(50.5, 30.51), + this.initialZoom = 13.0, + this.initialRotation = 0.0, this.initialCameraFit, - CameraConstraint? cameraConstraint, - InteractionOptions? interactionOptions, - @Deprecated( - 'Prefer setting this in `interactionOptions`. ' - 'This option is now part of `interactionOptions` to group all interaction related options. ' - 'This option is deprecated since v6.', - ) - int? interactiveFlags, - @Deprecated( - 'Prefer setting this in `interactionOptions`. ' - 'This option is now part of `interactionOptions` to group all interaction related options. ' - 'This option is deprecated since v6.', - ) - bool? debugMultiFingerGestureWinner, - @Deprecated( - 'Prefer setting this in `interactionOptions`. ' - 'This option is now part of `interactionOptions` to group all interaction related options. ' - 'This option is deprecated since v6.', - ) - bool? enableMultiFingerGestureRace, - @Deprecated( - 'Prefer setting this in `interactionOptions`. ' - 'This option is now part of `interactionOptions` to group all interaction related options. ' - 'This option is deprecated since v6.', - ) - double? rotationThreshold, - @Deprecated( - 'Prefer setting this in `interactionOptions`. ' - 'This option is now part of `interactionOptions` to group all interaction related options. ' - 'This option is deprecated since v6.', - ) - int? rotationWinGestures, - @Deprecated( - 'Prefer setting this in `interactionOptions`. ' - 'This option is now part of `interactionOptions` to group all interaction related options. ' - 'This option is deprecated since v6.', - ) - double? pinchZoomThreshold, - @Deprecated( - 'Prefer setting this in `interactionOptions`. ' - 'This option is now part of `interactionOptions` to group all interaction related options. ' - 'This option is deprecated since v6.', - ) - int? pinchZoomWinGestures, - @Deprecated( - 'Prefer setting this in `interactionOptions`. ' - 'This option is now part of `interactionOptions` to group all interaction related options. ' - 'This option is deprecated since v6.', - ) - double? pinchMoveThreshold, - @Deprecated( - 'Prefer setting this in `interactionOptions`. ' - 'This option is now part of `interactionOptions` to group all interaction related options. ' - 'This option is deprecated since v6.', - ) - int? pinchMoveWinGestures, - @Deprecated( - 'Prefer setting this in `interactionOptions`. ' - 'This option is now part of `interactionOptions` to group all interaction related options. ' - 'This option is deprecated since v6.', - ) - bool? enableScrollWheel, - @Deprecated( - 'Prefer setting this in `interactionOptions`. ' - 'This option is now part of `interactionOptions` to group all interaction related options. ' - 'This option is deprecated since v6.', - ) - double? scrollWheelVelocity, + this.cameraConstraint = const CameraConstraint.unconstrained(), + this.interactionOptions = const InteractionOptions(), this.minZoom, this.maxZoom, this.backgroundColor = const Color(0xFFE0E0E0), @@ -246,30 +127,9 @@ class MapOptions { this.onPositionChanged, this.onMapEvent, this.onMapReady, - @Deprecated( - 'Prefer `cameraConstraint` instead. ' - 'This option is now replaced by `cameraConstraint` which provides more flexibile limiting of the map position. ' - 'This option is deprecated since v6.', - ) - this.maxBounds, this.keepAlive = false, this.applyPointerTranslucencyToLayers = true, - }) : _interactionOptions = interactionOptions, - _interactiveFlags = interactiveFlags, - _debugMultiFingerGestureWinner = debugMultiFingerGestureWinner, - _enableMultiFingerGestureRace = enableMultiFingerGestureRace, - _rotationThreshold = rotationThreshold, - _rotationWinGestures = rotationWinGestures, - _pinchZoomThreshold = pinchZoomThreshold, - _pinchZoomWinGestures = pinchZoomWinGestures, - _pinchMoveThreshold = pinchMoveThreshold, - _pinchMoveWinGestures = pinchMoveWinGestures, - _enableScrollWheel = enableScrollWheel, - _scrollWheelVelocity = scrollWheelVelocity, - initialCenter = center ?? initialCenter, - initialZoom = zoom ?? initialZoom, - initialRotation = rotation ?? initialRotation, - _cameraConstraint = cameraConstraint; + }); /// The options of the closest [FlutterMap] ancestor. If this is called from a /// context with no [FlutterMap] ancestor, null is returned. @@ -283,33 +143,6 @@ class MapOptions { (throw StateError( '`MapOptions.of()` should not be called outside a `FlutterMap` and its descendants')); - InteractionOptions get interactionOptions => - _interactionOptions ?? - InteractionOptions( - flags: _interactiveFlags ?? InteractiveFlag.all, - debugMultiFingerGestureWinner: _debugMultiFingerGestureWinner ?? false, - enableMultiFingerGestureRace: _enableMultiFingerGestureRace ?? false, - rotationThreshold: _rotationThreshold ?? 20.0, - rotationWinGestures: _rotationWinGestures ?? MultiFingerGesture.rotate, - pinchZoomThreshold: _pinchZoomThreshold ?? 0.5, - pinchZoomWinGestures: _pinchZoomWinGestures ?? - MultiFingerGesture.pinchZoom | MultiFingerGesture.pinchMove, - pinchMoveThreshold: _pinchMoveThreshold ?? 40.0, - pinchMoveWinGestures: _pinchMoveWinGestures ?? - MultiFingerGesture.pinchZoom | MultiFingerGesture.pinchMove, - enableScrollWheel: _enableScrollWheel ?? true, - scrollWheelVelocity: _scrollWheelVelocity ?? 0.005, - ); - - /// Note that this getter exists to make sure that the deprecated [maxBounds] - /// option is consistently used. Making this a getter allows the constructor - /// to remain const. - CameraConstraint get cameraConstraint => - _cameraConstraint ?? - (maxBounds != null - ? CameraConstraint.contain(bounds: maxBounds!) - : const CameraConstraint.unconstrained()); - @override bool operator ==(Object other) => other is MapOptions && @@ -318,8 +151,6 @@ class MapOptions { initialZoom == other.initialZoom && initialRotation == other.initialRotation && initialCameraFit == other.initialCameraFit && - bounds == other.bounds && - boundsOptions == other.boundsOptions && minZoom == other.minZoom && maxZoom == other.maxZoom && backgroundColor == other.backgroundColor && @@ -334,7 +165,6 @@ class MapOptions { onMapEvent == other.onMapEvent && cameraConstraint == other.cameraConstraint && onMapReady == other.onMapReady && - maxBounds == other.maxBounds && keepAlive == other.keepAlive && interactionOptions == other.interactionOptions && backgroundColor == other.backgroundColor && @@ -348,8 +178,6 @@ class MapOptions { initialZoom, initialRotation, initialCameraFit, - bounds, - boundsOptions, minZoom, maxZoom, backgroundColor, @@ -365,7 +193,6 @@ class MapOptions { cameraConstraint, onMapReady, keepAlive, - maxBounds, interactionOptions, backgroundColor, applyPointerTranslucencyToLayers, diff --git a/lib/src/map/widget.dart b/lib/src/map/widget.dart index 2fedf63a5..622a4e5e2 100644 --- a/lib/src/map/widget.dart +++ b/lib/src/map/widget.dart @@ -1,5 +1,3 @@ -// ignore_for_file: deprecated_member_use_from_same_package - import 'dart:math'; import 'package:flutter/foundation.dart'; @@ -8,7 +6,6 @@ import 'package:flutter_map/src/gestures/flutter_map_interactive_viewer.dart'; import 'package:flutter_map/src/gestures/map_events.dart'; import 'package:flutter_map/src/layer/general/mobile_layer_transformer.dart'; import 'package:flutter_map/src/layer/general/translucent_pointer.dart'; -import 'package:flutter_map/src/map/camera/camera_fit.dart'; import 'package:flutter_map/src/map/controller/impl.dart'; import 'package:flutter_map/src/map/controller/internal.dart'; import 'package:flutter_map/src/map/controller/map_controller.dart'; @@ -31,13 +28,6 @@ class FlutterMap extends StatefulWidget { this.mapController, required this.options, required this.children, - @Deprecated( - 'Append all of these children to `children`. ' - 'This property has been removed to simplify the way layers are inserted ' - 'into the map, and allow for greater flexibility of layer positioning. ' - 'This property is deprecated since v6.', - ) - this.nonRotatedChildren = const [], }); /// Widgets to be placed onto the map in a [Stack]-like fashion @@ -52,22 +42,6 @@ class FlutterMap extends StatefulWidget { /// [MapOptions.applyPointerTranslucencyToLayers] is `false`. final List children; - /// This member has been deprecated as of v6, and will be removed in the next - /// version. - /// - /// To migrate, append all of these children to [children]. In most cases, no - /// other migration will be necessary. - /// - /// This will simplify the way layers are inserted into the map, and allow for - /// greater flexibility of layer positioning. - @Deprecated( - 'Append all of these children to `children`. ' - 'This property has been removed to simplify the way layers are inserted ' - 'into the map, and allow for greater flexibility of layer positioning. ' - 'This property is deprecated since v6.', - ) - final List nonRotatedChildren; - /// Configure this map's permanent rules and initial state /// /// See the online documentation for more information. @@ -151,12 +125,6 @@ class _FlutterMapStateContainer extends State child: child, ), ), - ...widget.nonRotatedChildren.map( - (child) => TranslucentPointer( - translucent: widget.options.applyPointerTranslucencyToLayers, - child: child, - ), - ), ], ), ); @@ -185,35 +153,12 @@ class _FlutterMapStateContainer extends State // the parent constraints are available. if (!_initialCameraFitApplied && - (widget.options.bounds != null || - widget.options.initialCameraFit != null) && + widget.options.initialCameraFit != null && _parentConstraintsAreSet(context, constraints)) { _initialCameraFitApplied = true; - final CameraFit cameraFit; - - if (widget.options.bounds != null) { - // Create the camera fit from the deprecated option. - final fitBoundsOptions = widget.options.boundsOptions; - cameraFit = fitBoundsOptions.inside - ? CameraFit.insideBounds( - bounds: widget.options.bounds!, - padding: fitBoundsOptions.padding, - maxZoom: fitBoundsOptions.maxZoom, - forceIntegerZoomLevel: fitBoundsOptions.forceIntegerZoomLevel, - ) - : CameraFit.bounds( - bounds: widget.options.bounds!, - padding: fitBoundsOptions.padding, - maxZoom: fitBoundsOptions.maxZoom, - forceIntegerZoomLevel: fitBoundsOptions.forceIntegerZoomLevel, - ); - } else { - cameraFit = widget.options.initialCameraFit!; - } - _flutterMapInternalController.fitCamera( - cameraFit, + widget.options.initialCameraFit!, offset: Offset.zero, ); } diff --git a/lib/src/misc/fit_bounds_options.dart b/lib/src/misc/fit_bounds_options.dart deleted file mode 100644 index d9afc793a..000000000 --- a/lib/src/misc/fit_bounds_options.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:flutter/widgets.dart'; - -@immutable -class FitBoundsOptions { - final EdgeInsets padding; - final double maxZoom; - final bool inside; - - /// By default calculations will return fractional zoom levels. - /// If this parameter is set to [true] fractional zoom levels will be round - /// to the next suitable integer. - final bool forceIntegerZoomLevel; - - @Deprecated( - 'Prefer `CameraFit.bounds` instead. ' - 'This class has been renamed to clarify its meaning and is now a sublass of CameraFit to allow other fit types. ' - 'This class is deprecated since v6.', - ) - const FitBoundsOptions({ - this.padding = EdgeInsets.zero, - this.maxZoom = 17.0, - this.inside = false, - this.forceIntegerZoomLevel = false, - }); -} diff --git a/lib/src/misc/point_extensions.dart b/lib/src/misc/point_extensions.dart index ac4ab23f3..26d791a82 100644 --- a/lib/src/misc/point_extensions.dart +++ b/lib/src/misc/point_extensions.dart @@ -1,13 +1,6 @@ import 'dart:math'; import 'dart:ui'; -@Deprecated( - 'Prefer `Point`. ' - 'This class has been deprecated in favor of adding extension methods to Point. ' - 'This class is deprecated since v6.', -) -typedef CustomPoint = Point; - extension PointExtension on Point { /// Create new [Point] whose [x] and [y] values are divided by the respective /// values in [point]. @@ -60,29 +53,7 @@ extension PointExtension on Point { Offset toOffset() => Offset(x.toDouble(), y.toDouble()); } -/// This extension contains methods which, if defined on Point, -/// could cause a runtime error when called on a Point with a non-int -/// argument. An example: -/// -/// Point(1, 2).subtract(1.5) would cause a runtime error because the -/// resulting x/y values are doubles and the return value is a Point since -/// the method returns Point. -extension DoublePointExtension on Point { - /// Subtract [other] from this Point. - @Deprecated('camera.pixelOrigin is now a Point. Prefer operator-.') - Point subtract(Point other) { - return Point(x - other.x, y - other.y); - } -} - extension OffsetToPointExtension on Offset { - @Deprecated( - 'Prefer `toPoint()`. ' - "This method has been renamed as a result of CustomPoint's removal. " - 'This method is deprecated since v6.', - ) - Point toCustomPoint() => toPoint(); - /// Creates a [Point] representation of this offset. Point toPoint() => Point(dx, dy); } From a96724f805116937eb00117aeac4563c46c0f4ac Mon Sep 17 00:00:00 2001 From: Luka S Date: Wed, 22 Nov 2023 19:39:53 +0000 Subject: [PATCH 2/4] Discard changes to example/lib/pages/home.dart --- example/lib/pages/home.dart | 156 +++++++++++++++++------------------- 1 file changed, 75 insertions(+), 81 deletions(-) diff --git a/example/lib/pages/home.dart b/example/lib/pages/home.dart index 3884463d3..bb72cf7e0 100644 --- a/example/lib/pages/home.dart +++ b/example/lib/pages/home.dart @@ -19,7 +19,80 @@ class _HomePageState extends State { @override void initState() { super.initState(); - _displayWebDemoIntroDialog(); + + const seenIntroBoxKey = 'seenIntroBox(a)'; + if (kIsWeb && Uri.base.host.trim() == 'demo.fleaflet.dev') { + SchedulerBinding.instance.addPostFrameCallback( + (_) async { + final prefs = await SharedPreferences.getInstance(); + if (prefs.getBool(seenIntroBoxKey) ?? false) return; + + if (!mounted) return; + + final width = MediaQuery.of(context).size.width; + await showDialog( + context: context, + builder: (context) => AlertDialog( + icon: UnconstrainedBox( + child: SizedBox.square( + dimension: 64, + child: + Image.asset('assets/ProjectIcon.png', fit: BoxFit.fill), + ), + ), + title: const Text('flutter_map Live Web Demo'), + content: ConstrainedBox( + constraints: BoxConstraints( + maxWidth: width < 750 + ? double.infinity + : (width / (width < 1100 ? 1.5 : 2.5)), + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + const Text( + "This is built automatically off of the latest commits to 'master', so may not reflect the latest release available on pub.dev.\nThis is hosted on Firebase Hosting, meaning there's limited bandwidth to share between all users, so please keep loads to a minimum.", + textAlign: TextAlign.center, + ), + Padding( + padding: + const EdgeInsets.only(right: 8, top: 16, bottom: 4), + child: Align( + alignment: Alignment.centerRight, + child: Text( + "This won't be shown again", + style: TextStyle( + color: Theme.of(context) + .colorScheme + .inverseSurface + .withOpacity(0.5), + ), + textAlign: TextAlign.right, + ), + ), + ), + ], + ), + ), + actions: [ + TextButton.icon( + onPressed: () => Navigator.of(context).pop(), + label: const Text('OK'), + icon: const Icon(Icons.done), + ), + ], + contentPadding: const EdgeInsets.only( + left: 24, + top: 16, + bottom: 0, + right: 24, + ), + ), + ); + await prefs.setBool(seenIntroBoxKey, true); + }, + ); + } } @override @@ -47,6 +120,7 @@ class _HomePageState extends State { RichAttributionWidget( popupInitialDisplayDuration: const Duration(seconds: 5), animationConfig: const ScaleRAWA(), + showFlutterMapAttribution: false, attributions: [ TextSourceAttribution( 'OpenStreetMap contributors', @@ -93,84 +167,4 @@ class _HomePageState extends State { ), ); } - - // Displays an introduction dialog when the Live Web Demo is first loaded for - // a user - void _displayWebDemoIntroDialog() { - // Changing this will cause the dialog to show again for all users - const seenIntroDialogKey = 'seenIntroDialog'; - - if (kIsWeb && Uri.base.host.trim() == 'demo.fleaflet.dev') { - SchedulerBinding.instance.addPostFrameCallback( - (_) async { - final prefs = await SharedPreferences.getInstance(); - if (prefs.getBool(seenIntroDialogKey) ?? false) return; - - if (!mounted) return; - - final width = MediaQuery.of(context).size.width; - await showDialog( - context: context, - builder: (context) => AlertDialog( - icon: UnconstrainedBox( - child: SizedBox.square( - dimension: 64, - child: - Image.asset('assets/ProjectIcon.png', fit: BoxFit.fill), - ), - ), - title: const Text('flutter_map Live Web Demo'), - content: ConstrainedBox( - constraints: BoxConstraints( - maxWidth: width < 750 - ? double.infinity - : (width / (width < 1100 ? 1.5 : 2.5)), - ), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Text( - "This is built automatically off of the latest commits to 'master', so may not reflect the latest release available on pub.dev.\nThis is hosted on Firebase Hosting, meaning there's limited bandwidth to share between all users, so please keep loads to a minimum.", - textAlign: TextAlign.center, - ), - Padding( - padding: - const EdgeInsets.only(right: 8, top: 16, bottom: 4), - child: Align( - alignment: Alignment.centerRight, - child: Text( - "This won't be shown again", - style: TextStyle( - color: Theme.of(context) - .colorScheme - .inverseSurface - .withOpacity(0.5), - ), - textAlign: TextAlign.right, - ), - ), - ), - ], - ), - ), - actions: [ - TextButton.icon( - onPressed: () => Navigator.of(context).pop(), - label: const Text('OK'), - icon: const Icon(Icons.done), - ), - ], - contentPadding: const EdgeInsets.only( - left: 24, - top: 16, - bottom: 0, - right: 24, - ), - ), - ); - await prefs.setBool(seenIntroDialogKey, true); - }, - ); - } - } } From 136a5b86848611fc34bc2e21424864e396e596cf Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Wed, 22 Nov 2023 19:45:39 +0000 Subject: [PATCH 3/4] Migrated from `ImageProvider.load` to `loadImage` in `_SimulateErrorImageProvider` --- example/lib/pages/tile_loading_error_handle.dart | 12 ++---------- example/windows/flutter/CMakeLists.txt | 7 ++++++- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/example/lib/pages/tile_loading_error_handle.dart b/example/lib/pages/tile_loading_error_handle.dart index 228a03169..b1a2faf00 100644 --- a/example/lib/pages/tile_loading_error_handle.dart +++ b/example/lib/pages/tile_loading_error_handle.dart @@ -1,6 +1,3 @@ -import 'dart:ui' as ui; - -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_map_example/widgets/drawer.dart'; @@ -105,14 +102,9 @@ class _SimulateErrorImageProvider _SimulateErrorImageProvider(); @override - ImageStreamCompleter load( + ImageStreamCompleter loadImage( _SimulateErrorImageProvider key, - Future Function( - Uint8List, { - bool allowUpscaling, - int? cacheHeight, - int? cacheWidth, - }) decode, + ImageDecoderCallback decode, ) => _SimulateErrorImageStreamCompleter(); diff --git a/example/windows/flutter/CMakeLists.txt b/example/windows/flutter/CMakeLists.txt index 930d2071a..903f4899d 100644 --- a/example/windows/flutter/CMakeLists.txt +++ b/example/windows/flutter/CMakeLists.txt @@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake) # https://github.com/flutter/flutter/issues/57146. set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + # === Flutter Library === set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") @@ -92,7 +97,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E env ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ + ${FLUTTER_TARGET_PLATFORM} $ VERBATIM ) add_custom_target(flutter_assemble DEPENDS From 51817efac62d286c0a1261c43d8c20a9a80b94a1 Mon Sep 17 00:00:00 2001 From: Joscha <34318751+josxha@users.noreply.github.com> Date: Wed, 22 Nov 2023 21:06:19 +0100 Subject: [PATCH 4/4] fix windows CD: update build directory --- windowsApplicationInstallerSetup.iss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/windowsApplicationInstallerSetup.iss b/windowsApplicationInstallerSetup.iss index e61c6d378..c68bd0381 100644 --- a/windowsApplicationInstallerSetup.iss +++ b/windowsApplicationInstallerSetup.iss @@ -64,10 +64,10 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{ ; Specify all files within 'build/windows/runner/Release' except 'example.exe' [Files] -Source: "example\build\windows\runner\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion -Source: "example\build\windows\runner\Release\flutter_windows.dll"; DestDir: "{app}"; Flags: ignoreversion -Source: "example\build\windows\runner\Release\url_launcher_windows_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion -Source: "example\build\windows\runner\Release\data\*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "example\build\windows\x64\runner\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion +Source: "example\build\windows\x64\runner\Release\flutter_windows.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "example\build\windows\x64\runner\Release\url_launcher_windows_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "example\build\windows\x64\runner\Release\data\*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs createallsubdirs [Icons] Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"