-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use a router for navigation (#185)
* [router] add home and article * [router] add more routes; make video and article reachable only from url! * [router] add drivers and teams * [router] add 404, circuit, free practice, settings without update function * [router] add results, support routes with bbbuttons * [router] fix * [router] improve circuit screen when coming from url * [router] make results available from url too * [router] add schedule and standings * [router] add racehub * [router] add all results routes * [router] forgot this one * [shared links] fix texts, improve handler * [router] translate 404 page * [router] review fixes
- Loading branch information
Showing
30 changed files
with
1,494 additions
and
868 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* This file is part of BoxBox (https://github.com/BrightDV/BoxBox). | ||
* | ||
* BoxBox is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* BoxBox is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with BoxBox. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Copyright (c) 2022-2024, BrightDV | ||
*/ | ||
|
||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; | ||
import 'package:go_router/go_router.dart'; | ||
|
||
class ErrorNotFoundScreen extends StatelessWidget { | ||
final String? route; | ||
const ErrorNotFoundScreen({super.key, this.route}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar( | ||
centerTitle: true, | ||
title: const Text( | ||
'Box, Box!', | ||
style: TextStyle( | ||
fontWeight: FontWeight.w700, | ||
), | ||
), | ||
backgroundColor: Theme.of(context).colorScheme.onPrimary, | ||
), | ||
body: Center( | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
Padding( | ||
padding: EdgeInsets.only(bottom: 5), | ||
child: Text( | ||
AppLocalizations.of(context)!.offtrack, | ||
style: TextStyle(fontSize: 24), | ||
), | ||
), | ||
Padding( | ||
padding: EdgeInsets.only(bottom: 30), | ||
child: Text( | ||
route ?? '', | ||
style: TextStyle(fontSize: 14), | ||
), | ||
), | ||
ElevatedButton( | ||
onPressed: () => context.go("/"), | ||
child: Text(AppLocalizations.of(context)!.offtrackSub), | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.