Files
rasadyar_application/features/supervision/lib/presentation/display_information/view.dart
mr.mojtaba 3b693c7e60 feat : action
add supervisons
2025-04-19 16:50:36 +03:30

422 lines
12 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/inputs/r_input.dart';
import 'package:supervision/supervision.dart';
import 'logic.dart';
class DisplayInformationPage extends GetView<DisplayInformationLogic> {
const DisplayInformationPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: RAppBar(
title: 'نمایش اطلاعات',
leading: vecWidget(
Assets.vecMessageAddSvg,
color: AppColor.blueNormal,
width: 16,
height: 16,
),
),
body: SingleChildScrollView(
child: Column(
spacing: 20,
children: [
markerDetailsWidget(),
accompanyingInspectorsWidget(),
accompanyingInspectorsWidget(),
violationWidget(),
violationWidget(),
ratingbarWidget()
],
),
),);
}
Widget ratingbarWidget() {
return Padding(
padding: const EdgeInsets.fromLTRB(35, 5, 35, 35),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
children: [ Text('به این صنف امتیاز دهید',style: AppFonts.yekan12,),],
),
SizedBox(height: 12,),
RatingBar.builder(
initialRating: 3,
minRating: 1,
direction: Axis.horizontal,
allowHalfRating: true,
itemCount: 5,
wrapAlignment: WrapAlignment.center,
itemPadding: EdgeInsets.symmetric(horizontal: 4.0),
itemBuilder: (context, _) =>
Icon(
Icons.star,
color: Colors.amber,
),
onRatingUpdate: (rating) {
},
),
Row(
children: [
Expanded(
child: RElevated(
height: 40,
text: 'ثبت', onPressed: (){})),
SizedBox(width: 8,),
Expanded(child: ROutlinedElevated(
height: 40,
text: 'انصراف', onPressed: (){
Get.offAllNamed(SupervisionRoutes.supervision);
}))
],
)
],
),
);
}
}
Widget violationWidget() {
return Container(
margin: EdgeInsets.symmetric(horizontal: 35),
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,
),
],
),
);
}
Widget markerDetailsWidget() {
return Container(
clipBehavior: Clip.antiAlias,
margin: EdgeInsets.symmetric(horizontal: 35, vertical: 10),
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
),
child: Column(
spacing: 15,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
spacing: 12,
children: [
Text(
'ایجاد بازرسی',
textAlign: TextAlign.center,
style: AppFonts.yekan16.copyWith(color: AppColor.bgDark),
),
],
),
Container(
height: 32,
clipBehavior: Clip.antiAlias,
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 4),
decoration: ShapeDecoration(
color: AppColor.blueLight,
shape: RoundedRectangleBorder(
side: BorderSide(width: 1, color: AppColor.blueLightHover),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'تاریخ بازرسی',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
Text(
'1403/12/12',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
],
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'شماره همراه',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
Text(
'0326598653',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'آخرین فعالیت',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
Text(
'1409/12/12',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'موجودی',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
Text(
'5کیلوگرم',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
],
),
...List.generate(
5,
(index) =>
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'فروش رفته',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
Text(
'0 کیلوگرم',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
],
),
),
],
),
);
}
Widget accompanyingInspectorsWidget() {
return Container(
clipBehavior: Clip.antiAlias,
margin: EdgeInsets.symmetric(horizontal: 35),
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
),
child: Column(
spacing: 15,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
spacing: 12,
children: [
Text(
'بازرس همراه',
textAlign: TextAlign.center,
style: AppFonts.yekan16.copyWith(color: AppColor.bgDark),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'نام و نام خانوادگی',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
Text(
'آیدا گل محمدی',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'تاریخ بازرسی',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
Text(
'1403/12/12',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'شماره همراه',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
Text(
'0326598653',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'آخرین فعالیت',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
Text(
'1409/12/12',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'موجودی',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
Text(
'5کیلوگرم',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
],
),
],
),
);
}