Line data Source code
1 : import 'package:flutter/material.dart';
2 :
3 : /// This widget just displays the available info if there is an error during
4 : /// intialization.
5 : ///
6 : /// It's not particularly pretty but it shouldn't ever be seen and if it is,
7 : /// we just need to view the available info.
8 : class InitializingErrorPage extends StatelessWidget {
9 : final dynamic _error;
10 : final StackTrace _trace;
11 0 : const InitializingErrorPage(dynamic error, StackTrace trace, {Key? key})
12 : : _error = error,
13 : _trace = trace,
14 0 : super(key: key);
15 0 : @override
16 : Widget build(BuildContext context) {
17 0 : return Material(
18 0 : child: SingleChildScrollView(
19 0 : child: ListBody(
20 0 : children: <Widget>[
21 : const SizedBox(height: 50),
22 : const Text('Looks like there was a problem.',
23 : textDirection: TextDirection.ltr),
24 : const SizedBox(height: 20),
25 0 : Text(_error.toString(), textDirection: TextDirection.ltr),
26 : const SizedBox(height: 50),
27 0 : Text(_trace.toString(), textDirection: TextDirection.ltr),
28 : ],
29 : ),
30 : ),
31 : );
32 : }
33 : }
|