1234567891011121314151617181920212223242526272829303132333435 |
- import 'package:flutter/material.dart';
- import 'package:auto_route/auto_route.dart';
- import 'package:hooks_riverpod/hooks_riverpod.dart';
- import 'package:router/ext/auto_router_extensions.dart';
- import '../../../router/page/facility_page_router.dart';
- import '../../facility/vm/facility_view_model.dart';
- @RoutePage()
- class FacilityPage extends HookConsumerWidget {
- const FacilityPage({Key? key}) : super(key: key);
- //启动当前页面
- static void startInstance({BuildContext? context}) {
- if (context != null) {
- context.router.push(const FacilityPageRoute());
- } else {
- appRouter.push(const FacilityPageRoute());
- }
- }
- @override
- Widget build(BuildContext context, WidgetRef ref) {
- final _viewModel = ref.read(facilityViewModelProvider.notifier);
- return Scaffold(
- appBar: AppBar(title: Text("设施")),
- body: Center(
- child: Text("设施的主页面"),
- ),
- );
- }
- }
|