update home grid button

add fixed submit page
hmxc
张萌 4 years ago
parent dd103d1ecf
commit 8e5b2f2fcb

@ -28,10 +28,6 @@ PODS:
- AMapFoundation-NO-IDFA (~> 1.6.4)
- AMapSearch-NO-IDFA (7.3.0):
- AMapFoundation-NO-IDFA (~> 1.6.3)
- barcode_scan (0.0.1):
- Flutter
- MTBBarcodeScanner
- SwiftProtobuf
- BSGridCollectionViewLayout (1.2.5)
- BSImagePicker (2.10.3):
- BSGridCollectionViewLayout (= 1.2.5)
@ -59,6 +55,9 @@ PODS:
- Flutter
- "permission_handler (5.0.1+1)":
- Flutter
- qr_code_scanner (0.2.0):
- Flutter
- MTBBarcodeScanner
- screen (0.0.1):
- Flutter
- shared_preferences (0.0.1):
@ -66,7 +65,6 @@ PODS:
- sqflite (0.0.1):
- Flutter
- FMDB (~> 2.7.2)
- SwiftProtobuf (1.12.0)
- url_launcher (0.0.1):
- Flutter
- video_player (0.0.1):
@ -82,7 +80,6 @@ DEPENDENCIES:
- amap_location_fluttify (from `.symlinks/plugins/amap_location_fluttify/ios`)
- amap_map_fluttify (from `.symlinks/plugins/amap_map_fluttify/ios`)
- amap_search_fluttify (from `.symlinks/plugins/amap_search_fluttify/ios`)
- barcode_scan (from `.symlinks/plugins/barcode_scan/ios`)
- core_location_fluttify (from `.symlinks/plugins/core_location_fluttify/ios`)
- Flutter (from `Flutter`)
- fluwx (from `.symlinks/plugins/fluwx/ios`)
@ -91,6 +88,7 @@ DEPENDENCIES:
- package_info (from `.symlinks/plugins/package_info/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`)
- screen (from `.symlinks/plugins/screen/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
@ -110,7 +108,6 @@ SPEC REPOS:
- BSImageView
- FMDB
- MTBBarcodeScanner
- SwiftProtobuf
- WechatOpenSDK
EXTERNAL SOURCES:
@ -122,8 +119,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/amap_map_fluttify/ios"
amap_search_fluttify:
:path: ".symlinks/plugins/amap_search_fluttify/ios"
barcode_scan:
:path: ".symlinks/plugins/barcode_scan/ios"
core_location_fluttify:
:path: ".symlinks/plugins/core_location_fluttify/ios"
Flutter:
@ -140,6 +135,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/path_provider/ios"
permission_handler:
:path: ".symlinks/plugins/permission_handler/ios"
qr_code_scanner:
:path: ".symlinks/plugins/qr_code_scanner/ios"
screen:
:path: ".symlinks/plugins/screen/ios"
shared_preferences:
@ -164,7 +161,6 @@ SPEC CHECKSUMS:
AMapFoundation-NO-IDFA: 68a24362b110b8e0a3677605d0fd36bdf521f2bb
AMapLocation-NO-IDFA: 2a3edfee336b38481b892e1ecc85df0f6b365851
AMapSearch-NO-IDFA: 85555dc9ba312949d39a259baa4ef4e0619fa944
barcode_scan: a5c27959edfafaa0c771905bad0b29d6d39e4479
BSGridCollectionViewLayout: 333dcb457a5a3bdd9212607ab5756553dcfe06cb
BSImagePicker: 07404254f2fcdaf5a2eb403c0f8c337267ce8738
BSImageView: a149459433a2687157d034c78e059d30ac7f2544
@ -178,10 +174,10 @@ SPEC CHECKSUMS:
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
screen: abd91ca7bf3426e1cc3646d27e9b2358d6bf07b0
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0
SwiftProtobuf: 4ef85479c18ca85b5482b343df9c319c62bda699
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
wakelock: 0d4a70faf8950410735e3f61fb15d517c8a6efc4

@ -5,6 +5,7 @@ import 'package:akuCommunity/pages/message_center_page/message_center_page.dart'
import 'package:akuCommunity/pages/scan/scan_page.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/extensions/num_ext.dart';
import 'package:akuCommunity/widget/home_gride_button.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_icons/flutter_icons.dart';
@ -159,9 +160,8 @@ class _HomePageState extends State<HomePage>
SizedBox(height: 100.w),
ContainerComment(
radius: 8,
customWidget: GridButton(
gridList: AssetsImage.homeGridList,
count: 4,
customWidget: HomeGridButton(
crossCount: 4,
),
),
SingleAdSpace(

@ -0,0 +1,17 @@
import 'package:flutter/material.dart';
class FixedSubmitPage extends StatefulWidget {
FixedSubmitPage({Key key}) : super(key: key);
@override
_FixedSubmitPageState createState() => _FixedSubmitPageState();
}
class _FixedSubmitPageState extends State<FixedSubmitPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
);
}
}

@ -0,0 +1,93 @@
import 'package:akuCommunity/pages/convenient_phone/convenient_phone_page.dart';
import 'package:akuCommunity/pages/industry_committee/industry_committee_page.dart';
import 'package:akuCommunity/pages/life_pay/life_pay_page.dart';
import 'package:akuCommunity/pages/open_door_page/open_door_page.dart';
import 'package:akuCommunity/pages/things_page/things_page.dart';
import 'package:akuCommunity/pages/total_application_page/total_applications_page.dart';
import 'package:akuCommunity/pages/visitor_access_page/visitor_access_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:akuCommunity/const/resource.dart';
import 'package:get/get.dart';
class HomeGridButton extends StatefulWidget {
final int crossCount;
HomeGridButton({Key key, this.crossCount}) : super(key: key);
@override
_HomeGridButtonState createState() => _HomeGridButtonState();
}
class GridButton {
String title;
String path;
VoidCallback onTap;
GridButton(this.title, this.path, this.onTap);
}
class _HomeGridButtonState extends State<HomeGridButton> {
List<GridButton> _gridList = [
GridButton('一键开门', R.ASSETS_ICONS_TOOL_YJKM_PNG, () {
Get.to(OpenDoorPage());
}),
GridButton('访客通行', R.ASSETS_ICONS_TOOL_FKYQ_PNG, () {
Get.to(VisitorAccessPage());
}),
GridButton('报事报修', R.ASSETS_ICONS_TOOL_BSBX_PNG, () {
Get.to(ThingsPage());
}),
GridButton('生活缴费', R.ASSETS_ICONS_TOOL_SHJF_PNG, () {
Get.to(LifePayPage());
}),
GridButton('业委会', R.ASSETS_ICONS_TOOL_YWH_PNG, () {
Get.to(IndustryCommitteePage());
}),
GridButton('建议咨询', R.ASSETS_ICONS_TOOL_JYTS_PNG, () {
Get.to(ThingsPage());
}),
GridButton('便民电话', R.ASSETS_ICONS_TOOL_BMDH_PNG, () {
Get.to(ConvenientPhonePage());
}),
GridButton('全部应用', R.ASSETS_ICONS_TOOL_QBYY_PNG, () {
Get.to(TotalApplicationsPage());
}),
];
@override
Widget build(BuildContext context) {
return GridView.builder(
padding: EdgeInsets.zero,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: _gridList.length,
itemBuilder: (BuildContext context, int index) {
return InkWell(
onTap: _gridList[index].onTap,
child: Container(
alignment: Alignment.center,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Image.asset(
_gridList[index].path,
height: 53.w,
width: 53.w,
fit: BoxFit.cover,
),
SizedBox(height: 5),
Text(
_gridList[index].title,
style: TextStyle(fontSize: 24.sp),
)
],
),
),
);
},
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: widget.crossCount,
mainAxisSpacing: 6.0,
childAspectRatio: 1.0),
);
}
}
Loading…
Cancel
Save