diff --git a/lib/models/manager/facilities/facilities_card.dart b/lib/models/manager/facilities/facilities_card.dart index 74d32bd..970908e 100644 --- a/lib/models/manager/facilities/facilities_card.dart +++ b/lib/models/manager/facilities/facilities_card.dart @@ -1,7 +1,9 @@ +import 'package:aku_community_manager/models/manager/facilities/facilities_inspect_report_page.dart'; import 'package:aku_community_manager/models/manager/facilities/facilities_map.dart'; import 'package:aku_community_manager/style/app_style.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; import 'package:velocity_x/velocity_x.dart'; class FacilitiesCard extends StatefulWidget { @@ -15,6 +17,7 @@ class _FacilitiesCardState extends State { @override Widget build(BuildContext context) { return Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( children: [ @@ -35,6 +38,9 @@ class _FacilitiesCardState extends State { .withRounded(value: 8.w) .color(Colors.white) .padding(EdgeInsets.all(24.w)) - .make(); + .make() + .onInkTap(() { + Get.to(() => FacilitiesInspectReportPage()); + }); } } diff --git a/lib/models/manager/facilities/facilities_inspect_report_page.dart b/lib/models/manager/facilities/facilities_inspect_report_page.dart new file mode 100644 index 0000000..e471f0a --- /dev/null +++ b/lib/models/manager/facilities/facilities_inspect_report_page.dart @@ -0,0 +1,21 @@ +import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; +import 'package:flutter/material.dart'; + +class FacilitiesInspectReportPage extends StatefulWidget { + FacilitiesInspectReportPage({Key key}) : super(key: key); + + @override + _FacilitiesInspectReportPageState createState() => + _FacilitiesInspectReportPageState(); +} + +class _FacilitiesInspectReportPageState + extends State { + @override + Widget build(BuildContext context) { + return AkuScaffold( + title: '检查报告', + body: ListView(), + ); + } +} diff --git a/lib/models/manager/facilities/facilities_page.dart b/lib/models/manager/facilities/facilities_page.dart index 090dda3..a204305 100644 --- a/lib/models/manager/facilities/facilities_page.dart +++ b/lib/models/manager/facilities/facilities_page.dart @@ -44,6 +44,7 @@ class _FacilitiesPageState extends State preferredSize: Size.fromHeight(88.w), ), body: TabBarView( + controller: _tabController, children: List.generate(_tabs.length, (index) => FacilitiesView()), ), ); diff --git a/lib/models/manager/facilities/facilities_view.dart b/lib/models/manager/facilities/facilities_view.dart index dc97b72..14eda5b 100644 --- a/lib/models/manager/facilities/facilities_view.dart +++ b/lib/models/manager/facilities/facilities_view.dart @@ -1,3 +1,4 @@ +import 'package:aku_community_manager/models/manager/facilities/facilities_card.dart'; import 'package:flutter/material.dart'; class FacilitiesView extends StatefulWidget { @@ -10,6 +11,10 @@ class FacilitiesView extends StatefulWidget { class _FacilitiesViewState extends State { @override Widget build(BuildContext context) { - return ListView(); + return ListView( + children: [ + // FacilitiesCard(), + ], + ); } }