handles errors in a more use friendly way
Some checks failed
Some checks failed
This commit is contained in:
@@ -16,22 +16,27 @@ class CurrentTripErrorMessage extends StatefulWidget {
|
||||
class _CurrentTripErrorMessageState extends State<CurrentTripErrorMessage> {
|
||||
@override
|
||||
Widget build(BuildContext context) => Center(
|
||||
child: Row(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.error_outline,
|
||||
color: Colors.red,
|
||||
size: 50,
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(left: 10),
|
||||
Text(
|
||||
"😢",
|
||||
style: TextStyle(
|
||||
fontSize: 40,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
AutoSizeText(
|
||||
'Error: ${widget.trip.errorDescription}',
|
||||
maxLines: 3,
|
||||
// at this point the trip is guaranteed to have an error message
|
||||
widget.trip.errorDescription!,
|
||||
maxLines: 30,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
textAlign: TextAlign.center,
|
||||
|
||||
),
|
||||
],
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user