Fix remaining compilation errors: null-safety, removed packages, and nullable handling
- Fix AppState: remove removed connectivity package, fix imports (latlong2), make nullable fields optional - Fix User model: use const empty strings in const constructor instead of null - Fix model builders: add required ObjectId parameters to YourLocation and FireNotification - Implement Comparable instead of extending it for BasicLocation - Fix nullable callback handling in appActions and middleware (Completer<Null>?) - Add null checks for BuildContext in dialogs (fireAlert, homePage, etc.) - Fix nullable scaffold state access using ?. operator (activeFires, fireNotificationList) - Handle nullable FireNotification and YourLocation in genericMapBottom - Fix list type casting for widgets that can be null (<Widget?> with filtering) - Add ObjectId imports where needed for model creation - Fix Key? nullable parameter in introPage - Add required parameters to markdownPage and slider constructors - Remove connectivity-related code and imports (package removed) - Handle nullable Completer in fetchDataMiddleware All 104 errors resolved. 0 errors, 61 warnings/info remaining.
This commit is contained in:
parent
037b5eaa32
commit
a7f3ab6974
27 changed files with 259 additions and 274 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:comunes_flutter/comunes_flutter.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:launch_review/launch_review.dart';
|
||||
import 'package:in_app_review/in_app_review.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ class _SupportPageState extends State<SupportPage> {
|
|||
Widget buildSupportButton() {
|
||||
return new Align(
|
||||
alignment: const Alignment(0.0, -0.2),
|
||||
child: new OutlineButton.icon(
|
||||
child: new OutlinedButton.icon(
|
||||
icon: const Icon(Icons.favorite_border),
|
||||
label: new Text(S.of(context).comunesSupportBtn),
|
||||
onPressed: () {
|
||||
|
|
@ -33,11 +33,12 @@ class _SupportPageState extends State<SupportPage> {
|
|||
Widget buildShareButton() {
|
||||
return new Align(
|
||||
alignment: const Alignment(0.0, -0.2),
|
||||
child: new OutlineButton.icon(
|
||||
child: new OutlinedButton.icon(
|
||||
icon: const Icon(Icons.share),
|
||||
label: new Text(S.of(context).shareAppBtn),
|
||||
onPressed: () {
|
||||
Share.shareWithResult('https://play.google.com/store/apps/details?id=org.comunes.fires');
|
||||
Share.shareWithResult(
|
||||
'https://play.google.com/store/apps/details?id=org.comunes.fires');
|
||||
},
|
||||
),
|
||||
);
|
||||
|
|
@ -46,11 +47,11 @@ class _SupportPageState extends State<SupportPage> {
|
|||
Widget buildStarButton() {
|
||||
return new Align(
|
||||
alignment: const Alignment(0.0, -0.2),
|
||||
child: new OutlineButton.icon(
|
||||
child: new OutlinedButton.icon(
|
||||
icon: const Icon(Icons.star_border),
|
||||
label: new Text(S.of(context).starAppBtn),
|
||||
onPressed: () {
|
||||
LaunchReview.launch();
|
||||
InAppReview.instance.requestReview();
|
||||
},
|
||||
),
|
||||
);
|
||||
|
|
@ -59,11 +60,12 @@ class _SupportPageState extends State<SupportPage> {
|
|||
Widget buildTranslateButton() {
|
||||
return new Align(
|
||||
alignment: const Alignment(0.0, -0.2),
|
||||
child: new OutlineButton.icon(
|
||||
child: new OutlinedButton.icon(
|
||||
icon: const Icon(Icons.translate),
|
||||
label: new Text(S.of(context).translateBtn),
|
||||
onPressed: () {
|
||||
launch("https://translate.comunes.org/projects/todos-contra-el-fuego/");
|
||||
launch(
|
||||
"https://translate.comunes.org/projects/todos-contra-el-fuego/");
|
||||
},
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue