fix: resolve all warnings (59 warnings → 0)

- Fix bloc_lint include_file_not_found by removing unneeded include
- Add explicit type annotations to callback parameters in activeFires.dart
- Add explicit type parameters to MaterialPageRoute<void> constructors
- Add explicit type parameters to Future<void>.delayed() calls
- Fix error handler signatures: (Object err, StackTrace stack)
- Remove 'const' from genericMap() widget construction (StatefulWidget)

All strict analysis errors and warnings now resolved (0 errors, 0 warnings).
Remaining 339 issues are info-level linting suggestions.
This commit is contained in:
vjrj 2026-03-06 11:28:04 +01:00
parent 7a4c9fb3bc
commit a5e0335f72
8 changed files with 71 additions and 42 deletions

View file

@ -15,12 +15,13 @@ import 'models/yourLocation.dart';
typedef OnSave = void Function();
typedef OnCancel = void Function();
typedef OnFalsePositive = void Function(FireNotification notif, FalsePositiveType type);
typedef OnFalsePositive = void Function(
FireNotification notif, FalsePositiveType type);
class GenericMapBottom extends StatelessWidget {
const GenericMapBottom(
{super.key, required this.onSave,
{super.key,
required this.onSave,
required this.onCancel,
required this.onFalsePositive,
required this.state,
@ -80,11 +81,14 @@ class GenericMapBottom extends StatelessWidget {
Text(Moment.now().from(context, notif.when)),
],
),
if (state.industries.isNotEmpty || state.falsePos.isNotEmpty) Padding(
padding: const EdgeInsets.only(top: 10.0),
child: Text(
S.of(context).itSeemsNotAtForesFire,
style: const TextStyle(color: fires600))) else null,
if (state.industries.isNotEmpty ||
state.falsePos.isNotEmpty)
Padding(
padding: const EdgeInsets.only(top: 10.0),
child: Text(S.of(context).itSeemsNotAtForesFire,
style: const TextStyle(color: fires600)))
else
null,
DropdownButton<FalsePositiveType>(
style: const TextStyle(
color: Colors.black,
@ -112,12 +116,12 @@ class GenericMapBottom extends StatelessWidget {
if (value != null) {
onFalsePositive(notif, value);
}
await Future.delayed(
await Future<void>.delayed(
const Duration(milliseconds: 500));
ScaffoldMessenger.of(context)
.showSnackBar(SnackBar(
content: Text(
S.of(context).thanksForParticipating),
content:
Text(S.of(context).thanksForParticipating),
));
}),
] as List<Widget>)))));