29 lines
832 B
Dart
29 lines
832 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
class RouteErrorPage extends StatelessWidget {
|
|
const RouteErrorPage({super.key, required this.error});
|
|
final Object? error;
|
|
@override
|
|
Widget build(BuildContext context) => Scaffold(
|
|
body: Center(
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(24),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
const Icon(Icons.explore_off_outlined, size: 40),
|
|
const SizedBox(height: 14),
|
|
const Text('页面不存在或已失效'),
|
|
const SizedBox(height: 12),
|
|
FilledButton(
|
|
onPressed: () => context.go('/assets'),
|
|
child: const Text('回到首页'),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|