refactor: Make most of the utils null safe

This commit is contained in:
Krille Fear 2021-12-03 17:29:32 +01:00
commit 265ef0ebb2
23 changed files with 140 additions and 112 deletions

View file

@ -1,3 +1,5 @@
//@dart=2.12
import 'dart:io';
import 'package:flutter/foundation.dart';
@ -50,7 +52,7 @@ abstract class PlatformInfos {
Text('Version: $version'),
OutlinedButton(
onPressed: () => launch(AppConfig.sourceCodeUrl),
child: Text(L10n.of(context).sourceCode),
child: Text(L10n.of(context)!.sourceCode),
),
OutlinedButton(
onPressed: () => launch(AppConfig.emojiFontUrl),
@ -60,7 +62,7 @@ abstract class PlatformInfos {
onPressed: () => VRouter.of(context).to('logs'),
child: const Text('Logs'),
),
SentrySwitchListTile.adaptive(label: L10n.of(context).sendBugReports),
SentrySwitchListTile.adaptive(label: L10n.of(context)!.sendBugReports),
],
applicationIcon: Image.asset('assets/logo.png', width: 64, height: 64),
applicationName: AppConfig.applicationName,