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
28 changes: 28 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: check

on:
pull_request:
push:
branches:
- main

# Cancel previous builds by only allowing one concurrent build per ref.
concurrency:
group: route_map_check-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
timeout-minutes: 10
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: subosito/flutter-action@v2
with:
channel: stable
- name: Get dependencies
run: flutter pub get
- name: Analyze
run: flutter analyze
- name: Run format check
run: dart format -o none --set-exit-if-changed $(find . -name '*.dart' ! -name '*.g.dart' ! -name '*.freezed.dart' ! -path '*/generated/*' ! -path '*/gen/*')
21 changes: 9 additions & 12 deletions lib/src/manager/route_map_icon_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@ class RouteMapIconManager {
}

Future<void> removeIcon({required String identifier}) async {
final searchedSymbolId =
_symbolMap.entries
.firstWhereOrNull((entry) => entry.value.identifier == identifier)
?.key;
final searchedSymbolId = _symbolMap.entries
.firstWhereOrNull((entry) => entry.value.identifier == identifier)
?.key;

if (searchedSymbolId == null) {
return;
Expand Down Expand Up @@ -182,14 +181,12 @@ class RouteMapIconManager {
final pictureInfo = await vg.loadPicture(loader, null);

// Draw the SVG icon
final iconWidth =
drawCircleAroundIcon
? circleRadius * 1.3
: sizeBeforeStroke.width - padding * 2;
final iconHeight =
drawCircleAroundIcon
? circleRadius * 1.3
: sizeBeforeStroke.height - padding * 2;
final iconWidth = drawCircleAroundIcon
? circleRadius * 1.3
: sizeBeforeStroke.width - padding * 2;
final iconHeight = drawCircleAroundIcon
? circleRadius * 1.3
: sizeBeforeStroke.height - padding * 2;
// Compute scaling factors
final iconScaleX = iconWidth / pictureInfo.size.width;
final iconScaleY = iconHeight / pictureInfo.size.height;
Expand Down
270 changes: 120 additions & 150 deletions lib/src/model/route_map_icon/route_map_icon.freezed.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading