parent
9d14c37c82
commit
e743c55541
After Width: | Height: | Size: 530 B |
After Width: | Height: | Size: 764 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 663 B |
After Width: | Height: | Size: 2.1 KiB |
@ -0,0 +1,58 @@
|
||||
import 'package:aku_community_manager/style/app_style.dart';
|
||||
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
|
||||
import 'package:aku_ui/aku_ui.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 InspectionPointSubmitPage extends StatefulWidget {
|
||||
InspectionPointSubmitPage({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_InspectionPointSubmitPageState createState() =>
|
||||
_InspectionPointSubmitPageState();
|
||||
}
|
||||
|
||||
class _InspectionPointSubmitPageState extends State<InspectionPointSubmitPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AkuScaffold(
|
||||
title: '巡检点',
|
||||
body: Center(
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(R.ASSETS_MANAGE_SUBMIT_SUCCESS_PNG,
|
||||
width: 587.w, height: 350.w),
|
||||
'提交成功'.text.black.size(40.sp).bold.make(),
|
||||
8.w.heightBox,
|
||||
'感谢您的努力工作,为小区安全做出贡献'
|
||||
.text
|
||||
.color(kTextSubColor)
|
||||
.size(26.sp)
|
||||
.bold
|
||||
.make(),
|
||||
80.w.heightBox,
|
||||
AkuButton(
|
||||
color: kPrimaryColor,
|
||||
child: '继续巡更'
|
||||
.text
|
||||
.color(kTextPrimaryColor)
|
||||
.size(32.sp)
|
||||
.bold
|
||||
.make(),
|
||||
radius: 8.w,
|
||||
padding: EdgeInsets.symmetric(vertical: 22.w, horizontal: 76.w),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
import 'package:aku_community_manager/style/app_style.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
||||
class InspectionUtils {
|
||||
static TextStyle textstyle =
|
||||
TextStyle(color: AppStyle.minorTextColor, fontSize: 28.sp);
|
||||
static Map<int, String> status = {1: '待巡检', 2: '已巡检', 3: '巡检中', 4: '未巡检'};
|
||||
static Color color(int status) {
|
||||
switch (status) {
|
||||
case 1:
|
||||
return Color(0xFFFF4501);
|
||||
break;
|
||||
case 2:
|
||||
return Color(0xFF999999);
|
||||
case 3:
|
||||
return Color(0xFFFF4501);
|
||||
case 4:
|
||||
return Color(0xFFFF4501);
|
||||
default:
|
||||
return Colors.blue;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:aku_community_manager/style/app_style.dart';
|
||||
import 'package:aku_community_manager/ui/widgets/inner/pick_image.dart';
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:aku_community_manager/const/resource.dart';
|
||||
import 'package:velocity_x/velocity_x.dart';
|
||||
|
||||
class AkuPickImageWidget extends StatefulWidget {
|
||||
final double size;
|
||||
final Function(File file) onChanged;
|
||||
AkuPickImageWidget({Key key, this.size, this.onChanged}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AkuPickImageWidgetState createState() => _AkuPickImageWidgetState();
|
||||
}
|
||||
|
||||
class _AkuPickImageWidgetState extends State<AkuPickImageWidget> {
|
||||
File _file;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () async {
|
||||
await akuPickImage().then((value) => _file = File(value.path));
|
||||
widget.onChanged(_file);
|
||||
},
|
||||
child: DottedBorder(
|
||||
color: Color(0xFF999999),
|
||||
strokeWidth: 2.w,
|
||||
radius: Radius.circular(8.w),
|
||||
child: Container(
|
||||
width: widget.size ?? 160.w,
|
||||
height: widget.size ?? 160.w,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
R.ASSETS_MANAGE_IC_IMAGE_PNG,
|
||||
width: 60.w,
|
||||
height: 60.w,
|
||||
),
|
||||
4.w.heightBox,
|
||||
'上传图片'.text.color(kTextSubColor).size(22.sp).bold.make(),
|
||||
],
|
||||
),
|
||||
),
|
||||
).material(color: Colors.transparent),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:velocity_x/velocity_x.dart';
|
||||
|
||||
class AkuSingleCheckButton<T> extends StatefulWidget {
|
||||
final String text;
|
||||
final T value;
|
||||
final T gropValue;
|
||||
final VoidCallback onPressed;
|
||||
AkuSingleCheckButton(
|
||||
{Key key, this.text, this.value, this.gropValue, this.onPressed})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_AkuSingleCheckButtonState createState() => _AkuSingleCheckButtonState();
|
||||
}
|
||||
|
||||
class _AkuSingleCheckButtonState extends State<AkuSingleCheckButton> {
|
||||
bool get isSelect => widget.value == widget.gropValue;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: isSelect ? Color(0xFFFFF8E0) : Colors.white,
|
||||
border: Border.all(
|
||||
color: isSelect ? Color(0xFFFFC40C) : Color(0xFF999999),
|
||||
width: 3.w),
|
||||
borderRadius: BorderRadius.circular(4.w)),
|
||||
width: 180.w,
|
||||
height: 72.w,
|
||||
child: widget.text.text
|
||||
.color(isSelect ? Color(0xFF999999) : Color(0xFF333333))
|
||||
.bold
|
||||
.size(32.sp)
|
||||
.make(),
|
||||
).onInkTap(() {
|
||||
widget.onPressed();
|
||||
setState(() {});
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in new issue