feat : action
add supervisons
This commit is contained in:
4
assets/icons/calendar_search.svg
Normal file
4
assets/icons/calendar_search.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M27.9164 5.9335V3.3335C27.9164 2.65016 27.3497 2.0835 26.6664 2.0835C25.9831 2.0835 25.4164 2.65016 25.4164 3.3335V5.8335H14.5831V3.3335C14.5831 2.65016 14.0164 2.0835 13.3331 2.0835C12.6497 2.0835 12.0831 2.65016 12.0831 3.3335V5.9335C7.58306 6.35016 5.39973 9.0335 5.0664 13.0168C5.03306 13.5002 5.43306 13.9002 5.89973 13.9002H34.0997C34.5831 13.9002 34.9831 13.4835 34.9331 13.0168C34.5997 9.0335 32.4164 6.35016 27.9164 5.9335Z" fill="#FFFFFF"/>
|
||||
<path d="M33.3333 16.3999H6.66667C5.75 16.3999 5 17.1499 5 18.0666V28.3332C5 33.3332 7.5 36.6666 13.3333 36.6666H26.6667C32.5 36.6666 35 33.3332 35 28.3332V18.0666C35 17.1499 34.25 16.3999 33.3333 16.3999ZM26.1 32.5499C25.85 32.7999 25.5333 32.9166 25.2167 32.9166C24.9 32.9166 24.5833 32.7999 24.3333 32.5499L23.1 31.3166C22.1333 31.9499 20.9667 32.3332 19.7167 32.3332C16.3167 32.3332 13.55 29.5666 13.55 26.1666C13.55 22.7666 16.3167 19.9999 19.7167 19.9999C23.1167 19.9999 25.8833 22.7666 25.8833 26.1666C25.8833 27.4166 25.5 28.5832 24.8667 29.5499L26.1 30.7832C26.5833 31.2666 26.5833 32.0666 26.1 32.5499Z" fill="#FFFFFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
4
assets/icons/diagram.svg
Normal file
4
assets/icons/diagram.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M36.6663 37.9168H8.33301C4.88301 37.9168 2.08301 35.1168 2.08301 31.6668V3.3335C2.08301 2.65016 2.64967 2.0835 3.33301 2.0835C4.01634 2.0835 4.58301 2.65016 4.58301 3.3335V31.6668C4.58301 33.7335 6.26634 35.4168 8.33301 35.4168H36.6663C37.3497 35.4168 37.9163 35.9835 37.9163 36.6668C37.9163 37.3502 37.3497 37.9168 36.6663 37.9168Z" fill="#FFFFFF"/>
|
||||
<path d="M8.33369 29.5834C8.05035 29.5834 7.75035 29.4834 7.51702 29.2834C7.00035 28.8334 6.93369 28.05 7.38369 27.5167L15.0337 18.5834C15.867 17.6167 17.067 17.0334 18.3337 16.9834C19.6004 16.95 20.8504 17.4167 21.7504 18.3167L23.3337 19.9C23.7504 20.3167 24.2837 20.5167 24.8837 20.5167C25.467 20.5 26.0004 20.2334 26.3837 19.7834L34.0337 10.85C34.4837 10.3334 35.267 10.2667 35.8004 10.7167C36.317 11.1667 36.3837 11.95 35.9337 12.4834L28.2837 21.4167C27.4504 22.3834 26.2504 22.9667 24.9837 23.0167C23.7004 23.05 22.467 22.5834 21.567 21.6834L20.0004 20.1C19.5837 19.6834 19.0337 19.4667 18.4504 19.4834C17.867 19.5 17.3337 19.7667 16.9504 20.2167L9.30035 29.15C9.03369 29.4334 8.68369 29.5834 8.33369 29.5834Z" fill="#FFFFFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
5
assets/icons/logout.svg
Normal file
5
assets/icons/logout.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M25.3992 37.1176H25.1825C17.7825 37.1176 14.2159 34.2009 13.5992 27.6676C13.5325 26.9843 14.0325 26.3676 14.7325 26.3009C15.3992 26.2343 16.0325 26.7509 16.0992 27.4343C16.5825 32.6676 19.0492 34.6176 25.1992 34.6176H25.4159C32.1992 34.6176 34.5992 32.2176 34.5992 25.4343V14.5676C34.5992 7.78428 32.1992 5.38428 25.4159 5.38428H25.1992C19.0159 5.38428 16.5492 7.36761 16.0992 12.7009C16.0159 13.3843 15.4325 13.9009 14.7325 13.8343C14.0325 13.7843 13.5325 13.1676 13.5825 12.4843C14.1492 5.85094 17.7325 2.88428 25.1825 2.88428H25.3992C33.5825 2.88428 37.0825 6.38428 37.0825 14.5676V25.4343C37.0825 33.6176 33.5825 37.1176 25.3992 37.1176Z" fill="#FFFFFF"/>
|
||||
<path d="M24.9999 21.25H6.0332C5.34987 21.25 4.7832 20.6833 4.7832 20C4.7832 19.3167 5.34987 18.75 6.0332 18.75H24.9999C25.6832 18.75 26.2499 19.3167 26.2499 20C26.2499 20.6833 25.6832 21.25 24.9999 21.25Z" fill="#FFFFFF"/>
|
||||
<path d="M9.75104 26.8329C9.43438 26.8329 9.11771 26.7162 8.86771 26.4662L3.28438 20.8829C2.80104 20.3996 2.80104 19.5996 3.28438 19.1162L8.86771 13.5329C9.35104 13.0496 10.151 13.0496 10.6344 13.5329C11.1177 14.0162 11.1177 14.8162 10.6344 15.2996L5.93438 19.9996L10.6344 24.6996C11.1177 25.1829 11.1177 25.9829 10.6344 26.4662C10.401 26.7162 10.0677 26.8329 9.75104 26.8329Z" fill="#FFFFFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
6
assets/icons/profile_user.svg
Normal file
6
assets/icons/profile_user.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.9997 3.3335C10.633 3.3335 7.08301 6.8835 7.08301 11.2502C7.08301 15.5335 10.433 19.0002 14.7997 19.1502C14.933 19.1335 15.0663 19.1335 15.1663 19.1502C15.1997 19.1502 15.2163 19.1502 15.2497 19.1502C15.2663 19.1502 15.2663 19.1502 15.283 19.1502C19.5497 19.0002 22.8997 15.5335 22.9163 11.2502C22.9163 6.8835 19.3663 3.3335 14.9997 3.3335Z" fill="#FFFFFF"/>
|
||||
<path d="M23.4666 23.5833C18.8166 20.4833 11.2333 20.4833 6.54994 23.5833C4.43327 25 3.2666 26.9166 3.2666 28.9666C3.2666 31.0166 4.43327 32.9166 6.53327 34.3166C8.8666 35.8833 11.9333 36.6666 14.9999 36.6666C18.0666 36.6666 21.1333 35.8833 23.4666 34.3166C25.5666 32.9 26.7333 31 26.7333 28.9333C26.7166 26.8833 25.5666 24.9833 23.4666 23.5833Z" fill="#FFFFFF"/>
|
||||
<path d="M33.3166 12.2332C33.5833 15.4665 31.2833 18.2998 28.0999 18.6832C28.0833 18.6832 28.0833 18.6832 28.0666 18.6832H28.0166C27.9166 18.6832 27.8166 18.6832 27.7333 18.7165C26.1166 18.7998 24.6333 18.2832 23.5166 17.3332C25.2333 15.7998 26.2166 13.4998 26.0166 10.9998C25.8999 9.64984 25.4333 8.41651 24.7333 7.36651C25.3666 7.04984 26.0999 6.84984 26.8499 6.78317C30.1166 6.49984 33.0333 8.93317 33.3166 12.2332Z" fill="#FFFFFF"/>
|
||||
<path d="M36.6497 27.6498C36.5164 29.2665 35.4831 30.6665 33.7497 31.6165C32.0831 32.5332 29.9831 32.9665 27.8997 32.9165C29.0997 31.8332 29.7997 30.4832 29.9331 29.0498C30.0997 26.9832 29.1164 24.9998 27.1497 23.4165C26.0331 22.5332 24.7331 21.8332 23.3164 21.3165C26.9997 20.2498 31.6331 20.9665 34.4831 23.2665C36.0164 24.4998 36.7997 26.0498 36.6497 27.6498Z" fill="#FFFFFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
BIN
assets/vec/calendar.svg.vec
Normal file
BIN
assets/vec/calendar.svg.vec
Normal file
Binary file not shown.
BIN
assets/vec/calendar_search.svg.vec
Normal file
BIN
assets/vec/calendar_search.svg.vec
Normal file
Binary file not shown.
BIN
assets/vec/diagram.svg.vec
Normal file
BIN
assets/vec/diagram.svg.vec
Normal file
Binary file not shown.
BIN
assets/vec/logout.svg.vec
Normal file
BIN
assets/vec/logout.svg.vec
Normal file
Binary file not shown.
BIN
assets/vec/profile_user.svg.vec
Normal file
BIN
assets/vec/profile_user.svg.vec
Normal file
Binary file not shown.
@@ -3,6 +3,11 @@ import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class AddSupervisionLogic extends GetxController {
|
||||
RxInt selectedSegment = 0.obs;
|
||||
RxInt selectedTypeOfOwnership = 0.obs;
|
||||
RxInt selectedUnitType = 0.obs;
|
||||
RxInt selectedAccompanyingInspectors = 0.obs;
|
||||
|
||||
List<String> tmpLs = ['دولتی', 'غیر دولتی', 'استیجاری', 'شخصی', 'سایر'];
|
||||
|
||||
// The data for the segments
|
||||
final Map<int, Widget> segments = {
|
||||
@@ -18,8 +23,6 @@ class AddSupervisionLogic extends GetxController {
|
||||
),
|
||||
};
|
||||
|
||||
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
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:rasadyar_core/presentation/widget/tabs/new_tab.dart';
|
||||
import 'package:supervision/supervision.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
@@ -21,42 +23,97 @@ class AddSupervisionPage extends GetView<AddSupervisionLogic> {
|
||||
height: 16,
|
||||
),
|
||||
),
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 16,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(22, 13, 22, 4),
|
||||
child: Text(
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 16,
|
||||
children: [
|
||||
Text(
|
||||
'نوع پروانه کسب',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
),
|
||||
|
||||
ObxValue((data) {
|
||||
return NewCupertinoSegmentedControl<int>(
|
||||
padding: EdgeInsetsDirectional.symmetric(
|
||||
horizontal: 20,
|
||||
vertical: 10,
|
||||
),
|
||||
children: controller.segments,
|
||||
groupValue: data.value,
|
||||
selectedColor: AppColor.blueNormal,
|
||||
unselectedColor: Colors.white,
|
||||
borderColor: Colors.grey.shade300,
|
||||
onValueChanged: (int value) {
|
||||
data.value = value;
|
||||
ObxValue((data) {
|
||||
return NewCupertinoSegmentedControl<int>(
|
||||
padding: EdgeInsets.zero,
|
||||
children: controller.segments,
|
||||
groupValue: data.value,
|
||||
selectedColor: AppColor.blueNormal,
|
||||
unselectedColor: Colors.white,
|
||||
borderColor: Colors.grey.shade300,
|
||||
onValueChanged: (int value) {
|
||||
data.value = value;
|
||||
},
|
||||
);
|
||||
}, controller.selectedSegment),
|
||||
|
||||
RTextField(label: 'صادر کننده پروانه'),
|
||||
RTextField(label: 'شماره مجوز'),
|
||||
RTextField(label: 'شماره ثبت'),
|
||||
RTextField(label: 'کد اقتصادی'),
|
||||
|
||||
optionWidget(controller.selectedTypeOfOwnership),
|
||||
optionWidget(controller.selectedAccompanyingInspectors),
|
||||
optionWidget(controller.selectedUnitType),
|
||||
SizedBox(height: 25),
|
||||
RElevated(
|
||||
text: 'مرحله بعد',
|
||||
onPressed: () {
|
||||
Get.toNamed(SupervisionRoutes.supervisionRegistrationOfViolation);
|
||||
},
|
||||
);
|
||||
}, controller.selectedSegment),
|
||||
|
||||
RTextField(label: 'صادر کننده پروانه'),
|
||||
RTextField(label: 'شماره مجوز'),
|
||||
RTextField(label: 'شماره ثبت'),
|
||||
RTextField(label: 'کد اقتصادی'),
|
||||
],
|
||||
isFullWidth: true,
|
||||
backgroundColor: AppColor.greenNormal,
|
||||
textStyle: AppFonts.yekan16.copyWith(color: Colors.white),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Column optionWidget(RxInt selected) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'نوع پروانه کسب',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
height: 75,
|
||||
child: ListView.separated(
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.all(16),
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemBuilder:
|
||||
(context, index) => ObxValue((data) {
|
||||
return ChoiceChip(
|
||||
onSelected: (value) {
|
||||
selected.value = index;
|
||||
},
|
||||
selectedColor: AppColor.blueNormal,
|
||||
labelStyle:
|
||||
data.value == index
|
||||
? AppFonts.yekan13.copyWith(
|
||||
color: AppColor.whiteLight,
|
||||
)
|
||||
: AppFonts.yekan12.copyWith(
|
||||
color: AppColor.darkGreyNormalActive,
|
||||
),
|
||||
checkmarkColor: Colors.white,
|
||||
label: Text(controller.tmpLs[index]),
|
||||
selected: index == data.value,
|
||||
);
|
||||
}, selected),
|
||||
|
||||
separatorBuilder: (context, index) => SizedBox(width: 8),
|
||||
itemCount: controller.tmpLs.length,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class DisplayInformationLogic extends GetxController {}
|
||||
@@ -0,0 +1,421 @@
|
||||
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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -169,7 +169,7 @@ class SupervisionFilterLogic extends GetxController
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
|
||||
super.onClose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,12 +182,7 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
),
|
||||
CustomSlidableAction(
|
||||
onPressed: (context) {
|
||||
controller.sheetController.value.addBottomSheet(
|
||||
child: LocationDetailsPage(),
|
||||
initHeight: 500,
|
||||
maxHeight: Get.height * 2,
|
||||
minHeight: 0,
|
||||
);
|
||||
Get.toNamed(SupervisionRoutes.supervisionAddSupervision);
|
||||
},
|
||||
backgroundColor: AppColor.greenNormal,
|
||||
padding: EdgeInsets.all(16),
|
||||
@@ -473,6 +468,7 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
vecWidgetWithOnTap(
|
||||
assets: Assets.vecMapSvg,
|
||||
onTap: () {
|
||||
|
||||
Get.toNamed(SupervisionRoutes.supervisionLocationDetails);
|
||||
},
|
||||
width: 24,
|
||||
@@ -485,6 +481,7 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
height: 24,
|
||||
color: AppColor.greenNormal,
|
||||
onTap: () {
|
||||
|
||||
Get.toNamed(SupervisionRoutes.supervisionAddSupervision);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class RegistrationOfViolationLogic extends GetxController {
|
||||
RxInt countViolation = 1.obs;
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
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,
|
||||
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
) ,
|
||||
separatorBuilder: (context, index) => SizedBox(height: 15,),
|
||||
itemCount: data.value,
|
||||
);
|
||||
},controller.countViolation),
|
||||
),
|
||||
|
||||
RElevated(
|
||||
text: 'مرحله بعد',
|
||||
onPressed: () {
|
||||
Get.toNamed(SupervisionRoutes.supervisionDisplayInformation);
|
||||
},
|
||||
isFullWidth: true,
|
||||
backgroundColor: AppColor.greenNormal,
|
||||
textStyle: AppFonts.yekan16.copyWith(color: Colors.white),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:supervision/presentation/actions/view.dart';
|
||||
import 'package:supervision/presentation/filter/view.dart';
|
||||
|
||||
class RootLogic extends GetxController {
|
||||
RxInt currentIndex = 0.obs;
|
||||
List<Widget> pages = [
|
||||
SupervisionFilterPage(),
|
||||
Placeholder(color: Colors.red),
|
||||
ActionsPage(),
|
||||
Placeholder(color: Colors.amber),
|
||||
];
|
||||
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:supervision/presentation/actions/logic.dart';
|
||||
import 'package:supervision/presentation/add_supervision/logic.dart';
|
||||
import 'package:supervision/presentation/add_supervision/view.dart';
|
||||
import 'package:supervision/presentation/display_information/logic.dart';
|
||||
import 'package:supervision/presentation/display_information/view.dart';
|
||||
import 'package:supervision/presentation/filter/logic.dart';
|
||||
import 'package:supervision/presentation/location_details/logic.dart';
|
||||
import 'package:supervision/presentation/location_details/view.dart';
|
||||
import 'package:supervision/presentation/registration_of_violation/logic.dart';
|
||||
import 'package:supervision/presentation/registration_of_violation/view.dart';
|
||||
import 'package:supervision/presentation/root/logic.dart';
|
||||
import 'package:supervision/presentation/root/view.dart';
|
||||
import 'package:supervision/presentation/routes/app_routes.dart';
|
||||
@@ -19,6 +24,7 @@ sealed class SupervisionPages {
|
||||
Get.put(RootLogic());
|
||||
Get.put(SupervisionFilterLogic());
|
||||
Get.lazyPut(() => LocationDetailsLogic(), fenix: true);
|
||||
Get.lazyPut(() => ActionsLogic(), fenix: true);
|
||||
}),
|
||||
),
|
||||
|
||||
@@ -33,5 +39,14 @@ sealed class SupervisionPages {
|
||||
page: () => AddSupervisionPage(),
|
||||
binding: BindingsBuilder.put(() => AddSupervisionLogic()),
|
||||
),
|
||||
GetPage(
|
||||
name: SupervisionRoutes.supervisionRegistrationOfViolation,
|
||||
page: () => RegistrationOfViolationPage(),
|
||||
binding: BindingsBuilder.put(() => RegistrationOfViolationLogic()),
|
||||
), GetPage(
|
||||
name: SupervisionRoutes.supervisionDisplayInformation,
|
||||
page: () => DisplayInformationPage(),
|
||||
binding: BindingsBuilder.put(() => DisplayInformationLogic()),
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ sealed class SupervisionRoutes {
|
||||
static const supervisionAction = '$supervision/action';
|
||||
static const supervisionUserSetting = '$supervision/userSettings';
|
||||
static const supervisionLocationDetails = '$supervision/locationDetails';
|
||||
static const supervisionAddSupervision =
|
||||
'$supervisionLocationDetails/addSupervision';
|
||||
static const supervisionAddSupervision = '$supervisionLocationDetails/addSupervision';
|
||||
static const supervisionRegistrationOfViolation = '$supervisionAddSupervision/RegistrationOfViolation';
|
||||
static const supervisionDisplayInformation = '$supervisionRegistrationOfViolation/DisplayInformation';
|
||||
|
||||
}
|
||||
|
||||
@@ -110,6 +110,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.9.0"
|
||||
flutter_rating_bar:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_rating_bar
|
||||
sha256: d2af03469eac832c591a1eba47c91ecc871fe5708e69967073c043b2d775ed93
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.1"
|
||||
flutter_slidable:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
||||
43
ios/Podfile
Normal file
43
ios/Podfile
Normal file
@@ -0,0 +1,43 @@
|
||||
# Uncomment this line to define a global platform for your project
|
||||
# platform :ios, '12.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
||||
project 'Runner', {
|
||||
'Debug' => :debug,
|
||||
'Profile' => :release,
|
||||
'Release' => :release,
|
||||
}
|
||||
|
||||
def flutter_root
|
||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
|
||||
unless File.exist?(generated_xcode_build_settings_path)
|
||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
||||
end
|
||||
|
||||
File.foreach(generated_xcode_build_settings_path) do |line|
|
||||
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
||||
return matches[1].strip if matches
|
||||
end
|
||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
|
||||
end
|
||||
|
||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
||||
|
||||
flutter_ios_podfile_setup
|
||||
|
||||
target 'Runner' do
|
||||
use_frameworks!
|
||||
|
||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
||||
target 'RunnerTests' do
|
||||
inherit! :search_paths
|
||||
end
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
flutter_additional_ios_build_settings(target)
|
||||
end
|
||||
end
|
||||
@@ -5,17 +5,23 @@ class Assets {
|
||||
static const String iconsAdd = 'assets/icons/add.svg';
|
||||
static const String iconsArrowLeft = 'assets/icons/arrow_left.svg';
|
||||
static const String iconsArrowRight = 'assets/icons/arrow_right.svg';
|
||||
static const String iconsCalendar = 'assets/icons/calendar.svg';
|
||||
static const String iconsCalendarSearch = 'assets/icons/calendar_search.svg';
|
||||
static const String iconsCall = 'assets/icons/call.svg';
|
||||
static const String iconsDiagram = 'assets/icons/diagram.svg';
|
||||
static const String iconsDownload = 'assets/icons/download.svg';
|
||||
static const String iconsEdit = 'assets/icons/edit.svg';
|
||||
static const String iconsFilter = 'assets/icons/filter.svg';
|
||||
static const String iconsGps = 'assets/icons/gps.svg';
|
||||
static const String iconsKey = 'assets/icons/key.svg';
|
||||
static const String iconsLogout = 'assets/icons/logout.svg';
|
||||
static const String iconsMap = 'assets/icons/map.svg';
|
||||
static const String iconsMapMarker = 'assets/icons/map_marker.svg';
|
||||
static const String iconsMessageAdd = 'assets/icons/message_add.svg';
|
||||
static const String iconsProfileCircle = 'assets/icons/profile_circle.svg';
|
||||
static const String iconsProfileUser = 'assets/icons/profile_user.svg';
|
||||
static const String iconsScan = 'assets/icons/scan.svg';
|
||||
static const String iconsScanBarcode = 'assets/icons/scan_barcode.svg';
|
||||
static const String iconsSecurityTime = 'assets/icons/security_time.svg';
|
||||
static const String iconsSetting = 'assets/icons/setting.svg';
|
||||
static const String iconsTrash = 'assets/icons/trash.svg';
|
||||
@@ -24,16 +30,22 @@ class Assets {
|
||||
static const String vecAddSvg = 'assets/vec/add.svg.vec';
|
||||
static const String vecArrowLeftSvg = 'assets/vec/arrow_left.svg.vec';
|
||||
static const String vecArrowRightSvg = 'assets/vec/arrow_right.svg.vec';
|
||||
static const String vecCalendarSearchSvg = 'assets/vec/calendar_search.svg.vec';
|
||||
static const String vecCalendarSvg = 'assets/vec/calendar.svg.vec';
|
||||
static const String vecCallSvg = 'assets/vec/call.svg.vec';
|
||||
static const String vecDiagramSvg = 'assets/vec/diagram.svg.vec';
|
||||
static const String vecDownloadSvg = 'assets/vec/download.svg.vec';
|
||||
static const String vecEditSvg = 'assets/vec/edit.svg.vec';
|
||||
static const String vecFilterSvg = 'assets/vec/filter.svg.vec';
|
||||
static const String vecGpsSvg = 'assets/vec/gps.svg.vec';
|
||||
static const String vecKeySvg = 'assets/vec/key.svg.vec';
|
||||
static const String vecLogoutSvg = 'assets/vec/logout.svg.vec';
|
||||
static const String vecMapMarkerSvg = 'assets/vec/map_marker.svg.vec';
|
||||
static const String vecMapSvg = 'assets/vec/map.svg.vec';
|
||||
static const String vecMessageAddSvg = 'assets/vec/message_add.svg.vec';
|
||||
static const String vecProfileCircleSvg = 'assets/vec/profile_circle.svg.vec';
|
||||
static const String vecProfileUserSvg = 'assets/vec/profile_user.svg.vec';
|
||||
static const String vecScanBarcodeSvg = 'assets/vec/scan_barcode.svg.vec';
|
||||
static const String vecScanSvg = 'assets/vec/scan.svg.vec';
|
||||
static const String vecSecurityTimeSvg = 'assets/vec/security_time.svg.vec';
|
||||
static const String vecSettingSvg = 'assets/vec/setting.svg.vec';
|
||||
@@ -8,5 +8,6 @@ export 'package:rasadyar_core/presentation/widget/widget.dart';
|
||||
//other packages
|
||||
export 'package:flutter_slidable/flutter_slidable.dart';
|
||||
export 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
export 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ class AppColor {
|
||||
static const Color blackDarker = Color(0xFF000000); // #000000 rgb(0, 0, 0)
|
||||
//endregion
|
||||
|
||||
//region ---Dark Grey Colors ---
|
||||
//region --- Grey Colors ---
|
||||
static const Color darkGreyLight = Color(
|
||||
0xFFeaeaea,
|
||||
); // #eaeaea rgb(234, 234, 234)
|
||||
@@ -357,6 +357,11 @@ class AppColor {
|
||||
0xFF0a4953,
|
||||
); // #0a4953 rgb(10, 73, 83)
|
||||
static const Color tealDarker = Color(0xFF083940); // #083940 rgb(8, 57, 64)
|
||||
|
||||
|
||||
|
||||
static const Color bgLight = Color(0xFFF5F5F5); // #083940 rgb(8, 57, 64)
|
||||
static const Color bgDark = Color(0xFF979797); // #083940 rgb(8, 57, 64)
|
||||
//endregion
|
||||
|
||||
//region --- category Colors ---
|
||||
|
||||
@@ -5,16 +5,21 @@ class Assets {
|
||||
static const String iconsAdd = 'assets/icons/add.svg';
|
||||
static const String iconsArrowLeft = 'assets/icons/arrow_left.svg';
|
||||
static const String iconsArrowRight = 'assets/icons/arrow_right.svg';
|
||||
static const String iconsCalendar = 'assets/icons/calendar.svg';
|
||||
static const String iconsCalendarSearch = 'assets/icons/calendar_search.svg';
|
||||
static const String iconsCall = 'assets/icons/call.svg';
|
||||
static const String iconsDiagram = 'assets/icons/diagram.svg';
|
||||
static const String iconsDownload = 'assets/icons/download.svg';
|
||||
static const String iconsEdit = 'assets/icons/edit.svg';
|
||||
static const String iconsFilter = 'assets/icons/filter.svg';
|
||||
static const String iconsGps = 'assets/icons/gps.svg';
|
||||
static const String iconsKey = 'assets/icons/key.svg';
|
||||
static const String iconsLogout = 'assets/icons/logout.svg';
|
||||
static const String iconsMap = 'assets/icons/map.svg';
|
||||
static const String iconsMapMarker = 'assets/icons/map_marker.svg';
|
||||
static const String iconsMessageAdd = 'assets/icons/message_add.svg';
|
||||
static const String iconsProfileCircle = 'assets/icons/profile_circle.svg';
|
||||
static const String iconsProfileUser = 'assets/icons/profile_user.svg';
|
||||
static const String iconsScan = 'assets/icons/scan.svg';
|
||||
static const String iconsScanBarcode = 'assets/icons/scan_barcode.svg';
|
||||
static const String iconsSecurityTime = 'assets/icons/security_time.svg';
|
||||
@@ -25,16 +30,21 @@ class Assets {
|
||||
static const String vecAddSvg = 'assets/vec/add.svg.vec';
|
||||
static const String vecArrowLeftSvg = 'assets/vec/arrow_left.svg.vec';
|
||||
static const String vecArrowRightSvg = 'assets/vec/arrow_right.svg.vec';
|
||||
static const String vecCalendarSearchSvg = 'assets/vec/calendar_search.svg.vec';
|
||||
static const String vecCalendarSvg = 'assets/vec/calendar.svg.vec';
|
||||
static const String vecCallSvg = 'assets/vec/call.svg.vec';
|
||||
static const String vecDiagramSvg = 'assets/vec/diagram.svg.vec';
|
||||
static const String vecDownloadSvg = 'assets/vec/download.svg.vec';
|
||||
static const String vecEditSvg = 'assets/vec/edit.svg.vec';
|
||||
static const String vecFilterSvg = 'assets/vec/filter.svg.vec';
|
||||
static const String vecGpsSvg = 'assets/vec/gps.svg.vec';
|
||||
static const String vecKeySvg = 'assets/vec/key.svg.vec';
|
||||
static const String vecLogoutSvg = 'assets/vec/logout.svg.vec';
|
||||
static const String vecMapMarkerSvg = 'assets/vec/map_marker.svg.vec';
|
||||
static const String vecMapSvg = 'assets/vec/map.svg.vec';
|
||||
static const String vecMessageAddSvg = 'assets/vec/message_add.svg.vec';
|
||||
static const String vecProfileCircleSvg = 'assets/vec/profile_circle.svg.vec';
|
||||
static const String vecProfileUserSvg = 'assets/vec/profile_user.svg.vec';
|
||||
static const String vecScanBarcodeSvg = 'assets/vec/scan_barcode.svg.vec';
|
||||
static const String vecScanSvg = 'assets/vec/scan.svg.vec';
|
||||
static const String vecSecurityTimeSvg = 'assets/vec/security_time.svg.vec';
|
||||
|
||||
@@ -42,6 +42,7 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
child: leading,
|
||||
),
|
||||
actions: [
|
||||
if (additionalActions != null) ...additionalActions!,
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: IconButton(
|
||||
@@ -50,7 +51,7 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
color: iconColor,
|
||||
),
|
||||
),
|
||||
if (additionalActions != null) ...additionalActions!,
|
||||
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,25 +2,27 @@ import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/presentation/common/app_color.dart';
|
||||
import 'package:rasadyar_core/presentation/common/app_fonts.dart';
|
||||
|
||||
class RElevated extends StatefulWidget {
|
||||
class RElevated extends StatelessWidget {
|
||||
RElevated({
|
||||
super.key,
|
||||
required this.text,
|
||||
required this.onPressed,
|
||||
foregroundColor,
|
||||
backgroundColor,
|
||||
disabledBackgroundColor,
|
||||
disabledForegroundColor,
|
||||
radius,
|
||||
textStyle,
|
||||
this.foregroundColor,
|
||||
this.backgroundColor,
|
||||
this.disabledBackgroundColor,
|
||||
this.disabledForegroundColor,
|
||||
this.radius,
|
||||
this.textStyle,
|
||||
this.width = 150.0,
|
||||
this.height = 56.0,
|
||||
this.isFullWidth,
|
||||
});
|
||||
|
||||
final String text;
|
||||
final VoidCallback? onPressed;
|
||||
final double width;
|
||||
final double height;
|
||||
final bool? isFullWidth;
|
||||
Color? foregroundColor;
|
||||
Color? backgroundColor;
|
||||
Color? disabledForegroundColor;
|
||||
@@ -28,29 +30,24 @@ class RElevated extends StatefulWidget {
|
||||
double? radius;
|
||||
TextStyle? textStyle;
|
||||
|
||||
@override
|
||||
State<RElevated> createState() => _RElevatedState();
|
||||
}
|
||||
|
||||
class _RElevatedState extends State<RElevated> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ElevatedButton(
|
||||
onPressed: widget.onPressed,
|
||||
onPressed: onPressed,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: widget.backgroundColor ?? AppColor.blueNormal,
|
||||
foregroundColor: widget.foregroundColor ?? Colors.white,
|
||||
backgroundColor: backgroundColor ?? AppColor.blueNormal,
|
||||
foregroundColor: foregroundColor ?? Colors.white,
|
||||
disabledBackgroundColor:
|
||||
widget.disabledBackgroundColor ?? AppColor.blueNormal.withAlpha(38),
|
||||
disabledForegroundColor: widget.disabledForegroundColor ?? Colors.white,
|
||||
disabledBackgroundColor ?? AppColor.blueNormal.withAlpha(38),
|
||||
disabledForegroundColor: disabledForegroundColor ?? Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(widget.radius ?? 8),
|
||||
borderRadius: BorderRadius.circular(radius ?? 8),
|
||||
),
|
||||
fixedSize: Size(widget.width, widget.height),
|
||||
minimumSize: Size((isFullWidth ??false) ? double.infinity : width, height),
|
||||
padding: EdgeInsets.zero,
|
||||
textStyle: widget.textStyle ?? AppFonts.yekan24,
|
||||
textStyle: textStyle ?? AppFonts.yekan24,
|
||||
),
|
||||
child: Text(widget.text),
|
||||
child: Text(text),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
@immutable
|
||||
class RTextField extends StatefulWidget {
|
||||
@@ -27,6 +28,7 @@ class RTextField extends StatefulWidget {
|
||||
this.minLines,
|
||||
this.radius,
|
||||
this.filled,
|
||||
this.filledColor,
|
||||
this.enabled,
|
||||
this.errorStyle,
|
||||
this.labelStyle,
|
||||
@@ -61,6 +63,7 @@ class RTextField extends StatefulWidget {
|
||||
this.readonly = false,
|
||||
this.label,
|
||||
this.filled,
|
||||
this.filledColor,
|
||||
this.errorStyle,
|
||||
this.labelStyle,
|
||||
this.enabled}) {
|
||||
@@ -95,6 +98,7 @@ class RTextField extends StatefulWidget {
|
||||
this.readonly = false,
|
||||
this.label,
|
||||
this.filled,
|
||||
this.filledColor,
|
||||
this.errorStyle,
|
||||
this.labelStyle,
|
||||
this.enabled}) {
|
||||
@@ -132,6 +136,7 @@ class RTextField extends StatefulWidget {
|
||||
Widget? suffixIcon;
|
||||
Widget? prefixIcon;
|
||||
bool? filled;
|
||||
Color? filledColor;
|
||||
bool _isPassword = false;
|
||||
|
||||
final BoxConstraints? boxConstraints;
|
||||
@@ -204,8 +209,9 @@ class _RTextFieldState extends State<RTextField> {
|
||||
prefixIconConstraints: widget.boxConstraints,
|
||||
hintText: widget.hintText,
|
||||
labelText: widget.label,
|
||||
labelStyle: widget.labelStyle,
|
||||
labelStyle: widget.labelStyle??AppFonts.yekan14.copyWith(color: AppColor.lightGreyDarkActive),
|
||||
filled: widget.filled,
|
||||
fillColor: widget.filledColor,
|
||||
counter: widget.showCounter ? null : const SizedBox(),
|
||||
hintStyle: widget.hintStyle,
|
||||
enabledBorder: widget._inputBorder,
|
||||
|
||||
@@ -230,6 +230,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.0"
|
||||
flutter_rating_bar:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_rating_bar
|
||||
sha256: d2af03469eac832c591a1eba47c91ecc871fe5708e69967073c043b2d775ed93
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.1"
|
||||
flutter_slidable:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@@ -13,6 +13,7 @@ dependencies:
|
||||
#UI
|
||||
cupertino_icons: ^1.0.8
|
||||
flutter_slidable: ^4.0.0
|
||||
flutter_rating_bar: ^4.0.1
|
||||
|
||||
##Log
|
||||
logger: ^2.5.0
|
||||
@@ -42,6 +43,8 @@ dependencies:
|
||||
|
||||
permission_handler: ^11.4.0
|
||||
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
@@ -254,6 +254,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.9.0"
|
||||
flutter_rating_bar:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_rating_bar
|
||||
sha256: d2af03469eac832c591a1eba47c91ecc871fe5708e69967073c043b2d775ed93
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.1"
|
||||
flutter_slidable:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
Reference in New Issue
Block a user