feat : persian calendar and date picker
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
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:inspection/inspection.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
@@ -12,6 +9,7 @@ class DisplayInformationPage extends GetView<DisplayInformationLogic> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColor.bgLight,
|
||||
appBar: RAppBar(
|
||||
title: 'نمایش اطلاعات',
|
||||
leading: vecWidget(
|
||||
@@ -22,66 +20,77 @@ class DisplayInformationPage extends GetView<DisplayInformationLogic> {
|
||||
),
|
||||
),
|
||||
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
spacing: 20,
|
||||
children: [
|
||||
markerDetailsWidget(),
|
||||
accompanyingInspectorsWidget(),
|
||||
accompanyingInspectorsWidget(),
|
||||
violationWidget(),
|
||||
violationWidget(),
|
||||
ratingbarWidget()
|
||||
body: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
physics: BouncingScrollPhysics(),
|
||||
child: Column(
|
||||
spacing: 20,
|
||||
children: [
|
||||
ratingbarWidget(),
|
||||
markerDetailsWidget(),
|
||||
accompanyingInspectorsWidget(),
|
||||
accompanyingInspectorsWidget(),
|
||||
violationWidget(),
|
||||
violationWidget(),
|
||||
SizedBox(height: 30,)
|
||||
],
|
||||
),
|
||||
|
||||
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(20, 4, 20, 25),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: RElevated(height: 40, text: 'ثبت', onPressed: () {}),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: ROutlinedElevated(
|
||||
height: 40,
|
||||
text: 'انصراف',
|
||||
onPressed: () {
|
||||
Get.until((route) => route.isFirst);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),);
|
||||
);
|
||||
}
|
||||
|
||||
Widget ratingbarWidget() {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.fromLTRB(35, 5, 35, 35),
|
||||
padding: const EdgeInsets.fromLTRB(35, 35, 35,0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
children: [ Text('به این صنف امتیاز دهید',style: AppFonts.yekan12,),],
|
||||
children: [Text('به این صنف امتیاز دهید', style: AppFonts.yekan12)],
|
||||
),
|
||||
|
||||
SizedBox(height: 12,),
|
||||
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.until((route) => route.isFirst);
|
||||
}))
|
||||
],
|
||||
)
|
||||
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) {},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -94,48 +103,40 @@ Widget violationWidget() {
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(width: 1, color: AppColor.bgDark),
|
||||
|
||||
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: 5,
|
||||
minLines: 5,
|
||||
|
||||
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: 5,
|
||||
minLines: 5,
|
||||
|
||||
maxLines: 3,
|
||||
minLines: 3,
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -261,28 +262,27 @@ Widget markerDetailsWidget() {
|
||||
|
||||
...List.generate(
|
||||
5,
|
||||
(index) =>
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
(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,
|
||||
),
|
||||
),
|
||||
],
|
||||
children: [
|
||||
Text(
|
||||
'فروش رفته',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'0 کیلوگرم',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user