feat : sale out of province

This commit is contained in:
2025-07-07 16:46:32 +03:30
parent 93ec5774c8
commit 84e3f16f1d
7 changed files with 165 additions and 349 deletions

View File

@@ -0,0 +1,15 @@
import 'package:get/get.dart';
class SalesOutOfProvinceSalesListLogic extends GetxController {
@override
void onReady() {
// TODO: implement onReady
super.onReady();
}
@override
void onClose() {
// TODO: implement onClose
super.onClose();
}
}

View File

@@ -0,0 +1,15 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'logic.dart';
class SalesOutOfProvinceSalesListPage extends StatelessWidget {
const SalesOutOfProvinceSalesListPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final SalesOutOfProvinceSalesListLogic logic = Get.put(SalesOutOfProvinceSalesListLogic());
return Container();
}
}

View File

@@ -11,13 +11,17 @@ import 'package:rasadyar_chicken/presentation/pages/sale/logic.dart';
import 'package:rasadyar_core/core.dart'; import 'package:rasadyar_core/core.dart';
class SalesOutOfProvinceLogic extends GetxController { class SalesOutOfProvinceLogic extends GetxController {
RxInt currentIndex = 0.obs; RootLogic get rootLogic => Get.find<RootLogic>();
SaleLogic get saleLogic => Get.find<SaleLogic>();
RxInt selectedSegmentIndex = 0.obs;
RxBool isExpanded = false.obs; RxBool isExpanded = false.obs;
RxBool isBuyerSubmitButtonEnabled = false.obs; RxBool isBuyerSubmitButtonEnabled = false.obs;
RxBool isSaleSubmitButtonEnabled = false.obs; RxBool isSaleSubmitButtonEnabled = false.obs;
RxList<int> isExpandedList = <int>[].obs; RxList<int> isExpandedList = <int>[].obs;
RxBool searchIsSelected = false.obs; Rx<Jalali> fromDateFilter = Jalali.now().obs;
Rx<Jalali> toDateFilter = Jalali.now().obs;
RxnString searchedValue = RxnString();
RxList<String> routesName = RxList();
//TODO add this to Di //TODO add this to Di
ImagePicker imagePicker = ImagePicker(); ImagePicker imagePicker = ImagePicker();
@@ -34,11 +38,6 @@ class SalesOutOfProvinceLogic extends GetxController {
Rxn<IranProvinceCityModel> selectedProvince = Rxn(); Rxn<IranProvinceCityModel> selectedProvince = Rxn();
Rxn<IranProvinceCityModel> selectedCity = Rxn(); Rxn<IranProvinceCityModel> selectedCity = Rxn();
RootLogic get rootLogic => Get.find<RootLogic>();
SaleLogic get outOfTheProvinceLogic =>
Get.find<SaleLogic>();
GlobalKey<FormState> formKey = GlobalKey<FormState>(); GlobalKey<FormState> formKey = GlobalKey<FormState>();
TextEditingController buyerNameController = TextEditingController(); TextEditingController buyerNameController = TextEditingController();
TextEditingController buyerLastNameController = TextEditingController(); TextEditingController buyerLastNameController = TextEditingController();
@@ -48,41 +47,27 @@ class SalesOutOfProvinceLogic extends GetxController {
//Sale //Sale
TextEditingController quarantineCodeController = TextEditingController(); TextEditingController quarantineCodeController = TextEditingController();
TextEditingController saleWeightController = TextEditingController(); TextEditingController saleWeightController = TextEditingController();
Rx<Jalali> saleDate = Jalali Rx<Jalali> saleDate = Jalali.now().obs;
.now()
.obs;
String? key; String? key;
Rx<Jalali> fromDateFilter = Jalali
.now()
.obs;
Rx<Jalali> toDateFilter = Jalali
.now()
.obs;
RxnString searchedValue = RxnString();
@override @override
void onReady() { void onReady() {
super.onReady(); super.onReady();
getOutProvinceCarcassesBuyer(); getOutProvinceCarcassesBuyer();
getOutProvinceSales(); getOutProvinceSales();
routesName.value = [...saleLogic.routesName, 'داخل استان'].toList();
selectedProvince.listen((p0) => getCites()); selectedProvince.listen((p0) => getCites());
tLog(selectedProduct.value); tLog(selectedProduct.value);
outOfTheProvinceLogic.rolesProductsModel.listen((lists) { saleLogic.rolesProductsModel.listen((lists) {
selectedProduct.value = lists.first; selectedProduct.value = lists.first;
}); });
setupListeners(); setupListeners();
debounce( debounce(
searchedValue, searchedValue,
(callback) => getOutProvinceCarcassesBuyer(), (callback) => getOutProvinceCarcassesBuyer(),
time: Duration(milliseconds: 2000), time: Duration(milliseconds: 2000),
); );
ever(searchIsSelected, (data) {
if (data == false) {
searchedValue.value = null;
}
});
} }
@override @override
@@ -100,25 +85,22 @@ class SalesOutOfProvinceLogic extends GetxController {
Future<void> getOutProvinceCarcassesBuyer() async { Future<void> getOutProvinceCarcassesBuyer() async {
await safeCall( await safeCall(
call: () => call: () => rootLogic.chickenRepository.getOutProvinceCarcassesBuyer(
rootLogic.chickenRepository.getOutProvinceCarcassesBuyer( token: rootLogic.tokenService.accessToken.value!,
token: rootLogic.tokenService.accessToken.value!, queryParameters: buildQueryParams(
queryParameters: buildQueryParams( pageSize: 10,
pageSize: 10, page: 1,
page: 1, state: 'buyer-list',
state: 'buyer-list', search: 'filter',
search: 'filter', role: 'Steward',
role: 'Steward', value: searchedValue.value ?? '',
value: searchedValue.value ?? '', ),
), ),
),
onSuccess: (res) { onSuccess: (res) {
if ((res?.count ?? 0) == 0) { if ((res?.count ?? 0) == 0) {
buyerList.value = Resource<List<OutProvinceCarcassesBuyer>>.empty(); buyerList.value = Resource<List<OutProvinceCarcassesBuyer>>.empty();
} else { } else {
buyerList.value = Resource<List<OutProvinceCarcassesBuyer>>.success( buyerList.value = Resource<List<OutProvinceCarcassesBuyer>>.success(res!.results!);
res!.results!,
);
} }
}, },
); );
@@ -126,27 +108,24 @@ class SalesOutOfProvinceLogic extends GetxController {
Future<void> getOutProvinceSales() async { Future<void> getOutProvinceSales() async {
await safeCall( await safeCall(
call: () => call: () => rootLogic.chickenRepository.getStewardFreeSaleBar(
rootLogic.chickenRepository.getStewardFreeSaleBar( token: rootLogic.tokenService.accessToken.value!,
token: rootLogic.tokenService.accessToken.value!, queryParameters: buildQueryParams(
queryParameters: buildQueryParams( pageSize: 10,
pageSize: 10, page: 1,
page: 1, state: 'buyer-list',
state: 'buyer-list', search: 'filter',
search: 'filter', role: 'Steward',
role: 'Steward', value: searchedValue.value ?? '',
value: searchedValue.value ?? '', fromDate: fromDateFilter.value.toDateTime(),
fromDate: fromDateFilter.value.toDateTime(), toDate: toDateFilter.value.toDateTime(),
toDate: toDateFilter.value.toDateTime(), ),
), ),
),
onSuccess: (res) { onSuccess: (res) {
if ((res?.count ?? 0) == 0) { if ((res?.count ?? 0) == 0) {
salesList.value = Resource<List<StewardFreeSaleBar>>.empty(); salesList.value = Resource<List<StewardFreeSaleBar>>.empty();
} else { } else {
salesList.value = Resource<List<StewardFreeSaleBar>>.success( salesList.value = Resource<List<StewardFreeSaleBar>>.success(res!.results!);
res!.results!,
);
} }
}, },
); );
@@ -155,9 +134,7 @@ class SalesOutOfProvinceLogic extends GetxController {
Future<void> getCites() async { Future<void> getCites() async {
await safeCall( await safeCall(
call: () => call: () =>
rootLogic.chickenRepository.getCity( rootLogic.chickenRepository.getCity(provinceName: selectedProvince.value?.name ?? ''),
provinceName: selectedProvince.value?.name ?? '',
),
onSuccess: (result) { onSuccess: (result) {
if (result != null && result.isNotEmpty) { if (result != null && result.isNotEmpty) {
cites.value = result; cites.value = result;
@@ -188,23 +165,21 @@ class SalesOutOfProvinceLogic extends GetxController {
void checkBuyerFormValid() { void checkBuyerFormValid() {
isBuyerSubmitButtonEnabled.value = isBuyerSubmitButtonEnabled.value =
buyerNameController.text.isNotEmpty && buyerNameController.text.isNotEmpty &&
buyerLastNameController.text.isNotEmpty && buyerLastNameController.text.isNotEmpty &&
buyerPhoneController.text.isNotEmpty && buyerPhoneController.text.isNotEmpty &&
buyerUnitNameController.text.isNotEmpty && buyerUnitNameController.text.isNotEmpty &&
selectedProvince.value != null && selectedProvince.value != null &&
selectedCity.value != null && selectedCity.value != null &&
selectedProduct.value != null; selectedProduct.value != null;
} }
void checkSalesFormValid() { void checkSalesFormValid() {
isSaleSubmitButtonEnabled.value = isSaleSubmitButtonEnabled.value =
saleDate.value saleDate.value.toString().isNotEmpty &&
.toString() selectedProduct.value != null &&
.isNotEmpty && selectedBuyer.value != null &&
selectedProduct.value != null && saleWeightController.text.isNotEmpty &&
selectedBuyer.value != null && quarantineCodeController.text.isNotEmpty;
saleWeightController.text.isNotEmpty &&
quarantineCodeController.text.isNotEmpty;
} }
Future<bool> createBuyer() async { Future<bool> createBuyer() async {
@@ -223,8 +198,7 @@ class SalesOutOfProvinceLogic extends GetxController {
mobile: buyerPhoneController.text, mobile: buyerPhoneController.text,
role: 'Steward', role: 'Steward',
); );
final res = await rootLogic.chickenRepository final res = await rootLogic.chickenRepository.createOutProvinceCarcassesBuyer(
.createOutProvinceCarcassesBuyer(
token: rootLogic.tokenService.accessToken.value!, token: rootLogic.tokenService.accessToken.value!,
body: buyer, body: buyer,
); );
@@ -262,27 +236,23 @@ class SalesOutOfProvinceLogic extends GetxController {
void setEditDataSales(StewardFreeSaleBar item) { void setEditDataSales(StewardFreeSaleBar item) {
quarantineCodeController.text = item.clearanceCode ?? ''; quarantineCodeController.text = item.clearanceCode ?? '';
saleWeightController.text = saleWeightController.text = item.weightOfCarcasses?.toInt().toString() ?? '';
item.weightOfCarcasses?.toInt().toString() ?? '';
saleDate.value = Jalali.fromDateTime(DateTime.parse(item.date!)); saleDate.value = Jalali.fromDateTime(DateTime.parse(item.date!));
selectedCity.value = IranProvinceCityModel(name: item.city); selectedCity.value = IranProvinceCityModel(name: item.city);
selectedBuyer.value = buyerList.value.data?.firstWhere( selectedBuyer.value = buyerList.value.data?.firstWhere(
(element) => element.key == item.buyer?.key, (element) => element.key == item.buyer?.key,
); );
selectedProduct.value = selectedProduct.value = saleLogic.rolesProductsModel.value.first;
outOfTheProvinceLogic.rolesProductsModel.value.first;
key = item.key; key = item.key;
isSaleSubmitButtonEnabled.value = true; isSaleSubmitButtonEnabled.value = true;
} }
Future<void> deleteStewardPurchaseOutOfProvince(String key) async { Future<void> deleteStewardPurchaseOutOfProvince(String key) async {
await safeCall( await safeCall(
call: () => call: () => rootLogic.chickenRepository.deleteStewardPurchasesOutSideOfTheProvince(
rootLogic.chickenRepository token: rootLogic.tokenService.accessToken.value!,
.deleteStewardPurchasesOutSideOfTheProvince( stewardFreeBarKey: key,
token: rootLogic.tokenService.accessToken.value!, ),
stewardFreeBarKey: key,
),
); );
} }
@@ -292,18 +262,15 @@ class SalesOutOfProvinceLogic extends GetxController {
buyerKey: selectedBuyer.value?.key, buyerKey: selectedBuyer.value?.key,
numberOfCarcasses: 0, numberOfCarcasses: 0,
weightOfCarcasses: int.tryParse(saleWeightController.text.clearComma), weightOfCarcasses: int.tryParse(saleWeightController.text.clearComma),
date: saleDate.value date: saleDate.value.toDateTime().formattedDashedGregorian,
.toDateTime()
.formattedDashedGregorian,
clearanceCode: quarantineCodeController.text, clearanceCode: quarantineCodeController.text,
productKey: selectedProduct.value?.key, productKey: selectedProduct.value?.key,
); );
await safeCall( await safeCall(
call: () => call: () => rootLogic.chickenRepository.createOutProvinceStewardFreeBar(
rootLogic.chickenRepository.createOutProvinceStewardFreeBar( token: rootLogic.tokenService.accessToken.value!,
token: rootLogic.tokenService.accessToken.value!, body: requestBody,
body: requestBody, ),
),
onSuccess: (_) { onSuccess: (_) {
res = true; res = true;
}, },
@@ -323,24 +290,29 @@ class SalesOutOfProvinceLogic extends GetxController {
Future<bool> editSale() async { Future<bool> editSale() async {
bool res = false; bool res = false;
StewardFreeSaleBarRequest requestBody = StewardFreeSaleBarRequest( StewardFreeSaleBarRequest requestBody = StewardFreeSaleBarRequest(
numberOfCarcasses: 0, numberOfCarcasses: 0,
weightOfCarcasses: int.tryParse(saleWeightController.text.clearComma), weightOfCarcasses: int.tryParse(saleWeightController.text.clearComma),
date: saleDate.value date: saleDate.value.toDateTime().formattedDashedGregorian,
.toDateTime() clearanceCode: quarantineCodeController.text,
.formattedDashedGregorian, key: key,
clearanceCode: quarantineCodeController.text,
key:key
); );
await safeCall( await safeCall(
call: () => call: () => rootLogic.chickenRepository.updateOutProvinceStewardFreeBar(
rootLogic.chickenRepository.updateOutProvinceStewardFreeBar( token: rootLogic.tokenService.accessToken.value!,
token: rootLogic.tokenService.accessToken.value!, body: requestBody,
body: requestBody, ),
),
onSuccess: (_) { onSuccess: (_) {
res = true; res = true;
}, },
); );
return res; return res;
} }
void setSearchValue(String value) {
searchedValue.value = value.trim();
}
void submitFilter() {
//TODO: Implement filter logic
}
} }

View File

@@ -19,12 +19,12 @@ class SalesPage extends GetView<SalesOutOfProvinceLogic> {
return Scaffold( return Scaffold(
body: Column( body: Column(
children: [ children: [
searchWidget(controller.searchIsSelected, (data) { /* searchWidget(controller.searchIsSelected, (data) {
controller.searchedValue.value = data; controller.searchedValue.value = data;
//TODO: Implement search functionality //TODO: Implement search functionality
controller.getOutProvinceSales(); controller.getOutProvinceSales();
}), }),*/
salesListWidget(), salesListWidget(),
], ],
@@ -454,7 +454,7 @@ class SalesPage extends GetView<SalesOutOfProvinceLogic> {
Widget _productWidget() { Widget _productWidget() {
return ObxValue((data) { return ObxValue((data) {
return OverlayDropdownWidget<ProductModel>( return OverlayDropdownWidget<ProductModel>(
items: controller.outOfTheProvinceLogic.rolesProductsModel, items: controller.saleLogic.rolesProductsModel,
onChanged: (value) { onChanged: (value) {
controller.selectedProduct.value = value; controller.selectedProduct.value = value;
}, },

View File

@@ -7,6 +7,7 @@ import 'package:rasadyar_chicken/data/models/response/roles_products/roles_produ
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart'; import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
import 'package:rasadyar_chicken/presentation/pages/sales_out_of_province/pages/buyers_page.dart'; import 'package:rasadyar_chicken/presentation/pages/sales_out_of_province/pages/buyers_page.dart';
import 'package:rasadyar_chicken/presentation/pages/sales_out_of_province/pages/sales_page.dart'; import 'package:rasadyar_chicken/presentation/pages/sales_out_of_province/pages/sales_page.dart';
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
import 'package:rasadyar_core/core.dart'; import 'package:rasadyar_core/core.dart';
import 'logic.dart'; import 'logic.dart';
@@ -16,153 +17,31 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ObxValue((index) { return BasePage(
return DefaultTabController( routes: controller.routesName,
length: 2, onBackPressed: () => Get.back(id: 1),
initialIndex: index.value, onSearchChanged: (data) => controller.setSearchValue(data),
child: Scaffold( filteringWidget: filterBottomSheet(),
appBar: RAppBar( widgets: [
titleTextStyle: AppFonts.yekan16Bold.copyWith(color: Colors.white), segmentWidget()
centerTitle: true,
hasBack: true,
onBackPressed: () {
Get.back(id: 1);
},
leadingWidth: 155,
leading: Row(
mainAxisSize: MainAxisSize.min,
spacing: 6,
children: [
Assets.vec.chickenSvg.svg(
width: 24,
height: 24,
colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn),
),
Text('رصدطیور', style: AppFonts.yekan16Bold.copyWith(color: Colors.white)),
],
),
additionalActions: [
GestureDetector(
onTap: () {
controller.searchIsSelected.value = !controller.searchIsSelected.value;
},
child: Assets.vec.searchSvg.svg(
width: 24,
height: 24,
colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn),
),
),
SizedBox(width: 8),
Visibility(
visible: controller.currentIndex.value==0,
child: GestureDetector(
onTap: () {
Get.bottomSheet(filterBottomSheet());
},
child: Assets.vec.filterOutlineSvg.svg(
width: 20,
height: 20,
colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn),
),
),
),
SizedBox(width: 8),
],
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
routePageWidget(),
Container(
child: TabBar(
tabs: [
Tab(text: 'فروش' ),
Tab(text: 'خریداران'),
],
onTap: (value) {
controller.currentIndex.value= value;
},
labelColor: AppColor.blueNormal,
unselectedLabelColor: AppColor.mediumGreyDarkHover,
indicatorColor: AppColor.blueNormal,
indicatorSize: TabBarIndicatorSize.tab,
indicator: BoxDecoration(
color: AppColor.blueLight,
border: Border(
bottom: BorderSide(
color:AppColor.blueNormal,
),
),
),
),
),
Expanded(
child: TabBarView(
children: [
SalesPage(),
BuyersPage()
],
),
),
],
),
),
);
}, controller.currentIndex);
}
Row routePageWidget() {
return Row(
children: [
SizedBox(width: 8),
RichText(
text: TextSpan(
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
children: [
WidgetSpan(
child: Row(
children: [
Assets.vec.cubeSearchSvg.svg(
width: 24,
height: 24,
colorFilter: const ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
),
SizedBox(width: 6),
],
),
),
TextSpan(text: 'خارج استان'),
TextSpan(text: '/'),
TextSpan(text: 'فروش'),
],
),
),
], ],
); );
} }
Widget buildRow(String title, String value) { Padding segmentWidget() {
return Padding( return Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0), padding: const EdgeInsets.fromLTRB(8, 0, 8, 8),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Flexible( Expanded(
flex: 2, child: RSegment(
child: Text( children: ['در انتظار', 'همه'],
title, selectedIndex: 0,
textAlign: TextAlign.right, borderColor: const Color(0xFFB4B4B4),
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover), selectedBorderColor: AppColor.blueNormal,
), selectedBackgroundColor: AppColor.blueLight,
), onSegmentSelected: (index) => controller.selectedSegmentIndex.value = index,
Flexible( backgroundColor: AppColor.whiteGreyNormal,
flex: 2,
child: Text(
value,
textAlign: TextAlign.left,
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
), ),
), ),
], ],
@@ -181,13 +60,13 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
spacing: 8, spacing: 8,
children: [ children: [
Expanded( Expanded(
child: timeFilterWidget( child: dateFilterWidget(
date: controller.fromDateFilter, date: controller.fromDateFilter,
onChanged: (jalali) => controller.fromDateFilter.value = jalali, onChanged: (jalali) => controller.fromDateFilter.value = jalali,
), ),
), ),
Expanded( Expanded(
child: timeFilterWidget( child: dateFilterWidget(
isFrom: false, isFrom: false,
date: controller.toDateFilter, date: controller.toDateFilter,
onChanged: (jalali) => controller.toDateFilter.value = jalali, onChanged: (jalali) => controller.toDateFilter.value = jalali,
@@ -199,7 +78,7 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
RElevated( RElevated(
text: 'اعمال فیلتر', text: 'اعمال فیلتر',
onPressed: () { onPressed: () {
controller.getOutProvinceSales(); controller.submitFilter();
Get.back(); Get.back();
}, },
height: 40, height: 40,
@@ -210,99 +89,4 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
); );
} }
GestureDetector timeFilterWidget({
isFrom = true,
required Rx<Jalali> date,
required Function(Jalali jalali) onChanged,
}) {
return GestureDetector(
onTap: () {
Get.bottomSheet(modalDatePicker((value) => onChanged(value)));
},
child: Container(
height: 35,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
border: Border.all(width: 1, color: AppColor.blueNormal),
),
padding: EdgeInsets.symmetric(horizontal: 11, vertical: 4),
child: Row(
spacing: 8,
children: [
Assets.vec.calendarSvg.svg(
width: 24,
height: 24,
colorFilter: const ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
),
Text(isFrom ? 'از' : 'تا', style: AppFonts.yekan16.copyWith(color: AppColor.blueNormal)),
Expanded(
child: ObxValue((data) {
return Text(
date.value.formatCompactDate(),
textAlign: TextAlign.center,
style: AppFonts.yekan16.copyWith(color: AppColor.lightGreyNormalActive),
);
}, date),
),
],
),
),
);
}
Container modalDatePicker(ValueChanged<Jalali> onDateSelected) {
Jalali? tempPickedDate;
return Container(
height: 250,
color: Colors.white,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
child: Row(
children: [
SizedBox(width: 20),
RElevated(
height: 35,
width: 70,
textStyle: AppFonts.yekan14.copyWith(color: Colors.white),
onPressed: () {
onDateSelected(tempPickedDate ?? Jalali.now());
Get.back();
},
text: 'تایید',
),
Spacer(),
RElevated(
height: 35,
width: 70,
backgroundColor: AppColor.error,
textStyle: AppFonts.yekan14.copyWith(color: Colors.white),
onPressed: () {
onDateSelected(tempPickedDate ?? Jalali.now());
Get.back();
},
text: 'لغو',
),
SizedBox(width: 20),
],
),
),
Divider(height: 0, thickness: 1),
Expanded(
child: Container(
child: PersianCupertinoDatePicker(
initialDateTime: Jalali.now(),
mode: PersianCupertinoDatePickerMode.date,
onDateTimeChanged: (dateTime) {
tempPickedDate = dateTime;
},
),
),
),
],
),
);
}
} }

View File

@@ -0,0 +1,15 @@
import 'package:get/get.dart';
class SalesOutOfProvinceBuyersLogic extends GetxController {
@override
void onReady() {
// TODO: implement onReady
super.onReady();
}
@override
void onClose() {
// TODO: implement onClose
super.onClose();
}
}

View File

@@ -0,0 +1,15 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'logic.dart';
class SalesOutOfProvinceBuyersPage extends StatelessWidget {
const SalesOutOfProvinceBuyersPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final SalesOutOfProvinceBuyersLogic logic = Get.put(SalesOutOfProvinceBuyersLogic());
return Container();
}
}