Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Flutter version in CI #248

Merged
merged 2 commits into from
Feb 7, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.x'
flutter-version: '3.27.x'
channel: 'stable'
- name: Install dependencies
run: flutter pub get
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Copy the Firebase config from https://console.firebase.google.com/project/<proje

```shell
--dart-define FIREBASE_API_KEY=...
--dart-define FIREBASE_APP_ID=....
--dart-define FIREBASE_APP_ID=...
--dart-define FIREBASE_MESSAGING_SENDER_ID=...
--dart-define FIREBASE_PROJECT_ID=...
```
21 changes: 21 additions & 0 deletions green_walking/lib/library/color_ex.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import 'dart:ui';

/// This class is to supplement deprecated_member_use for value value converted RGBA into a 32 bit integer, but the SDK
/// doesn't provide a successor.
extension ColorEx on Color {
static int floatToInt8(double x) {
return (x * 255.0).round() & 0xff;
}

/// A 32 bit value representing this color.
///
/// The bits are assigned as follows:
///
/// * Bits 24-31 are the alpha value.
/// * Bits 16-23 are the red value.
/// * Bits 8-15 are the green value.
/// * Bits 0-7 are the blue value.
int get toInt32 {
return floatToInt8(a) << 24 | floatToInt8(r) << 16 | floatToInt8(g) << 8 | floatToInt8(b) << 0;
}
}
2 changes: 1 addition & 1 deletion green_walking/lib/pages/download_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class _DownloadMapPageState extends State<DownloadMapPage> {
body: Center(
child: Column(
children: [
ButtonBar(
OverflowBar(
alignment: MainAxisAlignment.center,
children: [
ElevatedButton(
Expand Down
2 changes: 1 addition & 1 deletion green_walking/lib/pages/feedback.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class FeedbackPage extends StatelessWidget {
],
),
),
ButtonBar(
OverflowBar(
alignment: MainAxisAlignment.center,
children: <Widget>[
ElevatedButton(
Expand Down
2 changes: 1 addition & 1 deletion green_walking/lib/pages/offline_maps.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class _OfflineMapsPageState extends State<OfflineMapsPage> {
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Column(
children: <Widget>[
ButtonBar(
OverflowBar(
alignment: MainAxisAlignment.center,
children: <Widget>[
ElevatedButton(
Expand Down
7 changes: 4 additions & 3 deletions green_walking/lib/widgets/map_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'dart:developer' show log;

import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:green_walking/library/color_ex.dart';
import 'package:mapbox_maps_flutter/mapbox_maps_flutter.dart';
import 'package:wakelock_plus/wakelock_plus.dart';

Expand Down Expand Up @@ -87,7 +88,7 @@ class _MapViewState extends State<MapView> {
marginBottom: 48.0,
marginLeft: 13.0,
isMetricUnits: true,
primaryColor: Colors.blueGrey.value));
primaryColor: Colors.blueGrey.toInt32));
_mapboxMap.annotations.createCircleAnnotationManager().then((value) {
_circleAnnotationManager = value;
});
Expand Down Expand Up @@ -221,10 +222,10 @@ class _MapViewState extends State<MapView> {
_circleAnnotationManager?.create(CircleAnnotationOptions(
geometry: Point(coordinates: position),
circleRadius: 12,
circleColor: const Color.fromRGBO(255, 192, 203, 1).value,
circleColor: const Color.fromRGBO(255, 192, 203, 1).toInt32,
circleOpacity: 0.6,
circleStrokeWidth: 2,
circleStrokeColor: const Color.fromRGBO(255, 192, 203, 1).value));
circleStrokeColor: const Color.fromRGBO(255, 192, 203, 1).toInt32));
}

void _displaySnackBar(String text) {
Expand Down
1 change: 1 addition & 0 deletions green_walking/lib/widgets/user_consent_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ void enableCrashReportingOrConsent(BuildContext context) {
// Privacy: Only enable if it is set to enabled.
FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
} else if (enabled == null) {
if (!context.mounted) return;
showDialog<dynamic>(context: context, builder: (BuildContext context) => const UserConsentDialog());
}
});
Expand Down