Skip to content

Commit 48f350f

Browse files
author
Thibault Deckers
committed
Merge branch 'develop'
2 parents 8b4ca6f + fe4b7c2 commit 48f350f

File tree

6 files changed

+96
-93
lines changed

6 files changed

+96
-93
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ jobs:
4343
# `KEY_JKS` should contain the result of:
4444
# gpg -c --armor keystore.jks
4545
# `KEY_JKS_PASSPHRASE` should contain the passphrase used for the command above
46+
# The SkSL bundle must be produced with the same Flutter engine as the one used to build the artifact
47+
# flutter build <subcommand> --bundle-sksl-path shaders.sksl.json
4648
run: |
4749
echo "${{ secrets.KEY_JKS }}" > release.keystore.asc
4850
gpg -d --passphrase "${{ secrets.KEY_JKS_PASSPHRASE }}" --batch release.keystore.asc > $AVES_STORE_FILE
4951
rm release.keystore.asc
50-
flutter build apk --bundle-sksl-path shaders.sksl.json
51-
flutter build appbundle --bundle-sksl-path shaders.sksl.json
52+
flutter build apk
53+
flutter build appbundle
5254
rm $AVES_STORE_FILE
5355
env:
5456
AVES_STORE_FILE: ${{ github.workspace }}/key.jks

lib/widgets/fullscreen/info/location_section.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'package:aves/utils/geo_utils.dart';
66
import 'package:aves/widgets/common/aves_filter_chip.dart';
77
import 'package:aves/widgets/common/icons.dart';
88
import 'package:aves/widgets/fullscreen/info/info_page.dart';
9-
import 'package:aves/widgets/fullscreen/info/maps/buttons.dart';
9+
import 'package:aves/widgets/fullscreen/info/maps/common.dart';
1010
import 'package:aves/widgets/fullscreen/info/maps/google_map.dart';
1111
import 'package:aves/widgets/fullscreen/info/maps/leaflet_map.dart';
1212
import 'package:flutter/material.dart';

lib/widgets/fullscreen/info/maps/buttons.dart renamed to lib/widgets/fullscreen/info/maps/common.dart

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,36 @@ import 'package:aves/widgets/fullscreen/info/location_section.dart';
77
import 'package:aves/widgets/fullscreen/overlay/common.dart';
88
import 'package:flutter/material.dart';
99

