diff --git a/README.md b/README.md index 15212d2..2467789 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,15 @@ storage backend you would possibly want. and flutter_map. - Support for tile cancellation +### [flutter_map_compass](https://pub.dev/packages/flutter_map_compass) + +[![Pub Version](https://img.shields.io/pub/v/flutter_map_compass)](https://pub.dev/packages/flutter_map_compass) +[![likes](https://img.shields.io/pub/likes/flutter_map_compass?logo=flutter)](https://pub.dev/packages/flutter_map_compass) +[![Pub Popularity](https://img.shields.io/pub/popularity/flutter_map_compass)](https://pub.dev/packages/flutter_map_compass) + +A compass for flutter_map that indicates the map rotation. It rotates the map +back to north on top on click. + ### [flutter_map_pmtiles](https://pub.dev/packages/flutter_map_pmtiles) [![Pub Version](https://img.shields.io/pub/v/flutter_map_pmtiles)](https://pub.dev/packages/flutter_map_pmtiles) diff --git a/example/lib/main.dart b/example/lib/main.dart index e03f60b..e19031b 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -47,6 +47,12 @@ class SelectionPage extends StatelessWidget { 'tile layers.', routeName: 'flutter_map_cache', ), + SelectionItemWidget( + title: 'flutter_map_compass', + desc: 'A simple compass layer to indicate the map rotation and ' + 'reset the rotation on click', + routeName: 'flutter_map_compass', + ), SelectionItemWidget( title: 'flutter_map_pmtiles', desc: 'PMTiles for flutter_map', @@ -57,12 +63,6 @@ class SelectionPage extends StatelessWidget { desc: 'PMTiles for vector_map_files / flutter_map', routeName: 'vector_map_tiles_pmtiles', ), - SelectionItemWidget( - title: 'flutter_map_compass', - desc: 'A simple compass layer to indicate the map rotation and ' - 'reset the rotation on click', - routeName: 'flutter_map_compass', - ), ]; final width = MediaQuery.sizeOf(context).width; diff --git a/flutter_map_compass/README.md b/flutter_map_compass/README.md index ce1725f..27063d1 100644 --- a/flutter_map_compass/README.md +++ b/flutter_map_compass/README.md @@ -1,15 +1,19 @@ # flutter_map_compass -A simple compass for flutter_map. It shows the rotation of the map and resets the rotation back to 0 on tap. +A simple compass for flutter_map. It shows the rotation of the map and resets +the rotation back to 0 on tap. -![Pub Likes](https://img.shields.io/pub/likes/flutter_map_compass) -![Pub Points](https://img.shields.io/pub/points/flutter_map_compass) -![Pub Popularity](https://img.shields.io/pub/popularity/flutter_map_compass) -![Pub Version](https://img.shields.io/pub/v/flutter_map_compass) +[![Pub Version](https://img.shields.io/pub/v/flutter_map_compass)](https://pub.dev/packages/flutter_map_compass) +[![likes](https://img.shields.io/pub/likes/flutter_map_compass?logo=flutter)](https://pub.dev/packages/flutter_map_compass) +[![Pub Points](https://img.shields.io/pub/points/flutter_map_compass)](https://pub.dev/packages/flutter_map_compass/score) +[![Pub Popularity](https://img.shields.io/pub/popularity/flutter_map_compass)](https://pub.dev/packages/flutter_map_compass) -![GitHub last commit](https://img.shields.io/github/last-commit/josxha/flutter_map_plugins) -![GitHub issues](https://img.shields.io/github/issues/josxha/flutter_map_plugins) -![GitHub Repo stars](https://img.shields.io/github/stars/josxha/flutter_map_plugins?style=social) +[![GitHub last commit](https://img.shields.io/github/last-commit/josxha/flutter_map_plugins)](https://github.com/josxha/flutter_map_plugins) +[![stars](https://badgen.net/github/stars/josxha/flutter_map_plugins?label=stars&color=green&icon=github)](https://github.com/josxha/flutter_map_plugins/stargazers) +[![GitHub issues](https://img.shields.io/github/issues/josxha/flutter_map_plugins)](https://github.com/josxha/flutter_map_plugins/issues) +[![codecov](https://codecov.io/gh/josxha/flutter_map_plugins/graph/badge.svg?token=5045489G7X)](https://codecov.io/gh/josxha/flutter_map_plugins) + +Example screenshot ## Getting started @@ -32,7 +36,17 @@ Widget build(BuildContext context) { TileLayer( urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', ), - const MapCompass(), + + // use the default compass that is based on the cupertino compass icon + const MapCompass.cupertino( + hideIfRotatedNorth: true, + ), + + // Or use the primary constructor to customize all + const MapCompass( + icon: Icon(Icons.arrow_upward), + hideIfRotatedNorth: true, + ), ], ); } diff --git a/flutter_map_compass/docs/screenshot.jpg b/flutter_map_compass/docs/screenshot.jpg new file mode 100644 index 0000000..0e3fe18 Binary files /dev/null and b/flutter_map_compass/docs/screenshot.jpg differ diff --git a/flutter_map_compass/example/example.md b/flutter_map_compass/example/example.md index 46a3a3f..2236ea3 100644 --- a/flutter_map_compass/example/example.md +++ b/flutter_map_compass/example/example.md @@ -9,7 +9,7 @@ Widget build(BuildContext context) { TileLayer( urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', ), - const MapCompass(), + const MapCompass.cupertino(), ], ); }