Added custom error screen widget
This commit is contained in:
parent
88c6ff438b
commit
244a042029
@ -5,6 +5,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:jiffy/jiffy.dart';
|
||||
import 'package:marianum_mobile/data/timetable/timetableProps.dart';
|
||||
import 'package:marianum_mobile/screen/login/login.dart';
|
||||
import 'package:marianum_mobile/widget/errorView.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
@ -20,6 +21,10 @@ Future<void> main() async {
|
||||
ByteData data = await PlatformAssetBundle().load('assets/ca/lets-encrypt-r3.pem');
|
||||
SecurityContext.defaultContext.setTrustedCertificatesBytes(data.buffer.asUint8List());
|
||||
|
||||
ErrorWidget.builder = (error) {
|
||||
return ErrorView(icon: Icons.phonelink_erase_rounded, text: error.toString());
|
||||
};
|
||||
|
||||
runApp(
|
||||
MultiProvider(
|
||||
providers: [
|
||||
|
@ -107,7 +107,6 @@ flutter:
|
||||
- assets/ca/
|
||||
- assets/background/
|
||||
- assets/logo/
|
||||
- assets/logo/icon
|
||||
- assets/img/
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
|
Loading…
x
Reference in New Issue
Block a user