Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 58 additions & 18 deletions .github/workflows/on-commit-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,14 @@ jobs:
uses: subosito/flutter-action@v2
with:
cache: true
- name: Install melos
run: dart pub global activate melos
- name: Bootstrap melos
run: melos bootstrap
- name: Get dependencies
run: melos run pub_get --no-select
run: flutter pub get
- name: Analyze all projects
run: dart analyze --fatal-infos --fatal-warnings
- name: Format all projects
run: dart format --output=none --set-exit-if-changed .
test:
# run on windows because
runs-on: windows-latest
runs-on: ubuntu-latest
name: Test
steps:
- name: Checkout project
Expand All @@ -39,14 +34,40 @@ jobs:
uses: subosito/flutter-action@v2
with:
cache: true
- name: Install melos
run: dart pub global activate melos
- name: Bootstrap melos
run: melos bootstrap
- name: Install coverde
run: dart pub global activate coverde
- name: Run tests with coverage
run: melos run test_with_coverage --no-select
- name: Run Test with Coverage
run: |
rm -rf coverage
cd flutter_map_cache
flutter test --no-pub -r expanded --coverage
coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart
cd ..
cd flutter_map_compass
flutter test --no-pub -r expanded --coverage
coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart
cd ..
# cd flutter_map_maplibre
# flutter test --no-pub -r expanded --coverage
# coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart
# cd ..
cd flutter_map_mbtiles
flutter test --no-pub -r expanded --coverage
coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart
cd ..
cd flutter_map_pmtiles
flutter test --no-pub -r expanded --coverage
coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart
cd ..
# cd vector_map_tiles_mbtiles
# flutter test --no-pub -r expanded --coverage
# coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart
# cd ..
# cd vector_map_tiles_pmtiles
# flutter test --no-pub -r expanded --coverage
# coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart
# cd ..
coverde value -i coverage/filtered.lcov.info > coverage/result.txt
- name: Run Codecov
uses: codecov/codecov-action@v5
env:
Expand All @@ -61,14 +82,33 @@ jobs:
uses: subosito/flutter-action@v2
with:
cache: true
- name: Install melos
run: dart pub global activate melos
- name: Bootstrap melos
run: melos bootstrap
- name: Get Dependencies
run: flutter pub get
- name: Install pana
run: dart pub global activate pana
- name: Check package score for all
run: melos run package_score --no-select
run: |
cd flutter_map_cache
pana --exit-code-threshold 0 --no-dartdoc .
cd ..
cd flutter_map_compass
pana --exit-code-threshold 0 --no-dartdoc .
cd ..
cd flutter_map_maplibre
pana --exit-code-threshold 0 --no-dartdoc .
cd ..
cd flutter_map_mbtiles
pana --exit-code-threshold 0 --no-dartdoc .
cd ..
cd flutter_map_pmtiles
pana --exit-code-threshold 0 --no-dartdoc .
cd ..
# cd vector_map_tiles_mbtiles
# pana --exit-code-threshold 0 --no-dartdoc .
# cd ..
# cd vector_map_tiles_pmtiles
# pana --exit-code-threshold 0 --no-dartdoc .
# cd ..
build-android:
runs-on: ubuntu-latest
name: Build Android
Expand Down
73 changes: 57 additions & 16 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ jobs:
uses: subosito/flutter-action@v2
with:
cache: true
- name: Install melos
run: dart pub global activate melos
- name: Bootstrap melos
run: melos bootstrap
- name: Get dependencies
run: melos run pub_get --no-select
run: flutter pub get
- name: Analyze all projects
run: dart analyze --fatal-infos --fatal-warnings
- name: Format all projects
Expand All @@ -38,14 +34,40 @@ jobs:
uses: subosito/flutter-action@v2
with:
cache: true
- name: Install melos
run: dart pub global activate melos
- name: Bootstrap melos
run: melos bootstrap
- name: Install coverde
run: dart pub global activate coverde
- name: Run tests with coverage
run: melos run test_with_coverage --no-select
- name: Run Test with Coverage
run: |
rm -rf coverage
cd flutter_map_cache
flutter test --no-pub -r expanded --coverage
coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart
cd ..
cd flutter_map_compass
flutter test --no-pub -r expanded --coverage
coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart
cd ..
# cd flutter_map_maplibre
# flutter test --no-pub -r expanded --coverage
# coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart
# cd ..
cd flutter_map_mbtiles
flutter test --no-pub -r expanded --coverage
coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart
cd ..
cd flutter_map_pmtiles
flutter test --no-pub -r expanded --coverage
coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart
cd ..
# cd vector_map_tiles_mbtiles
# flutter test --no-pub -r expanded --coverage
# coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart
# cd ..
# cd vector_map_tiles_pmtiles
# flutter test --no-pub -r expanded --coverage
# coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart
# cd ..
coverde value -i coverage/filtered.lcov.info > coverage/result.txt
- name: Run Codecov
uses: codecov/codecov-action@v5
env:
Expand All @@ -60,14 +82,33 @@ jobs:
uses: subosito/flutter-action@v2
with:
cache: true
- name: Install melos
run: dart pub global activate melos
- name: Bootstrap melos
run: melos bootstrap
- name: Get Dependencies
run: flutter pub get
- name: Install pana
run: dart pub global activate pana
- name: Check package score for all
run: melos run package_score --no-select
run: |
cd flutter_map_cache
pana --exit-code-threshold 0 --no-dartdoc .
cd ..
cd flutter_map_compass
pana --exit-code-threshold 0 --no-dartdoc .
cd ..
cd flutter_map_maplibre
pana --exit-code-threshold 0 --no-dartdoc .
cd ..
cd flutter_map_mbtiles
pana --exit-code-threshold 0 --no-dartdoc .
cd ..
cd flutter_map_pmtiles
pana --exit-code-threshold 0 --no-dartdoc .
cd ..
# cd vector_map_tiles_mbtiles
# pana --exit-code-threshold 0 --no-dartdoc .
# cd ..
# cd vector_map_tiles_pmtiles
# pana --exit-code-threshold 0 --no-dartdoc .
# cd ..
build-android:
runs-on: ubuntu-latest
name: Build Android
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ functionality of [flutter_map](https://pub.dev/packages/flutter_map).

[![Pub Version](https://img.shields.io/pub/v/flutter_map_cache)](https://pub.dev/packages/flutter_map_cache)
[![likes](https://img.shields.io/pub/likes/flutter_map_cache?logo=flutter)](https://pub.dev/packages/flutter_map_cache)
[![Pub Popularity](https://img.shields.io/pub/popularity/flutter_map_cache)](https://pub.dev/packages/flutter_map_cache)
[![Pub Downloads](https://img.shields.io/pub/dm/flutter_map_cache)](https://pub.dev/packages/flutter_map_cache)

A slim yet powerful caching plugin for flutter_map tile layers. Supports any
storage backend you would possibly want.
Expand All @@ -37,7 +37,7 @@ storage backend you would possibly want.

[![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)
[![Pub Downloads](https://img.shields.io/pub/dm/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 when clicked.
Expand All @@ -46,7 +46,7 @@ back to north on top when clicked.

[![Pub Version](https://img.shields.io/pub/v/flutter_map_maplibre)](https://pub.dev/packages/flutter_map_maplibre)
[![likes](https://img.shields.io/pub/likes/flutter_map_maplibre?logo=flutter)](https://pub.dev/packages/flutter_map_maplibre)
[![Pub Popularity](https://img.shields.io/pub/popularity/flutter_map_maplibre)](https://pub.dev/packages/flutter_map_maplibre)
[![Pub Downloads](https://img.shields.io/pub/dm/flutter_map_maplibre)](https://pub.dev/packages/flutter_map_maplibre)

Performant Mapbox Vector Tiles (MVT) support for flutter_map powered by native
MapLibre SDKs.
Expand All @@ -55,7 +55,7 @@ MapLibre SDKs.

[![Pub Version](https://img.shields.io/pub/v/flutter_map_mbtiles)](https://pub.dev/packages/flutter_map_mbtiles)
[![likes](https://img.shields.io/pub/likes/flutter_map_mbtiles?logo=flutter)](https://pub.dev/packages/flutter_map_mbtiles)
[![Pub Popularity](https://img.shields.io/pub/popularity/flutter_map_mbtiles)](https://pub.dev/packages/flutter_map_mbtiles)
[![Pub Downloads](https://img.shields.io/pub/dm/flutter_map_mbtiles)](https://pub.dev/packages/flutter_map_mbtiles)

This package provides the `MbTilesTileProvider` that can be used with
flutter_map tile layers.
Expand All @@ -68,7 +68,7 @@ flutter_map tile layers.

[![Pub Version](https://img.shields.io/pub/v/flutter_map_pmtiles)](https://pub.dev/packages/flutter_map_pmtiles)
[![likes](https://img.shields.io/pub/likes/flutter_map_pmtiles?logo=flutter)](https://pub.dev/packages/flutter_map_pmtiles)
[![Pub Popularity](https://img.shields.io/pub/popularity/flutter_map_pmtiles)](https://pub.dev/packages/flutter_map_pmtiles)
[![Pub Downloads](https://img.shields.io/pub/dm/flutter_map_pmtiles)](https://pub.dev/packages/flutter_map_pmtiles)

This package provides the `PmTilesTileProvider` that can be used with
flutter_map tile layers.
Expand All @@ -84,7 +84,7 @@ flutter_map tile layers.

[![Pub Version](https://img.shields.io/pub/v/vector_map_tiles_mbtiles)](https://pub.dev/packages/vector_map_tiles_mbtiles)
[![likes](https://img.shields.io/pub/likes/vector_map_tiles_mbtiles?logo=flutter)](https://pub.dev/packages/vector_map_tiles_mbtiles)
[![Pub Popularity](https://img.shields.io/pub/popularity/vector_map_tiles_mbtiles)](https://pub.dev/packages/vector_map_tiles_mbtiles)
[![Pub Downloads](https://img.shields.io/pub/dm/vector_map_tiles_mbtiles)](https://pub.dev/packages/vector_map_tiles_mbtiles)

This package provides the `MbTilesVectorTileProvider` that can be used with
the [vector_map_tiles](https://pub.dev/packages/vector_map_tiles) which itself
Expand All @@ -98,7 +98,7 @@ adds support for vector tiles to flutter_map.

[![Pub Version](https://img.shields.io/pub/v/vector_map_tiles_pmtiles)](https://pub.dev/packages/vector_map_tiles_pmtiles)
[![likes](https://img.shields.io/pub/likes/vector_map_tiles_pmtiles?logo=flutter)](https://pub.dev/packages/vector_map_tiles_pmtiles)
[![Pub Popularity](https://img.shields.io/pub/popularity/vector_map_tiles_pmtiles)](https://pub.dev/packages/vector_map_tiles_pmtiles)
[![Pub Downloads](https://img.shields.io/pub/dm/vector_map_tiles_pmtiles)](https://pub.dev/packages/vector_map_tiles_pmtiles)

This package provides the `PmTilesVectorTileProvider` that can be used with
the [vector_map_tiles](https://pub.dev/packages/vector_map_tiles) which itself
Expand Down
62 changes: 32 additions & 30 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import 'package:flutter_map_plugins_example/flutter_map_maplibre/page.dart';
import 'package:flutter_map_plugins_example/flutter_map_maplibre/page2.dart';
import 'package:flutter_map_plugins_example/flutter_map_mbtiles/page.dart';
import 'package:flutter_map_plugins_example/flutter_map_pmtiles/page.dart';
import 'package:flutter_map_plugins_example/vector_map_tiles_mbtiles/page.dart';
import 'package:flutter_map_plugins_example/vector_map_tiles_pmtiles/page.dart';
import 'package:flutter_web_plugins/url_strategy.dart';
import 'package:url_launcher/url_launcher_string.dart';

Expand All @@ -35,10 +33,10 @@ class MyApp extends StatelessWidget {
'/flutter_map_pmtiles': (context) => const FlutterMapPmTilesPage(),
'/flutter_map_maplibre': (context) => const MapLibreFlutterMapPage(),
'/flutter_map_maplibre2': (context) => const FlutterMapMapLibrePage(),
'/vector_map_tiles_pmtiles': (context) => VectorMapTilesPmTilesPage(),
// '/vector_map_tiles_pmtiles': (context) => VectorMapTilesPmTilesPage(),
'/flutter_map_mbtiles': (context) => const FlutterMapMbTilesPage(),
'/vector_map_tiles_mbtiles': (context) =>
const VectorMapTilesMbTilesPage(),
// '/vector_map_tiles_mbtiles': (context) =>
// const VectorMapTilesMbTilesPage(),
'/flutter_map_compass': (context) => const FlutterMapCompassPage(),
},
);
Expand Down Expand Up @@ -83,25 +81,27 @@ class SelectionPage extends StatelessWidget {
desc: 'PMTiles for flutter_map',
routeName: '/flutter_map_pmtiles',
),
SelectionItemWidget.disabledOnWeb(
title: 'vector_map_tiles_mbtiles',
desc: 'MBTiles for vector_map_files / flutter_map',
routeName: '/vector_map_tiles_mbtiles',
),
SelectionItemWidget.disabledOnWeb(
title: 'vector_map_tiles_pmtiles',
desc: 'PMTiles for vector_map_files / flutter_map',
routeName: '/vector_map_tiles_pmtiles',
),
// SelectionItemWidget.disabledOnWeb(
// title: 'vector_map_tiles_mbtiles',
// desc: 'MBTiles for vector_map_files / flutter_map',
// routeName: '/vector_map_tiles_mbtiles',
// ),
// SelectionItemWidget.disabledOnWeb(
// title: 'vector_map_tiles_pmtiles',
// desc: 'PMTiles for vector_map_files / flutter_map',
// routeName: '/vector_map_tiles_pmtiles',
// ),
];

final width = MediaQuery.sizeOf(context).width;
final width = MediaQuery
.sizeOf(context)
.width;
final githubButton = width < 350
? IconButton(onPressed: _openGithub, icon: const Icon(Icons.link))
: TextButton(
onPressed: _openGithub,
child: const Text('Source Code'),
);
onPressed: _openGithub,
child: const Text('Source Code'),
);
return Scaffold(
appBar: AppBar(
title: const Text('flutter_map_plugins'),
Expand All @@ -121,7 +121,8 @@ class SelectionPage extends StatelessWidget {
);
}

void _openGithub() => launchUrlString(
void _openGithub() =>
launchUrlString(
'https://github.com/josxha/flutter_map_plugins',
);
}
Expand All @@ -141,7 +142,8 @@ class SelectionItemWidget extends StatelessWidget {
required this.desc,
required this.routeName,
super.key,
}) : disabled = kIsWeb,
})
: disabled = kIsWeb,
disabledMessage = 'Not on web';
static const _titleStyle = TextStyle(
fontSize: 16,
Expand Down Expand Up @@ -178,17 +180,17 @@ class SelectionItemWidget extends StatelessWidget {
color: disabled ? Colors.white70 : Colors.white,
child: InkWell(
onTap:
disabled ? null : () => Navigator.of(context).pushNamed(routeName),
disabled ? null : () => Navigator.of(context).pushNamed(routeName),
child: disabled
? ClipRect(
child: Banner(
message: disabledMessage,
textStyle: _bannerTextStyle,
color: Colors.grey,
location: BannerLocation.bottomEnd,
child: content,
),
)
child: Banner(
message: disabledMessage,
textStyle: _bannerTextStyle,
color: Colors.grey,
location: BannerLocation.bottomEnd,
child: content,
),
)
: content,
),
);
Expand Down
2 changes: 2 additions & 0 deletions example/lib/vector_map_tiles_mbtiles/page.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_map_plugins_example/common/utils.dart';
Expand Down Expand Up @@ -99,3 +100,4 @@ class _VectorMapTilesMbTilesPageState extends State<VectorMapTilesMbTilesPage> {
super.dispose();
}
}
*/
Loading
Loading