10+
class MapDecorator extends StatelessWidget {
11+
final Widget child;
12+
13+
static const BorderRadius mapBorderRadius = BorderRadius.all(Radius.circular(24)); // to match button circles
14+
15+
const MapDecorator({@required this.child});
16+
17+
@override
18+
Widget build(BuildContext context) {
19+
return GestureDetector(
20+
onScaleStart: (details) {
21+
// absorb scale gesture here to prevent scrolling
22+
// and triggering by mistake a move to the image page above
23+
},
24+
child: ClipRRect(
25+
borderRadius: mapBorderRadius,
26+
child: Container(
27+
color: Colors.white70,
28+
height: 200,
29+
child: child,
30+
),
31+
),
32+
);
33+
}
34+
}
35+
1036
class MapButtonPanel extends StatelessWidget {
1137
final String geoUri;
1238
final void Function(double amount) zoomBy;
1339

14-
static const BorderRadius mapBorderRadius = BorderRadius.all(Radius.circular(24)); // to match button circles
1540
static const double padding = 4;
1641

1742
const MapButtonPanel({

lib/widgets/fullscreen/info/maps/google_map.dart

Lines changed: 32 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:aves/model/settings.dart';
2-
import 'package:aves/widgets/fullscreen/info/maps/buttons.dart';
2+
import 'package:aves/widgets/fullscreen/info/maps/common.dart';
33
import 'package:flutter/material.dart';
44
import 'package:google_maps_flutter/google_maps_flutter.dart';
55
import 'package:tuple/tuple.dart';
@@ -45,57 +45,44 @@ class EntryGoogleMapState extends State<EntryGoogleMap> with AutomaticKeepAliveC
4545
super.build(context);
4646
return Stack(
4747
children: [
48-
_buildMap(),
49-
Positioned.fill(
50-
child: Align(
51-
alignment: AlignmentDirectional.centerEnd,
52-
child: MapButtonPanel(
53-
geoUri: widget.geoUri,
54-
zoomBy: _zoomBy,
55-
),
56-
),
57-
)
48+
MapDecorator(
49+
child: _buildMap(),
50+
),
51+
MapButtonPanel(
52+
geoUri: widget.geoUri,
53+
zoomBy: _zoomBy,
54+
),
5855
],
5956
);
6057
}
6158

6259
Widget _buildMap() {
6360
final accentHue = HSVColor.fromColor(Theme.of(context).accentColor).hue;
64-
return GestureDetector(
65-
onScaleStart: (details) {
66-
// absorb scale gesture here to prevent scrolling
67-
// and triggering by mistake a move to the image page above
68-
},
69-
child: ClipRRect(
70-
borderRadius: MapButtonPanel.mapBorderRadius,
71-
child: Container(
72-
color: Colors.white70,
73-
height: 200,
74-
child: GoogleMap(
75-
// GoogleMap init perf issue: https://github.com/flutter/flutter/issues/28493
76-
initialCameraPosition: CameraPosition(
77-
target: widget.latLng,
78-
zoom: widget.initialZoom,
79-
),
80-
onMapCreated: (controller) => setState(() => _controller = controller),
81-
rotateGesturesEnabled: false,
82-
scrollGesturesEnabled: false,
83-
zoomControlsEnabled: false,
84-
zoomGesturesEnabled: false,
85-
liteModeEnabled: false,
86-
tiltGesturesEnabled: false,
87-
myLocationEnabled: false,
88-
myLocationButtonEnabled: false,
89-
markers: {
90-
Marker(
91-
markerId: MarkerId(widget.markerId),
92-
icon: BitmapDescriptor.defaultMarkerWithHue(accentHue),
93-
position: widget.latLng,
94-
)
95-
},
96-
),
97-
),
61+
return GoogleMap(
62+
// GoogleMap init perf issue: https://github.com/flutter/flutter/issues/28493
63+
initialCameraPosition: CameraPosition(
64+
target: widget.latLng,
65+
zoom: widget.initialZoom,
9866
),
67+
onMapCreated: (controller) => setState(() => _controller = controller),
68+
compassEnabled: false,
69+
mapToolbarEnabled: false,
70+
rotateGesturesEnabled: false,
71+
scrollGesturesEnabled: false,
72+
zoomControlsEnabled: false,
73+
zoomGesturesEnabled: false,
74+
liteModeEnabled: false,
75+
// no camera animation in lite mode
76+
tiltGesturesEnabled: false,
77+
myLocationEnabled: false,
78+
myLocationButtonEnabled: false,
79+
markers: {
80+
Marker(
81+
markerId: MarkerId(widget.markerId),
82+
icon: BitmapDescriptor.defaultMarkerWithHue(accentHue),
83+
position: widget.latLng,
84+
)
85+
},
9986
);
10087
}
10188

lib/widgets/fullscreen/info/maps/leaflet_map.dart

Lines changed: 32 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:aves/model/settings.dart';
2-
import 'package:aves/widgets/fullscreen/info/maps/buttons.dart';
2+
import 'package:aves/widgets/fullscreen/info/maps/common.dart';
33
import 'package:aves/widgets/fullscreen/info/maps/scale_layer.dart';
44
import 'package:flutter/material.dart';
55
import 'package:flutter_map/flutter_map.dart';
@@ -50,7 +50,9 @@ class EntryLeafletMapState extends State<EntryLeafletMap> with AutomaticKeepAliv
5050
children: [
5151
Stack(
5252
children: [
53-
_buildMap(),
53+
MapDecorator(
54+
child: _buildMap(),
55+
),
5456
MapButtonPanel(
5557
geoUri: widget.geoUri,
5658
zoomBy: _zoomBy,
@@ -63,51 +65,38 @@ class EntryLeafletMapState extends State<EntryLeafletMap> with AutomaticKeepAliv
6365
}
6466

6567
Widget _buildMap() {
66-
return GestureDetector(
67-
onScaleStart: (details) {
68-
// absorb scale gesture here to prevent scrolling
69-
// and triggering by mistake a move to the image page above
70-
},
71-
child: ClipRRect(
72-
borderRadius: MapButtonPanel.mapBorderRadius,
73-
child: Container(
74-
color: Colors.white70,
75-
height: 200,
76-
child: FlutterMap(
77-
options: MapOptions(
78-
center: widget.latLng,
79-
zoom: widget.initialZoom,
80-
interactive: false,
81-
),
82-
children: [
83-
_buildMapLayer(),
84-
ScaleLayerWidget(
85-
options: ScaleLayerOptions(),
86-
),
87-
MarkerLayerWidget(
88-
options: MarkerLayerOptions(
89-
markers: [
90-
Marker(
91-
width: markerSize,
92-
height: markerSize,
93-
point: widget.latLng,
94-
builder: (ctx) {
95-
return Icon(
96-
Icons.place,
97-
size: markerSize,
98-
color: Theme.of(context).accentColor,
99-
);
100-
},
101-
anchorPos: AnchorPos.align(AnchorAlign.top),
102-
),
103-
],
104-
),
68+
return FlutterMap(
69+
options: MapOptions(
70+
center: widget.latLng,
71+
zoom: widget.initialZoom,
72+
interactive: false,
73+
),
74+
children: [
75+
_buildMapLayer(),
76+
ScaleLayerWidget(
77+
options: ScaleLayerOptions(),
78+
),
79+
MarkerLayerWidget(
80+
options: MarkerLayerOptions(
81+
markers: [
82+
Marker(
83+
width: markerSize,
84+
height: markerSize,
85+
point: widget.latLng,
86+
builder: (ctx) {
87+
return Icon(
88+
Icons.place,
89+
size: markerSize,
90+
color: Theme.of(context).accentColor,
91+
);
92+
},
93+
anchorPos: AnchorPos.align(AnchorAlign.top),
10594
),
10695
],
107-
mapController: _mapController,
10896
),
10997
),
110-
),
98+
],
99+
mapController: _mapController,
111100
);
112101
}
113102

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description: A new Flutter application.
1111
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
1212
# Read more about iOS versioning at
1313
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14-
version: 1.1.5+17
14+
version: 1.1.6+18
1515

1616
# video_player (as of v0.10.8+2, backed by ExoPlayer):
1717
# - does not support content URIs (by default, but trivial by fork)

0 commit comments

Comments
 (0)