vehicle_info_page.dart 829 B

1234567891011121314151617181920212223242526272829303132
  1. import 'package:flutter/material.dart';
  2. import 'package:auto_route/auto_route.dart';
  3. import 'package:hooks_riverpod/hooks_riverpod.dart';
  4. import 'package:router/ext/auto_router_extensions.dart';
  5. import '../../router/page/form_page_router.dart';
  6. @RoutePage()
  7. class VehicleInfoPage extends HookConsumerWidget {
  8. const VehicleInfoPage({Key? key}) : super(key: key);
  9. //启动当前页面
  10. static void startInstance({BuildContext? context}) {
  11. if (context != null) {
  12. context.router.push(const VehicleInfoPageRoute());
  13. } else {
  14. appRouter.push(const VehicleInfoPageRoute());
  15. }
  16. }
  17. @override
  18. Widget build(BuildContext context, WidgetRef ref) {
  19. return Scaffold(
  20. appBar: AppBar(title: Text("VehicleInfoPage")),
  21. body: Center(
  22. child: Text("VehicleInfoPage"),
  23. ),
  24. );
  25. }
  26. }