添加搜索页面

hmxc
张萌 4 years ago
parent 7257204c02
commit ade2438315

@ -77,33 +77,39 @@ class _ApplicationPageState extends State<ApplicationPage>
width: 89.w,
child: AkuBackButton(),
),
titleSpacing: 0,
title: Container(
margin: EdgeInsets.only(right: 37.w),
padding: EdgeInsets.symmetric(horizontal: 32.w),
height: 72.w,
child: Row(
children: [
Image.asset(
R.ASSETS_HOME_IC_SEARCH_PNG,
height: 40.w,
width: 40.w,
),
AkuBox.w(16),
Text(
'搜索应用',
style: TextStyle(
color: AppStyle.minorTextColor,
fontSize: 28.sp,
),
),
],
),
decoration: BoxDecoration(
color: Color(0xFFF9F9F9),
borderRadius: BorderRadius.circular(8.w),
),
),
// titleSpacing: 0,
// title: Container(
// margin: EdgeInsets.only(right: 37.w),
// padding: EdgeInsets.symmetric(horizontal: 32.w),
// height: 72.w,
// child: Row(
// children: [
// Image.asset(
// R.ASSETS_HOME_IC_SEARCH_PNG,
// height: 40.w,
// width: 40.w,
// ),
// AkuBox.w(16),
// Text(
// '搜索应用',
// style: TextStyle(
// color: AppStyle.minorTextColor,
// fontSize: 28.sp,
// ),
// ),
// ],
// ),
// decoration: BoxDecoration(
// color: Color(0xFFF9F9F9),
// borderRadius: BorderRadius.circular(8.w),
// ),
// ),
// ),
title: Text(
'全部应用',
style: AppStyle().barTitleStyle,
),
centerTitle: true,
),
body: Column(
children: [
@ -274,11 +280,17 @@ class _ApplicationPageState extends State<ApplicationPage>
children: [
Image.asset(
application.assetPath,
height: 72.w,
width: 72.w,
height: 60.w,
width: 60.w,
),
AkuBox.h(8),
Text(application.name),
Text(
application.name,
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold),
),
],
),
);

@ -13,6 +13,7 @@ import 'package:aku_community_manager/ui/home/business/business_page.dart';
import 'package:aku_community_manager/ui/home/messages/message.dart';
import 'package:aku_community_manager/ui/home/application/applications_page.dart';
import 'package:aku_community_manager/ui/home/personal_draw.dart';
import 'package:aku_community_manager/ui/home/search_workorder_page.dart';
import 'package:aku_community_manager/ui/login/login_page.dart';
import 'package:aku_community_manager/ui/sub_pages/business_and_fix/business_fix_card.dart';
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_manager_card.dart';
@ -206,7 +207,9 @@ class _HomePageState extends State<HomePage> {
child: AkuButton(
//
color: Color(0xFFFFFFFF),
onPressed: () {},
onPressed: () {
Get.to(SearchWorkOrderPage());
},
radius: 8.w,
child: Row(children: [
AkuBox.w(21.w),
@ -423,13 +426,12 @@ class _HomePageState extends State<HomePage> {
mainAxisAlignment: MainAxisAlignment.center,
children:
_anouncementProvider.anouncementCardModels.map((e) {
int index = _anouncementProvider.anouncementCardModels
.indexOf(e);
int index =
_anouncementProvider.anouncementCardModels.indexOf(e);
return Container(
width: 12.w,
height: 12.w,
margin: EdgeInsets.symmetric(
horizontal: 12.w),
margin: EdgeInsets.symmetric(horizontal: 12.w),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: _currentIndicator == index

@ -0,0 +1,93 @@
import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/tools/widget_tool.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_back_button.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:aku_community_manager/const/resource.dart';
class SearchWorkOrderPage extends StatefulWidget {
SearchWorkOrderPage({Key key}) : super(key: key);
@override
_SearchWorkOrderpageState createState() => _SearchWorkOrderpageState();
}
class _SearchWorkOrderpageState extends State<SearchWorkOrderPage> {
TextEditingController _textController;
@override
void initState() {
super.initState();
_textController = TextEditingController();
}
@override
void dispose() {
_textController?.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return AkuScaffold(
appBar: AppBar(
brightness: Brightness.light,
elevation: 0,
backgroundColor: Colors.white,
leading: SizedBox(
width: 89.w,
child: AkuBackButton(),
),
titleSpacing: 0,
title: Container(
margin: EdgeInsets.only(right: 37.w),
padding: EdgeInsets.symmetric(horizontal: 32.w),
height: 72.w,
child: Row(
children: [
Image.asset(
R.ASSETS_HOME_IC_SEARCH_PNG,
height: 40.w,
width: 40.w,
),
AkuBox.w(16),
Expanded(
child: TextFormField(
controller: _textController,
decoration: InputDecoration(
hintText: '搜索工单、手机号',
hintStyle: TextStyle(
color: AppStyle.minorTextColor,
fontSize: 28.sp,
),
border: InputBorder.none,
),
style: TextStyle(
color: AppStyle.minorTextColor,
fontSize: 28.sp,
),
onChanged: (text) {
setState(() {});
},
),
),
],
),
decoration: BoxDecoration(
color: Color(0xFFF9F9F9),
borderRadius: BorderRadius.circular(8.w),
),
),
),
body: Center(
child: _textController.text.isEmpty
? SizedBox()
: Text(
'无结果',
style: TextStyle(
color: AppStyle.primaryTextColor, fontSize: 36.sp),
),
),
);
}
}
Loading…
Cancel
Save