build method
dynamic
build( - dynamic context,
- dynamic ref
)
Implementation
@override
Widget build(BuildContext context, WidgetRef ref) {
final currentLocation = routerState.fullPath;
return Scaffold(
appBar: AppBar(title: const Text('404 - oopsie')),
body: Center(
child: Column(
children: [
SizedBox(
height: 200,
width: 200,
child: SvgPicture.asset('assets/images/genericError.svg'),
),
Text(
'How did you get here? There is nothing to see at `$currentLocation`...',
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
OutlinedButton.icon(
icon: const Icon(Atlas.home_thin),
label: const Text('Go to home'),
onPressed: () => context.goNamed(Routes.main.name),
),
OutlinedButton.icon(
icon: const Icon(Atlas.bug_clipboard_thin),
label: const Text('Report bug'),
onPressed: () => openBugReport(
context,
queryParams: {'error': '404 for $currentLocation'},
),
),
],
),
],
),
),
);
}