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 createState() => _NotFoundPageState(); } class _NotFoundPageState extends State 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'), ), ], ), ), ); } }