123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- import 'package:cpt_main/modules/visitor/page/visitor_page.dart';
- import 'package:cs_resources/generated/l10n.dart';
- import 'package:flutter/material.dart';
- import 'package:flutter/src/widgets/framework.dart';
- import 'package:hooks_riverpod/hooks_riverpod.dart';
- import 'package:auto_route/auto_route.dart';
- import 'package:router/componentRouter/component_service_manager.dart';
- import 'package:widgets/ext/ex_widget.dart';
- @RoutePage()
- class HomePage extends HookConsumerWidget {
- const HomePage({super.key});
- @override
- Widget build(BuildContext context, WidgetRef ref) {
- return Scaffold(
- appBar: AppBar(title: Text("Home")),
- body: Center(
- child: Column(
- children: [
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- children: [
- ElevatedButton(
- onPressed: () {
- ComponentServiceManager().paymentService.startPaymentPage();
- },
- child: Text(S.of(context).payment), //国际化中英文适配
- ),
- ElevatedButton(
- onPressed: () {
- ComponentServiceManager().rewardsService.startRewardsPage();
- },
- child: Text(S.of(context).rewards),
- ),
- ElevatedButton(
- onPressed: () {},
- child: Text(S.of(context).notification),
- ),
- ],
- ).marginOnly(top: 10),
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- children: [
- ElevatedButton(
- onPressed: () {
- ComponentServiceManager().facilityService.startFacilityPage();
- },
- child: Text(S.of(context).facility),
- ),
- ElevatedButton(
- onPressed: () {
- ComponentServiceManager().formService.startFormPage();
- },
- child: Text(S.of(context).form),
- ),
- ElevatedButton(
- onPressed: () {
- ComponentServiceManager().noticeBoardService.startNoticeBoardPage();
- },
- child: Text(S.of(context).notice_board),
- ),
- ],
- ).marginOnly(top: 10),
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- children: [
- ElevatedButton(
- onPressed: () {
- ComponentServiceManager().propertyService.startPropertyPage();
- },
- child: Text('Property'),
- ),
- ElevatedButton(
- onPressed: () {
- ComponentServiceManager().servicesService.startServicePage();
- },
- child: Text('Service'),
- ),
- ElevatedButton(
- onPressed: () {
- ComponentServiceManager().communityService.startCommunityPage();
- },
- child: Text('Community'),
- ),
- ],
- ).marginOnly(top: 10),
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- children: [
- ElevatedButton(
- onPressed: () {
- ComponentServiceManager().authService.startLoginPage();
- },
- child: Text('Login'),
- ),
- ElevatedButton(
- onPressed: () {
- ComponentServiceManager().authService.startResetPasswordPage();
- },
- child: Text('Forgot'),
- ),
- ElevatedButton(
- onPressed: () {},
- child: Text('Setting'),
- ),
- ],
- ).marginOnly(top: 10),
- ],
- ),
- ),
- );
- }
- }
|