* dev: add decoration page add check page 报事报修页面更新 # Conflicts: # lib/ui/home/application/applications_page.darthmxc
commit
70f233fe6e
After Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,168 @@
|
||||
import 'package:aku_community_manager/const/resource.dart';
|
||||
import 'package:aku_community_manager/mock_models/fix/fix_model.dart';
|
||||
import 'package:aku_community_manager/provider/user_provider.dart';
|
||||
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_scaffold.dart';
|
||||
import 'package:aku_ui/common_widgets/aku_material_button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:aku_community_manager/tools/screen_tool.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class FixMoreTimePage extends StatefulWidget {
|
||||
final FixModel model;
|
||||
FixMoreTimePage({Key key, @required this.model}) : super(key: key);
|
||||
|
||||
@override
|
||||
_FixMoreTimePageState createState() => _FixMoreTimePageState();
|
||||
}
|
||||
|
||||
class _FixMoreTimePageState extends State<FixMoreTimePage> {
|
||||
String _nowSelect = '24h';
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AkuScaffold(
|
||||
title: '申请延时',
|
||||
backgroundColor: Colors.white,
|
||||
body: ListView(
|
||||
children: [
|
||||
Container(
|
||||
height: 16.w,
|
||||
color: Color(0xFFF9F9F9),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 24.w,
|
||||
horizontal: 32.w,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
'延长时间',
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 32.sp,
|
||||
),
|
||||
),
|
||||
AkuBox.h(24),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: ['24h', '48h', '72h', '未知'].map((e) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
_nowSelect = e;
|
||||
});
|
||||
},
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: 160.w,
|
||||
height: 80.w,
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
e,
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 28.sp,
|
||||
),
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFF9F9F9),
|
||||
borderRadius: BorderRadius.circular(4.w),
|
||||
border: _nowSelect == e
|
||||
? Border.all(
|
||||
width: 3.w,
|
||||
color: AppStyle.primaryTextColor,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 3.w,
|
||||
top: 3.w,
|
||||
child: _nowSelect == e
|
||||
? Image.asset(
|
||||
R.ASSETS_MANAGE_CHECK_PNG,
|
||||
height: 30.w,
|
||||
width: 30.w,
|
||||
)
|
||||
: SizedBox(),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
AkuBox.h(40),
|
||||
Text(
|
||||
'备注',
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 32.sp,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.w),
|
||||
border: Border.all(
|
||||
width: 2.w,
|
||||
color: Color(0xFFE8E8E8),
|
||||
),
|
||||
),
|
||||
margin: EdgeInsets.only(
|
||||
top: 24.w,
|
||||
bottom: 340.w,
|
||||
),
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 16.w,
|
||||
horizontal: 24.w,
|
||||
),
|
||||
child: TextField(
|
||||
minLines: 7,
|
||||
maxLines: 7,
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
border: InputBorder.none,
|
||||
hintText: '请输入延长时间说明…',
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w),
|
||||
child: AkuMaterialButton(
|
||||
onPressed: () {
|
||||
final userProvider =
|
||||
Provider.of<UserProvider>(context, listen: false);
|
||||
widget.model.detail.fixStatuses.add(
|
||||
FixStatus(
|
||||
title: '${userProvider.userInfoModel.nickName}申请延时',
|
||||
date: DateTime.now()),
|
||||
);
|
||||
Get.back();
|
||||
},
|
||||
radius: 8.w,
|
||||
child: Text(
|
||||
'确定',
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 32.sp,
|
||||
),
|
||||
),
|
||||
color: AppStyle.primaryColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,277 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:aku_community_manager/mock_models/fix/fix_model.dart';
|
||||
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_scaffold.dart';
|
||||
import 'package:aku_community_manager/tools/screen_tool.dart';
|
||||
import 'package:aku_community_manager/ui/widgets/inner/aku_title_box.dart';
|
||||
import 'package:aku_community_manager/ui/widgets/inner/pick_image.dart';
|
||||
import 'package:aku_ui/common_widgets/aku_material_button.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class FixWorkFinishPage extends StatefulWidget {
|
||||
final FixModel model;
|
||||
FixWorkFinishPage({Key key, @required this.model}) : super(key: key);
|
||||
|
||||
@override
|
||||
_FixWorkFinishPageState createState() => _FixWorkFinishPageState();
|
||||
}
|
||||
|
||||
class _FixWorkFinishPageState extends State<FixWorkFinishPage> {
|
||||
List<File> _imgs = [];
|
||||
TextEditingController _descriptionController = TextEditingController();
|
||||
TextEditingController _materialController = TextEditingController();
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AkuScaffold(
|
||||
title: '处理完成',
|
||||
body: ListView(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 16.w,
|
||||
),
|
||||
children: [
|
||||
AkuTitleBox(
|
||||
title: '报修信息',
|
||||
spacing: 24,
|
||||
children: [
|
||||
Text(
|
||||
widget.model.title,
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 28.w,
|
||||
),
|
||||
),
|
||||
AkuBox.h(16),
|
||||
GridView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 4,
|
||||
crossAxisSpacing: 16.w,
|
||||
mainAxisSpacing: 16.w,
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
final img = widget.model.imgs[index];
|
||||
return ClipRRect(
|
||||
borderRadius: BorderRadius.circular(4.w),
|
||||
child: (img is String) ? Image.asset(img) : Image.file(img),
|
||||
);
|
||||
},
|
||||
itemCount: widget.model.imgs.length,
|
||||
),
|
||||
],
|
||||
),
|
||||
AkuTitleBox(
|
||||
title: '处理情况',
|
||||
spacing: 24.w,
|
||||
children: [
|
||||
Text(
|
||||
'处理描述',
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 28.w,
|
||||
),
|
||||
),
|
||||
AkuBox.h(24),
|
||||
TextField(
|
||||
controller: _descriptionController,
|
||||
minLines: 4,
|
||||
maxLines: 99,
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
vertical: 16.w,
|
||||
horizontal: 24.w,
|
||||
),
|
||||
hintText: '请输入处理描述…',
|
||||
hintStyle: TextStyle(
|
||||
color: AppStyle.minorTextColor,
|
||||
fontSize: 28.w,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Color(0xFFE8E8E8),
|
||||
width: 2.w,
|
||||
),
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Color(0xFFE8E8E8),
|
||||
width: 2.w,
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Color(0xFFE8E8E8),
|
||||
width: 2.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
AkuBox.h(32),
|
||||
Text(
|
||||
'更换材料(含辅料)',
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 28.w,
|
||||
),
|
||||
),
|
||||
AkuBox.h(24),
|
||||
TextField(
|
||||
controller: _materialController,
|
||||
minLines: 3,
|
||||
maxLines: 99,
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
vertical: 16.w,
|
||||
horizontal: 24.w,
|
||||
),
|
||||
hintText: '请输入材料描述…',
|
||||
hintStyle: TextStyle(
|
||||
color: AppStyle.minorTextColor,
|
||||
fontSize: 28.w,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Color(0xFFE8E8E8),
|
||||
width: 2.w,
|
||||
),
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Color(0xFFE8E8E8),
|
||||
width: 2.w,
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Color(0xFFE8E8E8),
|
||||
width: 2.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
AkuBox.h(32),
|
||||
Text(
|
||||
'上传维修完成照片',
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 28.w,
|
||||
),
|
||||
),
|
||||
AkuBox.h(24),
|
||||
GridView.builder(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 4,
|
||||
crossAxisSpacing: 16.w,
|
||||
mainAxisSpacing: 16.w,
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
if (index == 0)
|
||||
return AkuMaterialButton(
|
||||
radius: 8.w,
|
||||
onPressed: () {
|
||||
akuPickImage().then((file) {
|
||||
setState(() {
|
||||
if (file != null) _imgs.insert(0, file);
|
||||
});
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.image,
|
||||
size: 60.w,
|
||||
color: AppStyle.minorTextColor,
|
||||
),
|
||||
Text(
|
||||
'上传图片',
|
||||
style: TextStyle(
|
||||
color: AppStyle.minorTextColor,
|
||||
fontSize: 22.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.w),
|
||||
border: Border.all(
|
||||
color: AppStyle.minorTextColor,
|
||||
width: 2.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
else
|
||||
return Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(4.w),
|
||||
child: Image.file(
|
||||
_imgs[index - 1],
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 0,
|
||||
top: 0,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
_imgs.removeAt(index - 1);
|
||||
setState(() {});
|
||||
},
|
||||
child: Icon(CupertinoIcons.clear_circled_solid),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
itemCount: _imgs.length + 1,
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
)
|
||||
],
|
||||
),
|
||||
AkuTitleBox(
|
||||
title: '费用明细',
|
||||
children: [
|
||||
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
bottom: AkuMaterialButton(
|
||||
child: Text(
|
||||
'立即提交',
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 32.sp,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
height: 96.w,
|
||||
color: AppStyle.primaryColor,
|
||||
onPressed: () {
|
||||
widget.model.detail.result = FixResult(
|
||||
detail: _descriptionController.text,
|
||||
material: _materialController.text,
|
||||
imgs: _imgs,
|
||||
);
|
||||
widget.model.type = FIX_ENUM.DONE;
|
||||
Get.back();
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,205 @@
|
||||
import 'package:aku_community_manager/const/resource.dart';
|
||||
import 'package:aku_community_manager/mock_models/fix/fix_model.dart';
|
||||
import 'package:aku_community_manager/mock_models/fix/fixer_model.dart';
|
||||
import 'package:aku_community_manager/provider/fix_provider.dart';
|
||||
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_scaffold.dart';
|
||||
import 'package:aku_community_manager/tools/screen_tool.dart';
|
||||
import 'package:aku_ui/common_widgets/aku_material_button.dart';
|
||||
import 'package:expandable/expandable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class FixerDepartmentPage extends StatefulWidget {
|
||||
final FixModel model;
|
||||
final bool changeType;
|
||||
FixerDepartmentPage({Key key, @required this.model, this.changeType = false})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_FixerDepartmentPageState createState() => _FixerDepartmentPageState();
|
||||
}
|
||||
|
||||
class _FixerDepartmentPageState extends State<FixerDepartmentPage> {
|
||||
List<FixerModel> _pickedFixers = [];
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final fixProvider = Provider.of<FixProvider>(context);
|
||||
|
||||
return AkuScaffold(
|
||||
title: '房屋管理维修部',
|
||||
body: ListView.builder(
|
||||
padding: EdgeInsets.symmetric(vertical: 16.w),
|
||||
itemBuilder: (context, index) {
|
||||
return _buildItem(fixProvider.fixerModels[index], index);
|
||||
},
|
||||
itemCount: fixProvider.fixerModels.length,
|
||||
),
|
||||
bottom: AkuMaterialButton(
|
||||
height: 96.w,
|
||||
onPressed: _pickedFixers.isEmpty
|
||||
? null
|
||||
: () {
|
||||
if (widget.changeType) {
|
||||
Get.back();
|
||||
_pickedFixers.forEach((element) {
|
||||
widget.model.detail.fixStatuses.add(
|
||||
FixStatus(
|
||||
title: '改派给${element.name}', date: DateTime.now()),
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Get.back();
|
||||
Get.back();
|
||||
widget.model.type = FIX_ENUM.WAIT_PICKUP;
|
||||
_pickedFixers.forEach((element) {
|
||||
widget.model.detail.fixStatuses.add(
|
||||
FixStatus(
|
||||
title: '分配给${element.name}', date: DateTime.now()),
|
||||
);
|
||||
});
|
||||
}
|
||||
},
|
||||
color: AppStyle.primaryColor,
|
||||
nullColor: AppStyle.primaryColor.withOpacity(0.5),
|
||||
child: Text(
|
||||
'立即派单',
|
||||
style: TextStyle(
|
||||
color: _pickedFixers.isEmpty
|
||||
? AppStyle.minorTextColor
|
||||
: AppStyle.primaryTextColor,
|
||||
fontSize: 32.w,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_buildItem(FixerTypedModel model, int index) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: index == 0
|
||||
? BorderSide.none
|
||||
: BorderSide(color: Color(0xFFE8E8E8), width: 1.w),
|
||||
bottom: BorderSide(color: Color(0xFFE8E8E8), width: 1.w),
|
||||
),
|
||||
),
|
||||
child: Material(
|
||||
color: Colors.white,
|
||||
child: ExpandablePanel(
|
||||
controller: ExpandableController(initialExpanded: true),
|
||||
header: Container(
|
||||
height: 96.w,
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w),
|
||||
child: Text(
|
||||
model.typeName,
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 32.sp,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
collapsed: SizedBox(),
|
||||
expanded: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Divider(
|
||||
color: Color(0xFFE8E8E8),
|
||||
height: 1.w,
|
||||
thickness: 1.w,
|
||||
),
|
||||
...model.fixers.map((e) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
AkuMaterialButton(
|
||||
height: 96.w,
|
||||
onPressed: () {
|
||||
if (_pickedFixers.indexOf(e) == -1) {
|
||||
_pickedFixers.add(e);
|
||||
} else {
|
||||
_pickedFixers.remove(e);
|
||||
}
|
||||
setState(() {});
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
AkuBox.w(72),
|
||||
Checkbox(
|
||||
checkColor: AppStyle.primaryTextColor,
|
||||
activeColor: AppStyle.primaryColor,
|
||||
value: _pickedFixers.indexOf(e) != -1,
|
||||
onChanged: (state) {
|
||||
if (_pickedFixers.indexOf(e) == -1) {
|
||||
_pickedFixers.add(e);
|
||||
} else {
|
||||
_pickedFixers.remove(e);
|
||||
}
|
||||
setState(() {});
|
||||
},
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
Image.asset(
|
||||
R.ASSETS_MESSAGE_IC_PEOPLE_PNG,
|
||||
height: 40.w,
|
||||
width: 40.w,
|
||||
),
|
||||
Text(
|
||||
e.name,
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 28.w,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Image.asset(
|
||||
R.ASSETS_MESSAGE_IC_PHONE_PNG,
|
||||
height: 40.w,
|
||||
width: 40.w,
|
||||
),
|
||||
Text(
|
||||
e.phone,
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontSize: 28.w,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
AkuBox.w(101),
|
||||
],
|
||||
),
|
||||
),
|
||||
model.fixers.last == e
|
||||
? SizedBox()
|
||||
: Divider(
|
||||
indent: 32.w,
|
||||
endIndent: 32.w,
|
||||
height: 1.w,
|
||||
thickness: 1.w,
|
||||
color: Color(0xFFE8E8E8),
|
||||
),
|
||||
],
|
||||
);
|
||||
}).toList()
|
||||
],
|
||||
),
|
||||
theme: ExpandableThemeData(
|
||||
tapHeaderToExpand: true,
|
||||
iconPlacement: ExpandablePanelIconPlacement.right,
|
||||
iconPadding: EdgeInsets.only(top: 32.w, right: 32.w),
|
||||
iconSize: 32.w,
|
||||
iconColor: AppStyle.minorTextColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DecorationManagerPage extends StatefulWidget {
|
||||
DecorationManagerPage({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_DecorationManagerPageState createState() => _DecorationManagerPageState();
|
||||
}
|
||||
|
||||
class _DecorationManagerPageState extends State<DecorationManagerPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AkuScaffold(
|
||||
title: '装修管理',
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
import 'package:aku_community_manager/style/app_style.dart';
|
||||
import 'package:aku_community_manager/tools/widget_tool.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:aku_community_manager/tools/screen_tool.dart';
|
||||
|
||||
class AkuTitleBox extends StatelessWidget {
|
||||
final String title;
|
||||
final Widget suffix;
|
||||
final double spacing;
|
||||
final List<Widget> children;
|
||||
const AkuTitleBox({
|
||||
Key key,
|
||||
@required this.title,
|
||||
this.suffix,
|
||||
this.spacing = 0,
|
||||
this.children,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
|
||||
color: Colors.white,
|
||||
margin: EdgeInsets.only(bottom: 16.w),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color: AppStyle.primaryTextColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 36.sp,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
suffix ?? SizedBox(),
|
||||
],
|
||||
),
|
||||
AkuBox.h(spacing),
|
||||
...children,
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue