Skip to content

Commit 2e4f01c

Browse files
authored
chore: prepare v0.2.1 release (#226)
1 parent e766c70 commit 2e4f01c

File tree

10 files changed

+115
-21
lines changed

10 files changed

+115
-21
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
2+
github: ["josxha"]
13
custom: ["https://paypal.me/joschaeckert"]

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: "Q&A - GitHub Discussions"
4-
url: https://github.com/josxha/flutter-maplibre/discussions/categories/q-a
3+
- name: "Ask a Question"
4+
url: https://github.com/josxha/flutter-maplibre/discussions/new?category=q-a
55
about: "If you have a question about using MapLibre on Flutter"
6+
- name: "Start a Discussion"
7+
url: https://github.com/josxha/flutter-maplibre/discussions/new?category=general
8+
about: "Start a discussion on some topic"
9+
- name: "Share some Idea"
10+
url: https://github.com/josxha/flutter-maplibre/discussions/new?category=ideas
11+
about: "Share an idea, that isn't quite ready for a feature request"
612
- name: "Join on Slack"
713
url: https://slack.openstreetmap.us/
814
about: "Join #maplibre-flutter on the OpenStreetMap Slack"

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
## 0.2.1
2+
3+
This release builds upon the long anticipated merged threads in Flutter 3.29.0
4+
which removes the need of switching threads. Furthermore, the release contains a
5+
couple of features and new fixes.
6+
7+
Thanks for your contributions for this release, @felix-larsen and @pamtbaau!
8+
9+
### New Features
10+
11+
- Upgrade MapLibre Native on Android
12+
to [11.8.0](https://github.com/maplibre/maplibre-native/blob/main/platform/android/CHANGELOG.md#1180)
13+
which introduces support for PMTiles.
14+
- Add `removePinchOnPressed` and `webRotationSpeed` as parameters to the
15+
`MapCompass` widget.
16+
- Allow the `SourceAttribution` widget to use multiple lines for its
17+
attributions.
18+
- Underline an attribution link for a `SourceAttribution` widget when hovered
19+
with a cursor.
20+
- Add the parameter `allowInteraction` to the `WidgetLayer` that allows widgets
21+
to detect gestures on these widgets.
22+
- Reintroduce awaitable `moveCamera()`, `animateCamera()` and `fitCamera()` on
23+
Android.
24+
- Use synchronous JNI calls on Android to prevent thread hopping.
25+
26+
### Bug Fixes
27+
28+
- Fix exceptions when the map widget rebuilds a lot in a short amount of time.
29+
- Fix `moveCamera()`, `animateCamera()` and `fitCamera()` does not ignore null
30+
parameters.
31+
- Fix app freeze on Android using Flutter 3.29.0 caused by the merged threads.
32+
- Fix exception when adding a RasterSource programatically.
33+
34+
### Misc
35+
36+
- Update examples and documentation.
37+
- Set minimum Flutter version
38+
to [3.29.0](https://discord.com/channels/951867686378409984/951879268227485707/1339719764574081148)
39+
and minimum Dart version
40+
to [3.7.0](https://discord.com/channels/951867686378409984/951879268227485707/1339719747981545485).
41+
- Use the new code formatting.
42+
- Upgrade pigeon to 24.
43+
144
## 0.2.0
245

346
This release is a collection of user affecting changes along a couple of new

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,5 @@ development:
110110
feature, [open a feature request](https://github.com/josxha/flutter-maplibre/issues/new?assignees=&labels=feature&projects=&template=2-feature.yml&title=%5BFEATURE%5D+%3Ctitle%3E).
111111
or [post your idea as discussion](https://github.com/josxha/flutter-maplibre/discussions/categories/ideas).
112112
- Enhance the package documentation.
113-
- [Sponsor this project](https://www.paypal.com/paypalme/joschaeckert).
113+
- Sponsor this
114+
project: [GitHub-Sponsors](https://github.com/sponsors/josxha), [PayPal](https://www.paypal.com/paypalme/joschaeckert).

docs/src/pages/features.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ lack of platform views of these platforms.
2222

2323
### General Functionality
2424

25-
| Feature | web | android | iOS | windows | macOS | linux |
26-
|---------------------|-----|---------|-----|---------|-------|-------|
27-
| Map |||||||
28-
| MapController |||||||
29-
| UI Controls for web | || ||||
30-
| Offline | ||||||
31-
| Events |||||||
32-
| Snapshotter || |||||
33-
| Annotations | ||||||
25+
| Feature | web | android | iOS | windows | macOS | linux |
26+
|---------------|-----|---------|-----|---------|-------|-------|
27+
| Map |||||||
28+
| MapController |||||||
29+
| Offline | || ||||
30+
| Events | ||||||
31+
| Annotations |||||||
32+
| MBTiles || |||||
33+
| PMTiles | ||||||
3434

3535
### Style Layers
3636

example/analysis_options.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ linter:
44
rules:
55
public_member_api_docs: false
66
document_ignores: true
7-
avoid_catches_without_on_clauses: true

example/lib/extensions.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import 'package:flutter/material.dart';
2+
3+
extension BuildContextExt on BuildContext {
4+
void showSnackBox(String message) {
5+
debugPrint(message);
6+
ScaffoldMessenger.of(this)
7+
..hideCurrentSnackBar()
8+
..showSnackBar(SnackBar(content: Text(message)));
9+
}
10+
}

example/lib/permissions_page.dart

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:flutter/material.dart';
22
import 'package:maplibre/maplibre.dart';
3+
import 'package:maplibre_example/extensions.dart';
34

45
@immutable
56
class PermissionsPage extends StatefulWidget {
@@ -42,16 +43,24 @@ class _PermissionsPageState extends State<PermissionsPage> {
4243
),
4344
ListTile(
4445
title: OutlinedButton(
45-
child: const Text('requestLocationPermissions'),
46+
child: const Text('Request Location Permissions'),
4647
onPressed: () async {
4748
try {
4849
final granted = await _manager.requestLocationPermissions(
4950
explanation: 'Show the user location on the map.',
5051
);
51-
debugPrint('requestLocationPermissions granted: $granted');
52+
if (context.mounted) {
53+
if (granted) {
54+
context.showSnackBox('Permission granted.');
55+
} else {
56+
context.showSnackBox('Permission not granted.');
57+
}
58+
}
5259
setState(() {}); // refresh the screen
53-
} on Exception catch (error, stacktrace) {
54-
debugPrint(error.toString());
60+
} catch (error, stacktrace) {
61+
if (context.mounted) {
62+
context.showSnackBox(error.toString());
63+
}
5564
debugPrintStack(stackTrace: stacktrace);
5665
}
5766
},

example/lib/user_location_page.dart

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:flutter/material.dart';
22
import 'package:maplibre/maplibre.dart';
3+
import 'package:maplibre_example/extensions.dart';
34
import 'package:maplibre_example/map_styles.dart';
45

56
@immutable
@@ -35,7 +36,11 @@ class _UserLocationPageState extends State<UserLocationPage> {
3536
.requestLocationPermissions(
3637
explanation: 'Show the user location on the map.',
3738
);
38-
debugPrint(granted.toString());
39+
if (context.mounted) {
40+
context.showSnackBox(
41+
'Permission ${granted ? 'granted' : 'not granted'}.',
42+
);
43+
}
3944
},
4045
child: const Text(
4146
'Get permission',
@@ -44,7 +49,16 @@ class _UserLocationPageState extends State<UserLocationPage> {
4449
),
4550
OutlinedButton(
4651
onPressed: () async {
47-
await _controller.enableLocation();
52+
try {
53+
await _controller.enableLocation();
54+
if (context.mounted) {
55+
context.showSnackBox('Location enabled.');
56+
}
57+
} catch (error) {
58+
if (context.mounted) {
59+
context.showSnackBox(error.toString());
60+
}
61+
}
4862
},
4963
child: const Text(
5064
'Enable location',
@@ -53,7 +67,16 @@ class _UserLocationPageState extends State<UserLocationPage> {
5367
),
5468
OutlinedButton(
5569
onPressed: () async {
56-
await _controller.trackLocation();
70+
try {
71+
await _controller.trackLocation();
72+
if (context.mounted) {
73+
context.showSnackBox('Tracking location.');
74+
}
75+
} catch (error) {
76+
if (context.mounted) {
77+
context.showSnackBox(error.toString());
78+
}
79+
}
5780
},
5881
child: const Text(
5982
'Track location',

pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: maplibre
22
description: "Permissive and performant mapping library that supports Mapbox Vector Tiles (MVT) powered by MapLibre SDKs."
3-
version: 0.2.0
3+
version: 0.2.1
44
repository: https://github.com/josxha/flutter-maplibre
55
issue_tracker: https://github.com/josxha/flutter-maplibre/issues
66
homepage: https://flutter-maplibre.pages.dev
@@ -10,6 +10,7 @@ topics: [ map, maplibre, mvt ]
1010

1111
funding:
1212
- https://paypal.me/joschaeckert
13+
- https://github.com/sponsors/josxha
1314

1415
platforms:
1516
android:

0 commit comments

Comments
 (0)