Added custom Error view when in release
This commit is contained in:
parent
41372e9e86
commit
f2829e4200
@ -4,6 +4,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:jiffy/jiffy.dart';
|
||||
@ -42,9 +43,14 @@ 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 PlaceholderView(icon: Icons.phonelink_erase_rounded, text: error.toString());
|
||||
// };
|
||||
if(kReleaseMode) {
|
||||
ErrorWidget.builder = (error) {
|
||||
return PlaceholderView(
|
||||
icon: Icons.phonelink_erase_rounded,
|
||||
text: error.toStringShort(),
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
runApp(
|
||||
MultiProvider(
|
||||
|
Loading…
x
Reference in New Issue
Block a user