118 lines
3.3 KiB
Dart
118 lines
3.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rasadyar_inspection/presentation/routes/app_routes.dart';
|
|
import 'package:rasadyar_core/core.dart';
|
|
import 'package:rasadyar_core/presentation/widget/buttons/fab.dart';
|
|
|
|
import 'logic.dart';
|
|
|
|
class RegistrationOfViolationPage
|
|
extends GetView<RegistrationOfViolationLogic> {
|
|
const RegistrationOfViolationPage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: AppColor.bgLight,
|
|
appBar: RAppBar(
|
|
title: 'ثبت تخلف',
|
|
leading: vecWidget(
|
|
Assets.vecMessageAddSvg,
|
|
color: Colors.white,
|
|
width: 16,
|
|
height: 16,
|
|
),
|
|
additionalActions: [
|
|
RFab.smallAdd(onPressed: () => controller.countViolation.value++),
|
|
],
|
|
),
|
|
body: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
|
child: Column(
|
|
children: [
|
|
Expanded(
|
|
child: ObxValue((data) {
|
|
return ListView.separated(
|
|
itemBuilder: (context, index) => violationWidget(),
|
|
separatorBuilder: (context, index) => SizedBox(height: 15),
|
|
itemCount: data.value,
|
|
);
|
|
}, controller.countViolation),
|
|
),
|
|
|
|
Padding(
|
|
padding: const EdgeInsets.fromLTRB(0, 4, 0, 25),
|
|
child: RElevated(
|
|
text: 'مرحله بعد',
|
|
onPressed: () {
|
|
Get.toNamed(InspectionRoutes.inspectionDisplayInformation);
|
|
},
|
|
isFullWidth: true,
|
|
height: 40,
|
|
backgroundColor: AppColor.greenNormal,
|
|
textStyle: AppFonts.yekan16.copyWith(color: Colors.white),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
Container violationWidget() {
|
|
return Container(
|
|
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 12),
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(8),
|
|
border: Border.all(width: 0.7, color: AppColor.bgDark),
|
|
),
|
|
child: Column(
|
|
spacing: 16,
|
|
children: [
|
|
RTextField(
|
|
label: 'عنوان تخلف',
|
|
filled: true,
|
|
filledColor: AppColor.whiteLight,
|
|
),
|
|
RTextField(
|
|
label: 'توضیحات تخلف',
|
|
filled: true,
|
|
filledColor: AppColor.whiteLight,
|
|
maxLines: 3,
|
|
minLines: 3,
|
|
),
|
|
RTextField(
|
|
label: 'عنوان تخلف',
|
|
filled: true,
|
|
filledColor: AppColor.whiteLight,
|
|
),
|
|
RTextField(
|
|
label: 'عنوان تخلف',
|
|
filled: true,
|
|
filledColor: AppColor.whiteLight,
|
|
),
|
|
RTextField(
|
|
label: 'توضیحات تخلف',
|
|
filled: true,
|
|
filledColor: AppColor.whiteLight,
|
|
maxLines: 3,
|
|
minLines: 3,
|
|
),
|
|
|
|
SizedBox(
|
|
height: 40,
|
|
child: Row(
|
|
spacing: 16,
|
|
children: [
|
|
Expanded(child: RElevated(text: 'ثبت', onPressed: () {})),
|
|
Expanded(
|
|
child: ROutlinedElevated(text: 'انصراف', onPressed: () {}),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|