120 lines
4.1 KiB
Dart
120 lines
4.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rasadyar_core/core.dart';
|
|
import 'package:rasadyar_core/presentation/widget/buttons/elevated.dart';
|
|
import 'package:rasadyar_core/presentation/widget/buttons/fab.dart';
|
|
import 'package:rasadyar_core/presentation/widget/inputs/r_input.dart';
|
|
import 'package:supervision/presentation/registration_of_violation/logic.dart';
|
|
import 'package:supervision/presentation/routes/app_routes.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: AppColor.blueNormal,
|
|
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) =>Container(
|
|
padding:EdgeInsets.symmetric(horizontal: 8,vertical: 12),
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(8),
|
|
border: Border.all(width: 1,color: AppColor.bgDark),
|
|
|
|
),
|
|
child: Column(
|
|
spacing:16 ,
|
|
children: [
|
|
|
|
RTextField(
|
|
label: 'عنوان تخلف',
|
|
filled: true,
|
|
filledColor: AppColor.whiteLight,
|
|
|
|
),
|
|
RTextField(
|
|
label: 'توضیحات تخلف',
|
|
filled: true,
|
|
filledColor: AppColor.whiteLight,
|
|
maxLines: 5,
|
|
minLines: 5,
|
|
|
|
),
|
|
RTextField(
|
|
label: 'عنوان تخلف',
|
|
filled: true,
|
|
filledColor: AppColor.whiteLight,
|
|
|
|
),
|
|
RTextField(
|
|
label: 'عنوان تخلف',
|
|
filled: true,
|
|
filledColor: AppColor.whiteLight,
|
|
|
|
),
|
|
RTextField(
|
|
label: 'توضیحات تخلف',
|
|
filled: true,
|
|
filledColor: AppColor.whiteLight,
|
|
maxLines: 5,
|
|
minLines: 5,
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
height: 40,
|
|
child: Row(
|
|
spacing: 16,
|
|
children: [
|
|
Expanded(child: RElevated(text: 'ثبت', onPressed: (){})),
|
|
Expanded(child:ROutlinedElevated(text: 'انصراف',onPressed: (){},) ),
|
|
|
|
],
|
|
),
|
|
)
|
|
|
|
],
|
|
),
|
|
) ,
|
|
separatorBuilder: (context, index) => SizedBox(height: 15,),
|
|
itemCount: data.value,
|
|
);
|
|
},controller.countViolation),
|
|
),
|
|
|
|
RElevated(
|
|
text: 'مرحله بعد',
|
|
onPressed: () {
|
|
Get.toNamed(SupervisionRoutes.supervisionDisplayInformation);
|
|
},
|
|
isFullWidth: true,
|
|
height: 40,
|
|
backgroundColor: AppColor.greenNormal,
|
|
textStyle: AppFonts.yekan16.copyWith(color: Colors.white),
|
|
),
|
|
SizedBox(height: 25,)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|