52 lines
1.4 KiB
Dart
52 lines
1.4 KiB
Dart
import 'package:animated_background/animated_background.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
class NotFoundPage extends StatefulWidget {
|
|
const NotFoundPage({super.key});
|
|
|
|
@override
|
|
State<StatefulWidget> createState() => _NotFoundPageState();
|
|
}
|
|
|
|
class _NotFoundPageState extends State<NotFoundPage>
|
|
with TickerProviderStateMixin {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: AnimatedBackground(
|
|
behaviour: RandomParticleBehaviour(),
|
|
vsync: this,
|
|
child: Center(
|
|
child: Text(
|
|
'Page not found',
|
|
style: Theme.of(context).textTheme.headlineMedium,
|
|
),
|
|
),
|
|
),
|
|
bottomSheet: Container(
|
|
color: Colors.black.withAlpha(100),
|
|
padding: const EdgeInsets.all(16),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
if (Navigator.of(context).canPop())
|
|
ElevatedButton(
|
|
onPressed: () {
|
|
Get.back(canPop: false);
|
|
},
|
|
child: const Text('Go back'),
|
|
),
|
|
const SizedBox(width: 16),
|
|
ElevatedButton(
|
|
onPressed: () {
|
|
Get.offAllNamed("/");
|
|
},
|
|
child: const Text('Go home'),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|