Commit 423dc56f authored by Leon Tappe's avatar Leon Tappe 🔥
Browse files

improve and unify error layout more

parent b616f306
......@@ -12,7 +12,7 @@ PODS:
- Flutter
- MTBBarcodeScanner
- Reachability (3.2)
- shared_preferences (0.0.1):
- shared_preferences_ios (0.0.1):
- Flutter
- url_launcher (0.0.1):
- Flutter
......@@ -23,7 +23,7 @@ DEPENDENCIES:
- package_info (from `.symlinks/plugins/package_info/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
- qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
SPEC REPOS:
......@@ -42,8 +42,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/path_provider_ios/ios"
qr_code_scanner:
:path: ".symlinks/plugins/qr_code_scanner/ios"
shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios"
shared_preferences_ios:
:path: ".symlinks/plugins/shared_preferences_ios/ios"
url_launcher:
:path: ".symlinks/plugins/url_launcher/ios"
......@@ -55,7 +55,7 @@ SPEC CHECKSUMS:
path_provider_ios: 7d7ce634493af4477d156294792024ec3485acd5
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
shared_preferences: 5033afbb22d372e15aff8ff766df9021b845f273
shared_preferences_ios: aef470a42dc4675a1cdd50e3158b42e3d1232b32
url_launcher: b6e016d912f04be9f5bf6e8e82dc599b7ba59649
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
......
......@@ -11,10 +11,7 @@ class ErrorColumn extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
'Dein Nachweis ist nicht mehr gültig',
style: Theme.of(context).textTheme.headline4,
),
Text(text, style: Theme.of(context).textTheme.headline4, textAlign: TextAlign.center),
if (action != null) const Divider(),
action ?? const SizedBox(height: 0.0, width: 0.0)
],
......
......@@ -130,11 +130,13 @@ class _HomePageState extends State<HomePage> {
.textTheme
.headline4!
.copyWith(color: const Color(0xFF33ce55)),
textAlign: TextAlign.center,
)
else
Text(
'Heute ist keine Farbe vorhanden',
style: Theme.of(context).textTheme.headline4,
textAlign: TextAlign.center,
)
else if (state == VerificationState.unverified)
ErrorColumn(
......@@ -163,7 +165,7 @@ class _HomePageState extends State<HomePage> {
)
else if (_bloc!.error == VerificationErrorType.signing)
ErrorColumn(
'Die Signatur deines Nachweises konnte nicht bestätigt werden. Hast du aus Versehen das Debug-Backend an?',
'Die Signatur deines Nachweises ist ungültig',
action: BlocProvider.of<BackendSwitcher>(context).mode ==
BackendMode.development
? ElevatedButton(
......@@ -188,6 +190,7 @@ class _HomePageState extends State<HomePage> {
Text(
'Ein unbekanntes Problem wurde festgestellt',
style: Theme.of(context).textTheme.headline4,
textAlign: TextAlign.center,
),
],
),
......@@ -209,7 +212,7 @@ class _HomePageState extends State<HomePage> {
return const SizedBox(width: 0.0, height: 0.0);
},
),
if (state != VerificationState.noTicket)
if (state != VerificationState.noTicket && state != VerificationState.error)
Expanded(
child: Padding(
padding: const EdgeInsets.all(16.0),
......@@ -225,7 +228,9 @@ class _HomePageState extends State<HomePage> {
)
: Container(),
),
),
)
else if (state != VerificationState.noTicket)
const Spacer(),
if (_showHelp)
Card(
clipBehavior: Clip.antiAlias,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment