canonical / canonical/ubuntu-flutter-plugins
Provide better errors
- Dominant language
- Dart
- Stars
- 66
- Forks
- 16
- Avg merge
- 19m
- Merged PRs (30d)
- 1
Description
A missing route should throw a FlutterError with a clear description instead of a vague null check operator error:

Steps to reproduce:
While testing #656, I changed the initial route but forgot to restore the route itself:
```diff
diff --git a/packages/ubuntu_desktop_installer/lib/routes.dart b/packages/ubuntu_desktop_installer/lib/routes.dart
index fcab20a0..7c0a33fc 100644
--- a/packages/ubuntu_desktop_installer/lib/routes.dart
+++ b/packages/ubuntu_desktop_installer/lib/routes.dart
@@ -1,5 +1,5 @@
abstract class Routes {
- static const initial = welcome;
+ static const initial = chooseYourLook;
static const welcome = '/welcome';
static const tryOrInstall = '/tryorinstall';
static const turnOffRST = '/turnoffrst';
```
Imported from https://github.com/canonical/ubuntu-flutter-plugins/issues/29
Contributor guide
Assessment
This issue has not been assessed yet.