feat : sale out of Province
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
||||||
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/launcher_icon"
|
android:icon="@mipmap/launcher_icon"
|
||||||
@@ -18,6 +19,7 @@
|
|||||||
android:enableOnBackInvokedCallback="true"
|
android:enableOnBackInvokedCallback="true"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
|
android:requestLegacyExternalStorage="true"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:taskAffinity=""
|
android:taskAffinity=""
|
||||||
android:theme="@style/LaunchTheme"
|
android:theme="@style/LaunchTheme"
|
||||||
|
|||||||
@@ -8,12 +8,10 @@ GetIt diChicken = GetIt.instance;
|
|||||||
Future<void> setupChickenDI() async {
|
Future<void> setupChickenDI() async {
|
||||||
var tokenService = Get.find<TokenStorageService>();
|
var tokenService = Get.find<TokenStorageService>();
|
||||||
|
|
||||||
diAuth.registerLazySingleton<DioRemote>(
|
diAuth.registerLazySingleton<DioRemote>(() => DioRemote(baseUrl: tokenService.baseurl.value));
|
||||||
() => DioRemote(baseUrl: tokenService.baseurl.value),
|
|
||||||
);
|
|
||||||
final dioRemote = diAuth.get<DioRemote>();
|
final dioRemote = diAuth.get<DioRemote>();
|
||||||
await dioRemote.init();
|
await dioRemote.init();
|
||||||
diAuth.registerLazySingleton<ChickenRepositoryImpl>(
|
diAuth.registerLazySingleton<ChickenRepositoryImpl>(() => ChickenRepositoryImpl(dioRemote));
|
||||||
() => ChickenRepositoryImpl(dioRemote),
|
|
||||||
);
|
diChicken.registerSingleton(ImagePicker());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
|
||||||
|
part 'create_steward_free_bar.freezed.dart';
|
||||||
|
part 'create_steward_free_bar.g.dart';
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class CreateStewardFreeBar with _$CreateStewardFreeBar {
|
||||||
|
const factory CreateStewardFreeBar({
|
||||||
|
String? productKey,
|
||||||
|
String? killHouseName,
|
||||||
|
String? killHouseMobile,
|
||||||
|
String? province,
|
||||||
|
String? city,
|
||||||
|
int? weightOfCarcasses,
|
||||||
|
String? date,
|
||||||
|
String? barImage,
|
||||||
|
}) = _CreateStewardFreeBar;
|
||||||
|
|
||||||
|
factory CreateStewardFreeBar.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$CreateStewardFreeBarFromJson(json);
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
|
||||||
|
part 'iran_province_city_model.freezed.dart';
|
||||||
|
part 'iran_province_city_model.g.dart';
|
||||||
|
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class IranProvinceCityModel with _$IranProvinceCityModel {
|
||||||
|
const factory IranProvinceCityModel({
|
||||||
|
int? id,
|
||||||
|
String? name,
|
||||||
|
}) = _IranProvinceCityModel;
|
||||||
|
|
||||||
|
factory IranProvinceCityModel.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$IranProvinceCityModelFromJson(json);
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
|
||||||
|
part 'pagination_model.freezed.dart';
|
||||||
|
part 'pagination_model.g.dart';
|
||||||
|
|
||||||
|
@Freezed(genericArgumentFactories: true)
|
||||||
|
abstract class PaginationModel<T> with _$PaginationModel<T> {
|
||||||
|
const factory PaginationModel({
|
||||||
|
int? count,
|
||||||
|
String? next,
|
||||||
|
String? previous,
|
||||||
|
List<T>? results,
|
||||||
|
}) = _PaginationModel<T>;
|
||||||
|
|
||||||
|
factory PaginationModel.fromJson(
|
||||||
|
Map<String, dynamic> json,
|
||||||
|
T Function(Object?) fromJsonT,
|
||||||
|
) => _$PaginationModelFromJson(json, fromJsonT);
|
||||||
|
}
|
||||||
@@ -6,19 +6,6 @@ part 'steward_free_bar.g.dart';
|
|||||||
@freezed
|
@freezed
|
||||||
abstract class StewardFreeBar with _$StewardFreeBar {
|
abstract class StewardFreeBar with _$StewardFreeBar {
|
||||||
const factory StewardFreeBar({
|
const factory StewardFreeBar({
|
||||||
int? count,
|
|
||||||
String? next,
|
|
||||||
String? previous,
|
|
||||||
List<Result>? results,
|
|
||||||
}) = _StewardFreeBar;
|
|
||||||
|
|
||||||
factory StewardFreeBar.fromJson(Map<String, dynamic> json) =>
|
|
||||||
_$StewardFreeBarFromJson(json);
|
|
||||||
}
|
|
||||||
|
|
||||||
@freezed
|
|
||||||
abstract class Result with _$Result {
|
|
||||||
const factory Result({
|
|
||||||
int? id,
|
int? id,
|
||||||
Steward? steward,
|
Steward? steward,
|
||||||
dynamic guild,
|
dynamic guild,
|
||||||
@@ -45,9 +32,10 @@ abstract class Result with _$Result {
|
|||||||
bool? temporaryDeleted,
|
bool? temporaryDeleted,
|
||||||
String? createdBy,
|
String? createdBy,
|
||||||
String? modifiedBy,
|
String? modifiedBy,
|
||||||
}) = _Result;
|
}) = _StewardFreeBar;
|
||||||
|
|
||||||
factory Result.fromJson(Map<String, dynamic> json) => _$ResultFromJson(json);
|
factory StewardFreeBar.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$StewardFreeBarFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ T _$identity<T>(T value) => value;
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$StewardFreeBar {
|
mixin _$StewardFreeBar {
|
||||||
|
|
||||||
int? get count; String? get next; String? get previous; List<Result>? get results;
|
int? get id; Steward? get steward; dynamic get guild; Product? get product; String? get key; String? get createDate; String? get modifyDate; bool? get trash; String? get killHouseName; String? get killHouseMobile; String? get killHouseVetName; String? get killHouseVetMobile; String? get province; String? get city; String? get driverName; String? get driverMobile; dynamic get car; String? get pelak; int? get numberOfCarcasses; double? get weightOfCarcasses; String? get barImage; String? get date; bool? get temporaryTrash; bool? get temporaryDeleted; String? get createdBy; String? get modifiedBy;
|
||||||
/// Create a copy of StewardFreeBar
|
/// Create a copy of StewardFreeBar
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -29,16 +29,16 @@ $StewardFreeBarCopyWith<StewardFreeBar> get copyWith => _$StewardFreeBarCopyWith
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is StewardFreeBar&&(identical(other.count, count) || other.count == count)&&(identical(other.next, next) || other.next == next)&&(identical(other.previous, previous) || other.previous == previous)&&const DeepCollectionEquality().equals(other.results, results));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is StewardFreeBar&&(identical(other.id, id) || other.id == id)&&(identical(other.steward, steward) || other.steward == steward)&&const DeepCollectionEquality().equals(other.guild, guild)&&(identical(other.product, product) || other.product == product)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.killHouseVetName, killHouseVetName) || other.killHouseVetName == killHouseVetName)&&(identical(other.killHouseVetMobile, killHouseVetMobile) || other.killHouseVetMobile == killHouseVetMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.driverName, driverName) || other.driverName == driverName)&&(identical(other.driverMobile, driverMobile) || other.driverMobile == driverMobile)&&const DeepCollectionEquality().equals(other.car, car)&&(identical(other.pelak, pelak) || other.pelak == pelak)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.date, date) || other.date == date)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.modifiedBy, modifiedBy) || other.modifiedBy == modifiedBy));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,count,next,previous,const DeepCollectionEquality().hash(results));
|
int get hashCode => Object.hashAll([runtimeType,id,steward,const DeepCollectionEquality().hash(guild),product,key,createDate,modifyDate,trash,killHouseName,killHouseMobile,killHouseVetName,killHouseVetMobile,province,city,driverName,driverMobile,const DeepCollectionEquality().hash(car),pelak,numberOfCarcasses,weightOfCarcasses,barImage,date,temporaryTrash,temporaryDeleted,createdBy,modifiedBy]);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'StewardFreeBar(count: $count, next: $next, previous: $previous, results: $results)';
|
return 'StewardFreeBar(id: $id, steward: $steward, guild: $guild, product: $product, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, killHouseVetName: $killHouseVetName, killHouseVetMobile: $killHouseVetMobile, province: $province, city: $city, driverName: $driverName, driverMobile: $driverMobile, car: $car, pelak: $pelak, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, barImage: $barImage, date: $date, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, createdBy: $createdBy, modifiedBy: $modifiedBy)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -49,11 +49,11 @@ abstract mixin class $StewardFreeBarCopyWith<$Res> {
|
|||||||
factory $StewardFreeBarCopyWith(StewardFreeBar value, $Res Function(StewardFreeBar) _then) = _$StewardFreeBarCopyWithImpl;
|
factory $StewardFreeBarCopyWith(StewardFreeBar value, $Res Function(StewardFreeBar) _then) = _$StewardFreeBarCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
int? count, String? next, String? previous, List<Result>? results
|
int? id, Steward? steward, dynamic guild, Product? product, String? key, String? createDate, String? modifyDate, bool? trash, String? killHouseName, String? killHouseMobile, String? killHouseVetName, String? killHouseVetMobile, String? province, String? city, String? driverName, String? driverMobile, dynamic car, String? pelak, int? numberOfCarcasses, double? weightOfCarcasses, String? barImage, String? date, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$StewardCopyWith<$Res>? get steward;$ProductCopyWith<$Res>? get product;
|
||||||
|
|
||||||
}
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@@ -66,156 +66,6 @@ class _$StewardFreeBarCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of StewardFreeBar
|
/// Create a copy of StewardFreeBar
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? count = freezed,Object? next = freezed,Object? previous = freezed,Object? results = freezed,}) {
|
|
||||||
return _then(_self.copyWith(
|
|
||||||
count: freezed == count ? _self.count : count // ignore: cast_nullable_to_non_nullable
|
|
||||||
as int?,next: freezed == next ? _self.next : next // ignore: cast_nullable_to_non_nullable
|
|
||||||
as String?,previous: freezed == previous ? _self.previous : previous // ignore: cast_nullable_to_non_nullable
|
|
||||||
as String?,results: freezed == results ? _self.results : results // ignore: cast_nullable_to_non_nullable
|
|
||||||
as List<Result>?,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
@JsonSerializable()
|
|
||||||
|
|
||||||
class _StewardFreeBar implements StewardFreeBar {
|
|
||||||
const _StewardFreeBar({this.count, this.next, this.previous, final List<Result>? results}): _results = results;
|
|
||||||
factory _StewardFreeBar.fromJson(Map<String, dynamic> json) => _$StewardFreeBarFromJson(json);
|
|
||||||
|
|
||||||
@override final int? count;
|
|
||||||
@override final String? next;
|
|
||||||
@override final String? previous;
|
|
||||||
final List<Result>? _results;
|
|
||||||
@override List<Result>? get results {
|
|
||||||
final value = _results;
|
|
||||||
if (value == null) return null;
|
|
||||||
if (_results is EqualUnmodifiableListView) return _results;
|
|
||||||
// ignore: implicit_dynamic_type
|
|
||||||
return EqualUnmodifiableListView(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Create a copy of StewardFreeBar
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
_$StewardFreeBarCopyWith<_StewardFreeBar> get copyWith => __$StewardFreeBarCopyWithImpl<_StewardFreeBar>(this, _$identity);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return _$StewardFreeBarToJson(this, );
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _StewardFreeBar&&(identical(other.count, count) || other.count == count)&&(identical(other.next, next) || other.next == next)&&(identical(other.previous, previous) || other.previous == previous)&&const DeepCollectionEquality().equals(other._results, _results));
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
@override
|
|
||||||
int get hashCode => Object.hash(runtimeType,count,next,previous,const DeepCollectionEquality().hash(_results));
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
return 'StewardFreeBar(count: $count, next: $next, previous: $previous, results: $results)';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
abstract mixin class _$StewardFreeBarCopyWith<$Res> implements $StewardFreeBarCopyWith<$Res> {
|
|
||||||
factory _$StewardFreeBarCopyWith(_StewardFreeBar value, $Res Function(_StewardFreeBar) _then) = __$StewardFreeBarCopyWithImpl;
|
|
||||||
@override @useResult
|
|
||||||
$Res call({
|
|
||||||
int? count, String? next, String? previous, List<Result>? results
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
/// @nodoc
|
|
||||||
class __$StewardFreeBarCopyWithImpl<$Res>
|
|
||||||
implements _$StewardFreeBarCopyWith<$Res> {
|
|
||||||
__$StewardFreeBarCopyWithImpl(this._self, this._then);
|
|
||||||
|
|
||||||
final _StewardFreeBar _self;
|
|
||||||
final $Res Function(_StewardFreeBar) _then;
|
|
||||||
|
|
||||||
/// Create a copy of StewardFreeBar
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? count = freezed,Object? next = freezed,Object? previous = freezed,Object? results = freezed,}) {
|
|
||||||
return _then(_StewardFreeBar(
|
|
||||||
count: freezed == count ? _self.count : count // ignore: cast_nullable_to_non_nullable
|
|
||||||
as int?,next: freezed == next ? _self.next : next // ignore: cast_nullable_to_non_nullable
|
|
||||||
as String?,previous: freezed == previous ? _self.previous : previous // ignore: cast_nullable_to_non_nullable
|
|
||||||
as String?,results: freezed == results ? _self._results : results // ignore: cast_nullable_to_non_nullable
|
|
||||||
as List<Result>?,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
mixin _$Result {
|
|
||||||
|
|
||||||
int? get id; Steward? get steward; dynamic get guild; Product? get product; String? get key; String? get createDate; String? get modifyDate; bool? get trash; String? get killHouseName; String? get killHouseMobile; String? get killHouseVetName; String? get killHouseVetMobile; String? get province; String? get city; String? get driverName; String? get driverMobile; dynamic get car; String? get pelak; int? get numberOfCarcasses; double? get weightOfCarcasses; String? get barImage; String? get date; bool? get temporaryTrash; bool? get temporaryDeleted; String? get createdBy; String? get modifiedBy;
|
|
||||||
/// Create a copy of Result
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
$ResultCopyWith<Result> get copyWith => _$ResultCopyWithImpl<Result>(this as Result, _$identity);
|
|
||||||
|
|
||||||
/// Serializes this Result to a JSON map.
|
|
||||||
Map<String, dynamic> toJson();
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is Result&&(identical(other.id, id) || other.id == id)&&(identical(other.steward, steward) || other.steward == steward)&&const DeepCollectionEquality().equals(other.guild, guild)&&(identical(other.product, product) || other.product == product)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.killHouseVetName, killHouseVetName) || other.killHouseVetName == killHouseVetName)&&(identical(other.killHouseVetMobile, killHouseVetMobile) || other.killHouseVetMobile == killHouseVetMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.driverName, driverName) || other.driverName == driverName)&&(identical(other.driverMobile, driverMobile) || other.driverMobile == driverMobile)&&const DeepCollectionEquality().equals(other.car, car)&&(identical(other.pelak, pelak) || other.pelak == pelak)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.date, date) || other.date == date)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.modifiedBy, modifiedBy) || other.modifiedBy == modifiedBy));
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
@override
|
|
||||||
int get hashCode => Object.hashAll([runtimeType,id,steward,const DeepCollectionEquality().hash(guild),product,key,createDate,modifyDate,trash,killHouseName,killHouseMobile,killHouseVetName,killHouseVetMobile,province,city,driverName,driverMobile,const DeepCollectionEquality().hash(car),pelak,numberOfCarcasses,weightOfCarcasses,barImage,date,temporaryTrash,temporaryDeleted,createdBy,modifiedBy]);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
return 'Result(id: $id, steward: $steward, guild: $guild, product: $product, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, killHouseVetName: $killHouseVetName, killHouseVetMobile: $killHouseVetMobile, province: $province, city: $city, driverName: $driverName, driverMobile: $driverMobile, car: $car, pelak: $pelak, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, barImage: $barImage, date: $date, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, createdBy: $createdBy, modifiedBy: $modifiedBy)';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
abstract mixin class $ResultCopyWith<$Res> {
|
|
||||||
factory $ResultCopyWith(Result value, $Res Function(Result) _then) = _$ResultCopyWithImpl;
|
|
||||||
@useResult
|
|
||||||
$Res call({
|
|
||||||
int? id, Steward? steward, dynamic guild, Product? product, String? key, String? createDate, String? modifyDate, bool? trash, String? killHouseName, String? killHouseMobile, String? killHouseVetName, String? killHouseVetMobile, String? province, String? city, String? driverName, String? driverMobile, dynamic car, String? pelak, int? numberOfCarcasses, double? weightOfCarcasses, String? barImage, String? date, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
$StewardCopyWith<$Res>? get steward;$ProductCopyWith<$Res>? get product;
|
|
||||||
|
|
||||||
}
|
|
||||||
/// @nodoc
|
|
||||||
class _$ResultCopyWithImpl<$Res>
|
|
||||||
implements $ResultCopyWith<$Res> {
|
|
||||||
_$ResultCopyWithImpl(this._self, this._then);
|
|
||||||
|
|
||||||
final Result _self;
|
|
||||||
final $Res Function(Result) _then;
|
|
||||||
|
|
||||||
/// Create a copy of Result
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? steward = freezed,Object? guild = freezed,Object? product = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? killHouseVetName = freezed,Object? killHouseVetMobile = freezed,Object? province = freezed,Object? city = freezed,Object? driverName = freezed,Object? driverMobile = freezed,Object? car = freezed,Object? pelak = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? barImage = freezed,Object? date = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? steward = freezed,Object? guild = freezed,Object? product = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? killHouseVetName = freezed,Object? killHouseVetMobile = freezed,Object? province = freezed,Object? city = freezed,Object? driverName = freezed,Object? driverMobile = freezed,Object? car = freezed,Object? pelak = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? barImage = freezed,Object? date = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -247,7 +97,7 @@ as String?,modifiedBy: freezed == modifiedBy ? _self.modifiedBy : modifiedBy //
|
|||||||
as String?,
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
/// Create a copy of Result
|
/// Create a copy of StewardFreeBar
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@@ -259,7 +109,7 @@ $StewardCopyWith<$Res>? get steward {
|
|||||||
return $StewardCopyWith<$Res>(_self.steward!, (value) {
|
return $StewardCopyWith<$Res>(_self.steward!, (value) {
|
||||||
return _then(_self.copyWith(steward: value));
|
return _then(_self.copyWith(steward: value));
|
||||||
});
|
});
|
||||||
}/// Create a copy of Result
|
}/// Create a copy of StewardFreeBar
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@@ -278,9 +128,9 @@ $ProductCopyWith<$Res>? get product {
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _Result implements Result {
|
class _StewardFreeBar implements StewardFreeBar {
|
||||||
const _Result({this.id, this.steward, this.guild, this.product, this.key, this.createDate, this.modifyDate, this.trash, this.killHouseName, this.killHouseMobile, this.killHouseVetName, this.killHouseVetMobile, this.province, this.city, this.driverName, this.driverMobile, this.car, this.pelak, this.numberOfCarcasses, this.weightOfCarcasses, this.barImage, this.date, this.temporaryTrash, this.temporaryDeleted, this.createdBy, this.modifiedBy});
|
const _StewardFreeBar({this.id, this.steward, this.guild, this.product, this.key, this.createDate, this.modifyDate, this.trash, this.killHouseName, this.killHouseMobile, this.killHouseVetName, this.killHouseVetMobile, this.province, this.city, this.driverName, this.driverMobile, this.car, this.pelak, this.numberOfCarcasses, this.weightOfCarcasses, this.barImage, this.date, this.temporaryTrash, this.temporaryDeleted, this.createdBy, this.modifiedBy});
|
||||||
factory _Result.fromJson(Map<String, dynamic> json) => _$ResultFromJson(json);
|
factory _StewardFreeBar.fromJson(Map<String, dynamic> json) => _$StewardFreeBarFromJson(json);
|
||||||
|
|
||||||
@override final int? id;
|
@override final int? id;
|
||||||
@override final Steward? steward;
|
@override final Steward? steward;
|
||||||
@@ -309,20 +159,20 @@ class _Result implements Result {
|
|||||||
@override final String? createdBy;
|
@override final String? createdBy;
|
||||||
@override final String? modifiedBy;
|
@override final String? modifiedBy;
|
||||||
|
|
||||||
/// Create a copy of Result
|
/// Create a copy of StewardFreeBar
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
_$ResultCopyWith<_Result> get copyWith => __$ResultCopyWithImpl<_Result>(this, _$identity);
|
_$StewardFreeBarCopyWith<_StewardFreeBar> get copyWith => __$StewardFreeBarCopyWithImpl<_StewardFreeBar>(this, _$identity);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return _$ResultToJson(this, );
|
return _$StewardFreeBarToJson(this, );
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Result&&(identical(other.id, id) || other.id == id)&&(identical(other.steward, steward) || other.steward == steward)&&const DeepCollectionEquality().equals(other.guild, guild)&&(identical(other.product, product) || other.product == product)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.killHouseVetName, killHouseVetName) || other.killHouseVetName == killHouseVetName)&&(identical(other.killHouseVetMobile, killHouseVetMobile) || other.killHouseVetMobile == killHouseVetMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.driverName, driverName) || other.driverName == driverName)&&(identical(other.driverMobile, driverMobile) || other.driverMobile == driverMobile)&&const DeepCollectionEquality().equals(other.car, car)&&(identical(other.pelak, pelak) || other.pelak == pelak)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.date, date) || other.date == date)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.modifiedBy, modifiedBy) || other.modifiedBy == modifiedBy));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _StewardFreeBar&&(identical(other.id, id) || other.id == id)&&(identical(other.steward, steward) || other.steward == steward)&&const DeepCollectionEquality().equals(other.guild, guild)&&(identical(other.product, product) || other.product == product)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.killHouseVetName, killHouseVetName) || other.killHouseVetName == killHouseVetName)&&(identical(other.killHouseVetMobile, killHouseVetMobile) || other.killHouseVetMobile == killHouseVetMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.driverName, driverName) || other.driverName == driverName)&&(identical(other.driverMobile, driverMobile) || other.driverMobile == driverMobile)&&const DeepCollectionEquality().equals(other.car, car)&&(identical(other.pelak, pelak) || other.pelak == pelak)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.date, date) || other.date == date)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.modifiedBy, modifiedBy) || other.modifiedBy == modifiedBy));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -331,15 +181,15 @@ int get hashCode => Object.hashAll([runtimeType,id,steward,const DeepCollectionE
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'Result(id: $id, steward: $steward, guild: $guild, product: $product, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, killHouseVetName: $killHouseVetName, killHouseVetMobile: $killHouseVetMobile, province: $province, city: $city, driverName: $driverName, driverMobile: $driverMobile, car: $car, pelak: $pelak, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, barImage: $barImage, date: $date, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, createdBy: $createdBy, modifiedBy: $modifiedBy)';
|
return 'StewardFreeBar(id: $id, steward: $steward, guild: $guild, product: $product, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, killHouseVetName: $killHouseVetName, killHouseVetMobile: $killHouseVetMobile, province: $province, city: $city, driverName: $driverName, driverMobile: $driverMobile, car: $car, pelak: $pelak, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, barImage: $barImage, date: $date, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, createdBy: $createdBy, modifiedBy: $modifiedBy)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
abstract mixin class _$ResultCopyWith<$Res> implements $ResultCopyWith<$Res> {
|
abstract mixin class _$StewardFreeBarCopyWith<$Res> implements $StewardFreeBarCopyWith<$Res> {
|
||||||
factory _$ResultCopyWith(_Result value, $Res Function(_Result) _then) = __$ResultCopyWithImpl;
|
factory _$StewardFreeBarCopyWith(_StewardFreeBar value, $Res Function(_StewardFreeBar) _then) = __$StewardFreeBarCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
int? id, Steward? steward, dynamic guild, Product? product, String? key, String? createDate, String? modifyDate, bool? trash, String? killHouseName, String? killHouseMobile, String? killHouseVetName, String? killHouseVetMobile, String? province, String? city, String? driverName, String? driverMobile, dynamic car, String? pelak, int? numberOfCarcasses, double? weightOfCarcasses, String? barImage, String? date, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy
|
int? id, Steward? steward, dynamic guild, Product? product, String? key, String? createDate, String? modifyDate, bool? trash, String? killHouseName, String? killHouseMobile, String? killHouseVetName, String? killHouseVetMobile, String? province, String? city, String? driverName, String? driverMobile, dynamic car, String? pelak, int? numberOfCarcasses, double? weightOfCarcasses, String? barImage, String? date, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy
|
||||||
@@ -350,17 +200,17 @@ $Res call({
|
|||||||
|
|
||||||
}
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class __$ResultCopyWithImpl<$Res>
|
class __$StewardFreeBarCopyWithImpl<$Res>
|
||||||
implements _$ResultCopyWith<$Res> {
|
implements _$StewardFreeBarCopyWith<$Res> {
|
||||||
__$ResultCopyWithImpl(this._self, this._then);
|
__$StewardFreeBarCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
final _Result _self;
|
final _StewardFreeBar _self;
|
||||||
final $Res Function(_Result) _then;
|
final $Res Function(_StewardFreeBar) _then;
|
||||||
|
|
||||||
/// Create a copy of Result
|
/// Create a copy of StewardFreeBar
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? steward = freezed,Object? guild = freezed,Object? product = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? killHouseVetName = freezed,Object? killHouseVetMobile = freezed,Object? province = freezed,Object? city = freezed,Object? driverName = freezed,Object? driverMobile = freezed,Object? car = freezed,Object? pelak = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? barImage = freezed,Object? date = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? steward = freezed,Object? guild = freezed,Object? product = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? killHouseVetName = freezed,Object? killHouseVetMobile = freezed,Object? province = freezed,Object? city = freezed,Object? driverName = freezed,Object? driverMobile = freezed,Object? car = freezed,Object? pelak = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? barImage = freezed,Object? date = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,}) {
|
||||||
return _then(_Result(
|
return _then(_StewardFreeBar(
|
||||||
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,steward: freezed == steward ? _self.steward : steward // ignore: cast_nullable_to_non_nullable
|
as int?,steward: freezed == steward ? _self.steward : steward // ignore: cast_nullable_to_non_nullable
|
||||||
as Steward?,guild: freezed == guild ? _self.guild : guild // ignore: cast_nullable_to_non_nullable
|
as Steward?,guild: freezed == guild ? _self.guild : guild // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -391,7 +241,7 @@ as String?,
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a copy of Result
|
/// Create a copy of StewardFreeBar
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@@ -403,7 +253,7 @@ $StewardCopyWith<$Res>? get steward {
|
|||||||
return $StewardCopyWith<$Res>(_self.steward!, (value) {
|
return $StewardCopyWith<$Res>(_self.steward!, (value) {
|
||||||
return _then(_self.copyWith(steward: value));
|
return _then(_self.copyWith(steward: value));
|
||||||
});
|
});
|
||||||
}/// Create a copy of Result
|
}/// Create a copy of StewardFreeBar
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override
|
@override
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
|
|||||||
@@ -8,84 +8,68 @@ part of 'steward_free_bar.dart';
|
|||||||
|
|
||||||
_StewardFreeBar _$StewardFreeBarFromJson(Map<String, dynamic> json) =>
|
_StewardFreeBar _$StewardFreeBarFromJson(Map<String, dynamic> json) =>
|
||||||
_StewardFreeBar(
|
_StewardFreeBar(
|
||||||
count: (json['count'] as num?)?.toInt(),
|
id: (json['id'] as num?)?.toInt(),
|
||||||
next: json['next'] as String?,
|
steward: json['steward'] == null
|
||||||
previous: json['previous'] as String?,
|
? null
|
||||||
results: (json['results'] as List<dynamic>?)
|
: Steward.fromJson(json['steward'] as Map<String, dynamic>),
|
||||||
?.map((e) => Result.fromJson(e as Map<String, dynamic>))
|
guild: json['guild'],
|
||||||
.toList(),
|
product: json['product'] == null
|
||||||
|
? null
|
||||||
|
: Product.fromJson(json['product'] as Map<String, dynamic>),
|
||||||
|
key: json['key'] as String?,
|
||||||
|
createDate: json['create_date'] as String?,
|
||||||
|
modifyDate: json['modify_date'] as String?,
|
||||||
|
trash: json['trash'] as bool?,
|
||||||
|
killHouseName: json['kill_house_name'] as String?,
|
||||||
|
killHouseMobile: json['kill_house_mobile'] as String?,
|
||||||
|
killHouseVetName: json['kill_house_vet_name'] as String?,
|
||||||
|
killHouseVetMobile: json['kill_house_vet_mobile'] as String?,
|
||||||
|
province: json['province'] as String?,
|
||||||
|
city: json['city'] as String?,
|
||||||
|
driverName: json['driver_name'] as String?,
|
||||||
|
driverMobile: json['driver_mobile'] as String?,
|
||||||
|
car: json['car'],
|
||||||
|
pelak: json['pelak'] as String?,
|
||||||
|
numberOfCarcasses: (json['number_of_carcasses'] as num?)?.toInt(),
|
||||||
|
weightOfCarcasses: (json['weight_of_carcasses'] as num?)?.toDouble(),
|
||||||
|
barImage: json['bar_image'] as String?,
|
||||||
|
date: json['date'] as String?,
|
||||||
|
temporaryTrash: json['temporary_trash'] as bool?,
|
||||||
|
temporaryDeleted: json['temporary_deleted'] as bool?,
|
||||||
|
createdBy: json['created_by'] as String?,
|
||||||
|
modifiedBy: json['modified_by'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$StewardFreeBarToJson(_StewardFreeBar instance) =>
|
Map<String, dynamic> _$StewardFreeBarToJson(_StewardFreeBar instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'count': instance.count,
|
'id': instance.id,
|
||||||
'next': instance.next,
|
'steward': instance.steward,
|
||||||
'previous': instance.previous,
|
'guild': instance.guild,
|
||||||
'results': instance.results,
|
'product': instance.product,
|
||||||
|
'key': instance.key,
|
||||||
|
'create_date': instance.createDate,
|
||||||
|
'modify_date': instance.modifyDate,
|
||||||
|
'trash': instance.trash,
|
||||||
|
'kill_house_name': instance.killHouseName,
|
||||||
|
'kill_house_mobile': instance.killHouseMobile,
|
||||||
|
'kill_house_vet_name': instance.killHouseVetName,
|
||||||
|
'kill_house_vet_mobile': instance.killHouseVetMobile,
|
||||||
|
'province': instance.province,
|
||||||
|
'city': instance.city,
|
||||||
|
'driver_name': instance.driverName,
|
||||||
|
'driver_mobile': instance.driverMobile,
|
||||||
|
'car': instance.car,
|
||||||
|
'pelak': instance.pelak,
|
||||||
|
'number_of_carcasses': instance.numberOfCarcasses,
|
||||||
|
'weight_of_carcasses': instance.weightOfCarcasses,
|
||||||
|
'bar_image': instance.barImage,
|
||||||
|
'date': instance.date,
|
||||||
|
'temporary_trash': instance.temporaryTrash,
|
||||||
|
'temporary_deleted': instance.temporaryDeleted,
|
||||||
|
'created_by': instance.createdBy,
|
||||||
|
'modified_by': instance.modifiedBy,
|
||||||
};
|
};
|
||||||
|
|
||||||
_Result _$ResultFromJson(Map<String, dynamic> json) => _Result(
|
|
||||||
id: (json['id'] as num?)?.toInt(),
|
|
||||||
steward: json['steward'] == null
|
|
||||||
? null
|
|
||||||
: Steward.fromJson(json['steward'] as Map<String, dynamic>),
|
|
||||||
guild: json['guild'],
|
|
||||||
product: json['product'] == null
|
|
||||||
? null
|
|
||||||
: Product.fromJson(json['product'] as Map<String, dynamic>),
|
|
||||||
key: json['key'] as String?,
|
|
||||||
createDate: json['create_date'] as String?,
|
|
||||||
modifyDate: json['modify_date'] as String?,
|
|
||||||
trash: json['trash'] as bool?,
|
|
||||||
killHouseName: json['kill_house_name'] as String?,
|
|
||||||
killHouseMobile: json['kill_house_mobile'] as String?,
|
|
||||||
killHouseVetName: json['kill_house_vet_name'] as String?,
|
|
||||||
killHouseVetMobile: json['kill_house_vet_mobile'] as String?,
|
|
||||||
province: json['province'] as String?,
|
|
||||||
city: json['city'] as String?,
|
|
||||||
driverName: json['driver_name'] as String?,
|
|
||||||
driverMobile: json['driver_mobile'] as String?,
|
|
||||||
car: json['car'],
|
|
||||||
pelak: json['pelak'] as String?,
|
|
||||||
numberOfCarcasses: (json['number_of_carcasses'] as num?)?.toInt(),
|
|
||||||
weightOfCarcasses: (json['weight_of_carcasses'] as num?)?.toDouble(),
|
|
||||||
barImage: json['bar_image'] as String?,
|
|
||||||
date: json['date'] as String?,
|
|
||||||
temporaryTrash: json['temporary_trash'] as bool?,
|
|
||||||
temporaryDeleted: json['temporary_deleted'] as bool?,
|
|
||||||
createdBy: json['created_by'] as String?,
|
|
||||||
modifiedBy: json['modified_by'] as String?,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$ResultToJson(_Result instance) => <String, dynamic>{
|
|
||||||
'id': instance.id,
|
|
||||||
'steward': instance.steward,
|
|
||||||
'guild': instance.guild,
|
|
||||||
'product': instance.product,
|
|
||||||
'key': instance.key,
|
|
||||||
'create_date': instance.createDate,
|
|
||||||
'modify_date': instance.modifyDate,
|
|
||||||
'trash': instance.trash,
|
|
||||||
'kill_house_name': instance.killHouseName,
|
|
||||||
'kill_house_mobile': instance.killHouseMobile,
|
|
||||||
'kill_house_vet_name': instance.killHouseVetName,
|
|
||||||
'kill_house_vet_mobile': instance.killHouseVetMobile,
|
|
||||||
'province': instance.province,
|
|
||||||
'city': instance.city,
|
|
||||||
'driver_name': instance.driverName,
|
|
||||||
'driver_mobile': instance.driverMobile,
|
|
||||||
'car': instance.car,
|
|
||||||
'pelak': instance.pelak,
|
|
||||||
'number_of_carcasses': instance.numberOfCarcasses,
|
|
||||||
'weight_of_carcasses': instance.weightOfCarcasses,
|
|
||||||
'bar_image': instance.barImage,
|
|
||||||
'date': instance.date,
|
|
||||||
'temporary_trash': instance.temporaryTrash,
|
|
||||||
'temporary_deleted': instance.temporaryDeleted,
|
|
||||||
'created_by': instance.createdBy,
|
|
||||||
'modified_by': instance.modifiedBy,
|
|
||||||
};
|
|
||||||
|
|
||||||
_Steward _$StewardFromJson(Map<String, dynamic> json) => _Steward(
|
_Steward _$StewardFromJson(Map<String, dynamic> json) => _Steward(
|
||||||
user: json['user'] == null
|
user: json['user'] == null
|
||||||
? null
|
? null
|
||||||
|
|||||||
@@ -6,79 +6,67 @@ import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
|
|||||||
import 'package:rasadyar_chicken/data/models/response/guild_profile/guild_profile.dart';
|
import 'package:rasadyar_chicken/data/models/response/guild_profile/guild_profile.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/imported_loads_model/imported_loads_model.dart';
|
import 'package:rasadyar_chicken/data/models/response/imported_loads_model/imported_loads_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/inventory/inventory_model.dart';
|
import 'package:rasadyar_chicken/data/models/response/inventory/inventory_model.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/response/pagination_model/pagination_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar_dashboard/steward_free_bar_dashboard.dart';
|
import 'package:rasadyar_chicken/data/models/response/steward_free_bar_dashboard/steward_free_bar_dashboard.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart'
|
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart' hide ProductModel;
|
||||||
hide ProductModel;
|
|
||||||
|
import '../models/request/create_steward_free_bar/create_steward_free_bar.dart';
|
||||||
|
|
||||||
abstract class ChickenRepository {
|
abstract class ChickenRepository {
|
||||||
Future<List<InventoryModel>?> getInventory({required String token});
|
Future<List<InventoryModel>?> getInventory({required String token});
|
||||||
|
|
||||||
Future<KillHouseDistributionInfo?> getIKillHouseDistributionInfo({
|
Future<KillHouseDistributionInfo?> getIKillHouseDistributionInfo({required String token});
|
||||||
required String token,
|
|
||||||
});
|
|
||||||
|
|
||||||
Future<BarInformation?> getGeneralBarInformation({required String token,Map<String, dynamic>? queryParameters});
|
Future<BarInformation?> getGeneralBarInformation({required String token, Map<String, dynamic>? queryParameters});
|
||||||
|
|
||||||
Future<WaitingArrivalModel?> getWaitingArrivals({
|
Future<WaitingArrivalModel?> getWaitingArrivals({required String token, int? page});
|
||||||
required String token,
|
|
||||||
int? page,
|
|
||||||
});
|
|
||||||
|
|
||||||
Future<void> setSateForArrivals({
|
Future<void> setSateForArrivals({required String token, required Map<String, dynamic> request});
|
||||||
required String token,
|
|
||||||
required Map<String, dynamic> request,
|
|
||||||
});
|
|
||||||
|
|
||||||
Future<ImportedLoadsModel?> getImportedLoadsModel({
|
Future<ImportedLoadsModel?> getImportedLoadsModel({required String token, required int page});
|
||||||
required String token,
|
|
||||||
required int page,
|
|
||||||
});
|
|
||||||
|
|
||||||
Future<AllocatedMadeModel?> getAllocatedMade({
|
Future<AllocatedMadeModel?> getAllocatedMade({required String token, required int page});
|
||||||
required String token,
|
|
||||||
required int page,
|
|
||||||
});
|
|
||||||
|
|
||||||
Future<void> confirmAllocation({
|
Future<void> confirmAllocation({required String token, required Map<String, dynamic> allocation});
|
||||||
required String token,
|
|
||||||
required Map<String, dynamic> allocation,
|
|
||||||
});
|
|
||||||
|
|
||||||
Future<void> denyAllocation({
|
Future<void> denyAllocation({required String token, required String allocationToken});
|
||||||
required String token,
|
|
||||||
required String allocationToken,
|
|
||||||
});
|
|
||||||
|
|
||||||
Future<void> confirmAllAllocation({
|
Future<void> confirmAllAllocation({required String token, required List<String> allocationTokens});
|
||||||
required String token,
|
|
||||||
required List<String> allocationTokens,
|
|
||||||
});
|
|
||||||
|
|
||||||
Future<List<ProductModel>?> getRolesProducts({required String token});
|
Future<List<ProductModel>?> getRolesProducts({required String token});
|
||||||
|
|
||||||
Future<List<GuildModel>?> getGuilds({
|
Future<List<GuildModel>?> getGuilds({required String token, required bool isFree});
|
||||||
required String token,
|
|
||||||
required bool isFree,
|
|
||||||
});
|
|
||||||
|
|
||||||
Future<GuildProfile?> getProfile({required String token});
|
Future<GuildProfile?> getProfile({required String token});
|
||||||
|
|
||||||
Future<void> postSubmitStewardAllocation({
|
Future<void> postSubmitStewardAllocation({required String token, required SubmitStewardAllocation request});
|
||||||
required String token,
|
|
||||||
required SubmitStewardAllocation request,
|
|
||||||
});
|
|
||||||
|
|
||||||
Future<StewardFreeBarDashboard?> getStewardDashboard({
|
Future<StewardFreeBarDashboard?> getStewardDashboard({
|
||||||
required String token,
|
required String token,
|
||||||
required String stratDate,
|
required String stratDate,
|
||||||
required String endDate,
|
required String endDate,
|
||||||
});
|
});
|
||||||
|
|
||||||
Future<DashboardKillHouseFreeBar?> getDashboardKillHouseFreeBar({
|
Future<DashboardKillHouseFreeBar?> getDashboardKillHouseFreeBar({
|
||||||
required String token,
|
required String token,
|
||||||
required String stratDate,
|
required String stratDate,
|
||||||
required String endDate,
|
required String endDate,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Future<PaginationModel<StewardFreeBar>?> getStewardPurchasesOutSideOfTheProvince({
|
||||||
|
required String token,
|
||||||
|
Map<String, dynamic>? queryParameters,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<void> createStewardPurchasesOutSideOfTheProvince({required String token, required CreateStewardFreeBar body});
|
||||||
|
|
||||||
|
Future<void> deleteStewardPurchasesOutSideOfTheProvince({required String token, required String stewardFreeBarKey});
|
||||||
|
|
||||||
|
Future<List<IranProvinceCityModel>?> getProvince();
|
||||||
|
|
||||||
|
Future<List<IranProvinceCityModel>?> getCity({required String provinceName});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:rasadyar_chicken/data/models/request/create_steward_free_bar/create_steward_free_bar.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/request/submit_steward_allocation/submit_steward_allocation.dart';
|
import 'package:rasadyar_chicken/data/models/request/submit_steward_allocation/submit_steward_allocation.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
|
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/bar_information/bar_information.dart';
|
import 'package:rasadyar_chicken/data/models/response/bar_information/bar_information.dart';
|
||||||
@@ -6,11 +7,13 @@ import 'package:rasadyar_chicken/data/models/response/guild/guild_model.dart';
|
|||||||
import 'package:rasadyar_chicken/data/models/response/guild_profile/guild_profile.dart';
|
import 'package:rasadyar_chicken/data/models/response/guild_profile/guild_profile.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/imported_loads_model/imported_loads_model.dart';
|
import 'package:rasadyar_chicken/data/models/response/imported_loads_model/imported_loads_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/inventory/inventory_model.dart';
|
import 'package:rasadyar_chicken/data/models/response/inventory/inventory_model.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/response/pagination_model/pagination_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar_dashboard/steward_free_bar_dashboard.dart';
|
import 'package:rasadyar_chicken/data/models/response/steward_free_bar_dashboard/steward_free_bar_dashboard.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart'
|
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart' hide ProductModel;
|
||||||
hide ProductModel;
|
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
import 'chicken_repository.dart';
|
import 'chicken_repository.dart';
|
||||||
@@ -25,18 +28,14 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
|||||||
var res = await _httpClient.get(
|
var res = await _httpClient.get(
|
||||||
'/roles-products/?role=Steward',
|
'/roles-products/?role=Steward',
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
fromJsonList: (json) => (json)
|
fromJsonList: (json) => (json).map((item) => InventoryModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||||
.map((item) => InventoryModel.fromJson(item as Map<String, dynamic>))
|
|
||||||
.toList(),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<KillHouseDistributionInfo?> getIKillHouseDistributionInfo({
|
Future<KillHouseDistributionInfo?> getIKillHouseDistributionInfo({required String token}) async {
|
||||||
required String token,
|
|
||||||
}) async {
|
|
||||||
var res = await _httpClient.get(
|
var res = await _httpClient.get(
|
||||||
'/kill-house-distribution-info/?role=Steward',
|
'/kill-house-distribution-info/?role=Steward',
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
@@ -49,7 +48,7 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
|||||||
@override
|
@override
|
||||||
Future<BarInformation?> getGeneralBarInformation({
|
Future<BarInformation?> getGeneralBarInformation({
|
||||||
required String token,
|
required String token,
|
||||||
Map<String, dynamic>? queryParameters
|
Map<String, dynamic>? queryParameters,
|
||||||
}) async {
|
}) async {
|
||||||
var res = await _httpClient.get(
|
var res = await _httpClient.get(
|
||||||
'/bars_for_kill_house_dashboard/?role=Steward',
|
'/bars_for_kill_house_dashboard/?role=Steward',
|
||||||
@@ -61,10 +60,7 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<WaitingArrivalModel?> getWaitingArrivals({
|
Future<WaitingArrivalModel?> getWaitingArrivals({required String token, int? page}) async {
|
||||||
required String token,
|
|
||||||
int? page,
|
|
||||||
}) async {
|
|
||||||
var res = await _httpClient.get(
|
var res = await _httpClient.get(
|
||||||
'/steward-allocation/?search=filter&value=&role=Steward&page=${page ?? 1}&page_size=10&type=not_entered',
|
'/steward-allocation/?search=filter&value=&role=Steward&page=${page ?? 1}&page_size=10&type=not_entered',
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
@@ -74,22 +70,12 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> setSateForArrivals({
|
Future<void> setSateForArrivals({required String token, required Map<String, dynamic> request}) async {
|
||||||
required String token,
|
await _httpClient.put('/steward-allocation/0/', headers: {'Authorization': 'Bearer $token'}, data: request);
|
||||||
required Map<String, dynamic> request,
|
|
||||||
}) async {
|
|
||||||
await _httpClient.put(
|
|
||||||
'/steward-allocation/0/',
|
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
|
||||||
data: request,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<ImportedLoadsModel?> getImportedLoadsModel({
|
Future<ImportedLoadsModel?> getImportedLoadsModel({required String token, required int page}) async {
|
||||||
required String token,
|
|
||||||
required int page,
|
|
||||||
}) async {
|
|
||||||
var res = await _httpClient.get(
|
var res = await _httpClient.get(
|
||||||
'/steward-allocation/?role=Steward&search=filter&page=$page&page_size=10&value=&type=entered',
|
'/steward-allocation/?role=Steward&search=filter&page=$page&page_size=10&value=&type=entered',
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
@@ -99,10 +85,7 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<AllocatedMadeModel?> getAllocatedMade({
|
Future<AllocatedMadeModel?> getAllocatedMade({required String token, required int page}) async {
|
||||||
required String token,
|
|
||||||
required int page,
|
|
||||||
}) async {
|
|
||||||
var res = await _httpClient.get(
|
var res = await _httpClient.get(
|
||||||
'/steward-allocation/?search=filter&value=&role=Steward&page=$page&page_size=100',
|
'/steward-allocation/?search=filter&value=&role=Steward&page=$page&page_size=100',
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
@@ -112,10 +95,7 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> confirmAllocation({
|
Future<void> confirmAllocation({required String token, required Map<String, dynamic> allocation}) async {
|
||||||
required String token,
|
|
||||||
required Map<String, dynamic> allocation,
|
|
||||||
}) async {
|
|
||||||
var res = await _httpClient.put(
|
var res = await _httpClient.put(
|
||||||
'/steward-allocation/0/',
|
'/steward-allocation/0/',
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
@@ -124,10 +104,7 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> denyAllocation({
|
Future<void> denyAllocation({required String token, required String allocationToken}) async {
|
||||||
required String token,
|
|
||||||
required String allocationToken,
|
|
||||||
}) async {
|
|
||||||
await _httpClient.delete(
|
await _httpClient.delete(
|
||||||
'/steward-allocation/0/?steward_allocation_key=$allocationToken',
|
'/steward-allocation/0/?steward_allocation_key=$allocationToken',
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
@@ -135,10 +112,7 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> confirmAllAllocation({
|
Future<void> confirmAllAllocation({required String token, required List<String> allocationTokens}) async {
|
||||||
required String token,
|
|
||||||
required List<String> allocationTokens,
|
|
||||||
}) async {
|
|
||||||
await _httpClient.put(
|
await _httpClient.put(
|
||||||
'/steward-allocation/0/',
|
'/steward-allocation/0/',
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
@@ -151,25 +125,18 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
|||||||
var res = await _httpClient.get(
|
var res = await _httpClient.get(
|
||||||
'/roles-products/?role=Steward',
|
'/roles-products/?role=Steward',
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
fromJsonList: (json) => json
|
fromJsonList: (json) => json.map((item) => ProductModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||||
.map((item) => ProductModel.fromJson(item as Map<String, dynamic>))
|
|
||||||
.toList(),
|
|
||||||
);
|
);
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<List<GuildModel>?> getGuilds({
|
Future<List<GuildModel>?> getGuilds({required String token, required bool isFree}) async {
|
||||||
required String token,
|
|
||||||
required bool isFree,
|
|
||||||
}) async {
|
|
||||||
var res = await _httpClient.get(
|
var res = await _httpClient.get(
|
||||||
'/guilds/?role=Steward&free=$isFree',
|
'/guilds/?role=Steward&free=$isFree',
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
|
|
||||||
fromJsonList: (json) => json
|
fromJsonList: (json) => json.map((item) => GuildModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||||
.map((item) => GuildModel.fromJson(item as Map<String, dynamic>))
|
|
||||||
.toList(),
|
|
||||||
);
|
);
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
@@ -185,15 +152,8 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> postSubmitStewardAllocation({
|
Future<void> postSubmitStewardAllocation({required String token, required SubmitStewardAllocation request}) async {
|
||||||
required String token,
|
await _httpClient.post('/steward-allocation/', headers: {'Authorization': 'Bearer $token'}, data: request.toJson());
|
||||||
required SubmitStewardAllocation request,
|
|
||||||
}) async {
|
|
||||||
await _httpClient.post(
|
|
||||||
'/steward-allocation/',
|
|
||||||
headers: {'Authorization': 'Bearer $token'},
|
|
||||||
data: request.toJson(),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -223,4 +183,64 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
|||||||
);
|
);
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<PaginationModel<StewardFreeBar>?> getStewardPurchasesOutSideOfTheProvince({
|
||||||
|
required String token,
|
||||||
|
Map<String, dynamic>? queryParameters,
|
||||||
|
}) async {
|
||||||
|
var res = await _httpClient.get(
|
||||||
|
'/steward_free_bar/?',
|
||||||
|
queryParameters: queryParameters,
|
||||||
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
|
fromJson: (json) => PaginationModel<StewardFreeBar>.fromJson(
|
||||||
|
json,
|
||||||
|
(json) => StewardFreeBar.fromJson(json as Map<String, dynamic>),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<IranProvinceCityModel>?> getCity({required String provinceName}) async {
|
||||||
|
var res = await _httpClient.get(
|
||||||
|
'/iran_city/?',
|
||||||
|
queryParameters: {'name': provinceName},
|
||||||
|
fromJsonList: (json) => json.map((item) => IranProvinceCityModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||||
|
);
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<IranProvinceCityModel>?> getProvince() async {
|
||||||
|
var res = await _httpClient.get(
|
||||||
|
'/iran_province/',
|
||||||
|
fromJsonList: (json) => json.map((item) => IranProvinceCityModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||||
|
);
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> createStewardPurchasesOutSideOfTheProvince({
|
||||||
|
required String token,
|
||||||
|
required CreateStewardFreeBar body,
|
||||||
|
}) async {
|
||||||
|
var res = await _httpClient.post(
|
||||||
|
'/steward_free_bar/',
|
||||||
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
|
data: body.toJson(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> deleteStewardPurchasesOutSideOfTheProvince({
|
||||||
|
required String token,
|
||||||
|
required String stewardFreeBarKey,
|
||||||
|
}) async {
|
||||||
|
await _httpClient.delete(
|
||||||
|
'/steward_free_bar/0/?',
|
||||||
|
headers: {'Authorization': 'Bearer $token'},
|
||||||
|
queryParameters: {'key': stewardFreeBarKey},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ class OutOfProvinceLogic extends GetxController {
|
|||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
getStewardDashBord();
|
getStewardDashBord();
|
||||||
|
getRolesProducts();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> getAllocatedMade() async {
|
Future<void> getAllocatedMade() async {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart' show Colors;
|
import 'package:flutter/material.dart' show Colors;
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:rasadyar_auth/data/services/token_storage_service.dart';
|
import 'package:rasadyar_auth/data/services/token_storage_service.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/repositories/chicken_repository.dart';
|
import 'package:rasadyar_chicken/data/repositories/chicken_repository.dart';
|
||||||
import 'package:rasadyar_chicken/data/repositories/chicken_repository_imp.dart';
|
import 'package:rasadyar_chicken/data/repositories/chicken_repository_imp.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/home/view.dart';
|
import 'package:rasadyar_chicken/presentation/pages/home/view.dart';
|
||||||
@@ -28,8 +29,6 @@ class RootLogic extends GetxController {
|
|||||||
GlobalKey<NavigatorState>(),
|
GlobalKey<NavigatorState>(),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
late DioRemote dioRemote;
|
late DioRemote dioRemote;
|
||||||
var tokenService = Get.find<TokenStorageService>();
|
var tokenService = Get.find<TokenStorageService>();
|
||||||
late ChickenRepository chickenRepository;
|
late ChickenRepository chickenRepository;
|
||||||
@@ -37,6 +36,8 @@ class RootLogic extends GetxController {
|
|||||||
RxList<ErrorLocationType> errorLocationType = RxList();
|
RxList<ErrorLocationType> errorLocationType = RxList();
|
||||||
RxMap<int, dynamic> inventoryExpandedList = RxMap();
|
RxMap<int, dynamic> inventoryExpandedList = RxMap();
|
||||||
|
|
||||||
|
RxList<IranProvinceCityModel> provinces = <IranProvinceCityModel>[].obs;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
@@ -44,6 +45,8 @@ class RootLogic extends GetxController {
|
|||||||
dioRemote.init();
|
dioRemote.init();
|
||||||
chickenRepository = ChickenRepositoryImpl(dioRemote);
|
chickenRepository = ChickenRepositoryImpl(dioRemote);
|
||||||
|
|
||||||
|
getProvinces();
|
||||||
|
|
||||||
/*getInventory();
|
/*getInventory();
|
||||||
getKillHouseDistributionInfo();*/
|
getKillHouseDistributionInfo();*/
|
||||||
}
|
}
|
||||||
@@ -65,4 +68,16 @@ class RootLogic extends GetxController {
|
|||||||
void changePage(int index) {
|
void changePage(int index) {
|
||||||
currentPage.value = index;
|
currentPage.value = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> getProvinces() async {
|
||||||
|
try {
|
||||||
|
final res = await chickenRepository.getProvince();
|
||||||
|
if (res != null) {
|
||||||
|
provinces.clear();
|
||||||
|
provinces.value = res;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
provinces.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +1,191 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:rasadyar_auth/data/utils/safe_call.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/request/create_steward_free_bar/create_steward_free_bar.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
|
||||||
|
import 'package:rasadyar_chicken/presentation/pages/out_of_province/logic.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/root/logic.dart';
|
import 'package:rasadyar_chicken/presentation/pages/root/logic.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
class SalesOutOfProvinceLogic extends GetxController {
|
class SalesOutOfProvinceLogic extends GetxController {
|
||||||
RxBool isExpanded = false.obs;
|
RxBool isExpanded = false.obs;
|
||||||
|
RxBool isSubmitButtonEnabled = false.obs;
|
||||||
RxList<int> isExpandedList = <int>[].obs;
|
RxList<int> isExpandedList = <int>[].obs;
|
||||||
|
RxBool searchIsSelected = false.obs;
|
||||||
|
|
||||||
|
//TODO add this to Di
|
||||||
|
ImagePicker imagePicker = ImagePicker();
|
||||||
|
|
||||||
|
Rx<Resource<List<StewardFreeBar>>> purchaseOutOfProvinceList = Resource<List<StewardFreeBar>>.loading().obs;
|
||||||
|
Rxn<ProductModel> selectedProduct = Rxn();
|
||||||
|
|
||||||
|
RxList<IranProvinceCityModel> cites = <IranProvinceCityModel>[].obs;
|
||||||
|
Rxn<IranProvinceCityModel> selectedProvince = Rxn();
|
||||||
|
Rxn<IranProvinceCityModel> selectedCity = Rxn();
|
||||||
|
Rxn<XFile> selectedImage = Rxn<XFile>();
|
||||||
|
RxnString _base64Image = RxnString();
|
||||||
|
RxnString editImageUrl = RxnString();
|
||||||
|
|
||||||
RootLogic get rootLogic => Get.find<RootLogic>();
|
RootLogic get rootLogic => Get.find<RootLogic>();
|
||||||
|
|
||||||
|
OutOfProvinceLogic get outOfTheProvinceLogic => Get.find<OutOfProvinceLogic>();
|
||||||
|
|
||||||
|
TextEditingController sellerNameController = TextEditingController();
|
||||||
|
TextEditingController sellerPhoneController = TextEditingController();
|
||||||
|
TextEditingController carcassVolumeController = TextEditingController();
|
||||||
|
TextEditingController carcassWeightController = TextEditingController();
|
||||||
|
|
||||||
|
Rx<Jalali> fromDateFilter = Jalali.now().obs;
|
||||||
|
Rx<Jalali> toDateFilter = Jalali.now().obs;
|
||||||
|
RxnString searchedValue = RxnString();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onReady() {
|
void onReady() {
|
||||||
// TODO: implement onReady
|
|
||||||
super.onReady();
|
super.onReady();
|
||||||
|
getStewardPurchaseOutOfProvince();
|
||||||
|
selectedProvince.listen((p0) => getCites());
|
||||||
|
setupListeners();
|
||||||
|
debounce(searchedValue, (callback) => getStewardPurchaseOutOfProvince(), time: Duration(milliseconds: 2000));
|
||||||
|
ever(searchIsSelected, (data) {
|
||||||
|
if (data == false) {
|
||||||
|
searchedValue.value = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onClose() {
|
void onClose() {
|
||||||
// TODO: implement onClose
|
sellerNameController.dispose();
|
||||||
|
sellerPhoneController.dispose();
|
||||||
|
carcassVolumeController.dispose();
|
||||||
|
carcassWeightController.dispose();
|
||||||
super.onClose();
|
super.onClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> getStewardPurchaseOutOfProvince() async {
|
||||||
|
await safeCall(
|
||||||
|
call: () => rootLogic.chickenRepository.getStewardPurchasesOutSideOfTheProvince(
|
||||||
|
token: rootLogic.tokenService.accessToken.value!,
|
||||||
|
queryParameters: buildQueryParams(
|
||||||
|
pageSize: 10,
|
||||||
|
page: 1,
|
||||||
|
search: 'filter',
|
||||||
|
role: 'Steward',
|
||||||
|
value: searchedValue.value,
|
||||||
|
fromDate: fromDateFilter.value.toDateTime(),
|
||||||
|
toDate: toDateFilter.value.toDateTime(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onSuccess: (res) {
|
||||||
|
if ((res?.count ?? 0) == 0) {
|
||||||
|
purchaseOutOfProvinceList.value = Resource<List<StewardFreeBar>>.empty();
|
||||||
|
} else {
|
||||||
|
purchaseOutOfProvinceList.value = Resource<List<StewardFreeBar>>.success(res!.results!);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> getCites() async {
|
||||||
|
await safeCall(
|
||||||
|
call: () => rootLogic.chickenRepository.getCity(provinceName: selectedProvince.value?.name ?? ''),
|
||||||
|
onSuccess: (result) {
|
||||||
|
if (result != null && result.isNotEmpty) {
|
||||||
|
cites.value = result;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setupListeners() {
|
||||||
|
sellerNameController.addListener(checkFormValid);
|
||||||
|
sellerPhoneController.addListener(checkFormValid);
|
||||||
|
carcassVolumeController.addListener(checkFormValid);
|
||||||
|
carcassWeightController.addListener(checkFormValid);
|
||||||
|
|
||||||
|
ever(selectedProvince, (_) => checkFormValid());
|
||||||
|
ever(selectedCity, (_) => checkFormValid());
|
||||||
|
ever(selectedProduct, (_) => checkFormValid());
|
||||||
|
ever(selectedImage, (data) async {
|
||||||
|
checkFormValid();
|
||||||
|
if (data?.path != null) {
|
||||||
|
_base64Image.value = await convertImageToBase64(data!.path);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void checkFormValid() {
|
||||||
|
isSubmitButtonEnabled.value =
|
||||||
|
sellerNameController.text.isNotEmpty &&
|
||||||
|
sellerPhoneController.text.isNotEmpty &&
|
||||||
|
carcassVolumeController.text.isNotEmpty &&
|
||||||
|
carcassWeightController.text.isNotEmpty &&
|
||||||
|
selectedProvince.value != null &&
|
||||||
|
selectedCity.value != null &&
|
||||||
|
selectedProduct.value != null &&
|
||||||
|
selectedImage.value != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> createStewardPurchaseOutOfProvince() async => await safeCall(
|
||||||
|
call: () async {
|
||||||
|
CreateStewardFreeBar createStewardFreeBar = CreateStewardFreeBar(
|
||||||
|
productKey: selectedProduct.value!.key,
|
||||||
|
killHouseName: sellerNameController.text,
|
||||||
|
killHouseMobile: sellerPhoneController.text,
|
||||||
|
province: selectedProvince.value!.name,
|
||||||
|
city: selectedCity.value!.name,
|
||||||
|
weightOfCarcasses: int.parse(carcassWeightController.text),
|
||||||
|
barImage: _base64Image.value,
|
||||||
|
date: DateTime.now().formattedYHMS,
|
||||||
|
);
|
||||||
|
final res = await rootLogic.chickenRepository.createStewardPurchasesOutSideOfTheProvince(
|
||||||
|
token: rootLogic.tokenService.accessToken.value!,
|
||||||
|
body: createStewardFreeBar,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
onSuccess: (result) {
|
||||||
|
getStewardPurchaseOutOfProvince();
|
||||||
|
resetSubmitForm();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
void resetSubmitForm() {
|
||||||
|
sellerNameController.clear();
|
||||||
|
sellerPhoneController.clear();
|
||||||
|
carcassVolumeController.clear();
|
||||||
|
carcassWeightController.clear();
|
||||||
|
selectedProvince.value = null;
|
||||||
|
selectedCity.value = null;
|
||||||
|
selectedProduct.value = null;
|
||||||
|
selectedImage.value = null;
|
||||||
|
_base64Image.value = null;
|
||||||
|
editImageUrl.value = null;
|
||||||
|
|
||||||
|
isSubmitButtonEnabled.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setEditData(StewardFreeBar item) {
|
||||||
|
iLog(item.barImage);
|
||||||
|
editImageUrl.value = item.barImage;
|
||||||
|
sellerNameController.text = item.killHouseName ?? '';
|
||||||
|
sellerPhoneController.text = item.killHouseMobile ?? '';
|
||||||
|
carcassVolumeController.text = item.weightOfCarcasses?.toString() ?? '';
|
||||||
|
carcassWeightController.text = item.weightOfCarcasses?.toString() ?? '';
|
||||||
|
selectedProvince.value = IranProvinceCityModel(name: item.province);
|
||||||
|
selectedCity.value = IranProvinceCityModel(name: item.city);
|
||||||
|
selectedProduct.value = outOfTheProvinceLogic.rolesProductsModel.firstWhere(
|
||||||
|
(element) => element.key == item.product!.key,
|
||||||
|
);
|
||||||
|
isSubmitButtonEnabled.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> deleteStewardPurchaseOutOfProvince(String key) async {
|
||||||
|
await safeCall(
|
||||||
|
call: () => rootLogic.chickenRepository.deleteStewardPurchasesOutSideOfTheProvince(
|
||||||
|
token: rootLogic.tokenService.accessToken.value!,
|
||||||
|
stewardFreeBarKey: key,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
@@ -25,28 +30,34 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
Assets.vec.chickenSvg.svg(
|
Assets.vec.chickenSvg.svg(
|
||||||
width: 24,
|
width: 24,
|
||||||
height: 24,
|
height: 24,
|
||||||
colorFilter: const ColorFilter.mode(
|
colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||||
Colors.white,
|
|
||||||
BlendMode.srcIn,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'رصدطیور',
|
|
||||||
style: AppFonts.yekan16Bold.copyWith(color: Colors.white),
|
|
||||||
),
|
),
|
||||||
|
Text('رصدطیور', style: AppFonts.yekan16Bold.copyWith(color: Colors.white)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
additionalActions: [
|
additionalActions: [
|
||||||
Assets.vec.searchSvg.svg(
|
GestureDetector(
|
||||||
width: 24,
|
onTap: (){
|
||||||
height: 24,
|
|
||||||
colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
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),
|
SizedBox(width: 8),
|
||||||
Assets.vec.filterOutlineSvg.svg(
|
GestureDetector(
|
||||||
width: 20,
|
onTap: () {
|
||||||
height: 20,
|
Get.bottomSheet(filterBottomSheet());
|
||||||
colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
},
|
||||||
|
child: Assets.vec.filterOutlineSvg.svg(
|
||||||
|
width: 20,
|
||||||
|
height: 20,
|
||||||
|
colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
],
|
],
|
||||||
@@ -55,43 +66,62 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
routePageWidget(),
|
routePageWidget(),
|
||||||
|
_buildSearchWidget(),
|
||||||
Expanded(child: saleListWidget()),
|
Expanded(child: saleListWidget()),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
floatingActionButton: RFab.add(onPressed: () {}),
|
floatingActionButton: RFab.add(
|
||||||
|
onPressed: () {
|
||||||
|
Get.bottomSheet(addPurchasedInformationBottomSheet(), isScrollControlled: true);
|
||||||
|
},
|
||||||
|
),
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.startFloat,
|
floatingActionButtonLocation: FloatingActionButtonLocation.startFloat,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView saleListWidget() {
|
Widget saleListWidget() {
|
||||||
return ListView.separated(
|
return ObxValue((data) {
|
||||||
shrinkWrap: true,
|
switch (data.value.status) {
|
||||||
physics: BouncingScrollPhysics(),
|
case Status.initial:
|
||||||
padding: EdgeInsets.fromLTRB(8, 8, 18, 80),
|
case Status.loading:
|
||||||
itemBuilder: (context, index) {
|
return Center(child: CupertinoActivityIndicator());
|
||||||
return ObxValue(
|
case Status.success:
|
||||||
(data) => saleListItem(data, index),
|
return ListView.separated(
|
||||||
controller.isExpandedList,
|
shrinkWrap: true,
|
||||||
);
|
physics: BouncingScrollPhysics(),
|
||||||
},
|
padding: EdgeInsets.fromLTRB(8, 8, 18, 80),
|
||||||
separatorBuilder: (context, index) => SizedBox(height: 8),
|
itemBuilder: (context, index) {
|
||||||
itemCount: 5,
|
return ObxValue(
|
||||||
);
|
(expandList) => saleListItem(expandList: expandList, index: index, item: data.value.data![index]),
|
||||||
|
controller.isExpandedList,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
separatorBuilder: (context, index) => SizedBox(height: 8),
|
||||||
|
itemCount: data.value.data?.length ?? 0,
|
||||||
|
);
|
||||||
|
case Status.error:
|
||||||
|
return Center(
|
||||||
|
child: Text(
|
||||||
|
data.value.message ?? 'خطا در دریافت اطلاعات',
|
||||||
|
style: AppFonts.yekan16.copyWith(color: AppColor.error),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
case Status.empty:
|
||||||
|
return emptyWidget();
|
||||||
|
}
|
||||||
|
}, controller.purchaseOutOfProvinceList);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget emptyWidget() {
|
Widget emptyWidget() {
|
||||||
return Center(
|
return Center(
|
||||||
child: Text(
|
child: Text('داده ای دریافت نشد!', style: AppFonts.yekan16.copyWith(color: AppColor.darkGreyDarkHover)),
|
||||||
'داده ای دریافت نشد!',
|
|
||||||
style: AppFonts.yekan16.copyWith(color: AppColor.darkGreyDarkHover),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
GestureDetector saleListItem(RxList<int> data, int index) {
|
GestureDetector saleListItem({required RxList<int> expandList, required int index, required StewardFreeBar item}) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (data.contains(index)) {
|
if (expandList.contains(index)) {
|
||||||
controller.isExpandedList.remove(index);
|
controller.isExpandedList.remove(index);
|
||||||
} else {
|
} else {
|
||||||
controller.isExpandedList.add(index);
|
controller.isExpandedList.add(index);
|
||||||
@@ -100,7 +130,7 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
child: AnimatedContainer(
|
child: AnimatedContainer(
|
||||||
duration: Duration(milliseconds: 400),
|
duration: Duration(milliseconds: 400),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
height: data.contains(index) ? 210 : 56,
|
height: expandList.contains(index) ? 170 : 56,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerRight,
|
||||||
@@ -108,7 +138,7 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
AnimatedContainer(
|
AnimatedContainer(
|
||||||
width: Get.width - 30,
|
width: Get.width - 30,
|
||||||
duration: Duration(milliseconds: 300),
|
duration: Duration(milliseconds: 300),
|
||||||
height: data.contains(index) ? 210 : 56,
|
height: expandList.contains(index) ? 170 : 56,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
@@ -121,27 +151,23 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'1403/5/5',
|
item.date?.formattedJalaliDate ?? 'N/A',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
|
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'افلاک',
|
item.killHouseName ?? 'N/A',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan14.copyWith(
|
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||||
color: AppColor.blueNormal,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'kg 200 مرغ گرم ',
|
'kg ${item.weightOfCarcasses} ${item.product?.name}',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan14.copyWith(
|
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||||
color: AppColor.blueNormal,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
'لرستان-خرم آباد',
|
'${item.province}-${item.city}',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
|
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
|
||||||
),
|
),
|
||||||
@@ -152,39 +178,46 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
secondChild: Container(
|
secondChild: Container(
|
||||||
padding: EdgeInsets.fromLTRB(8, 12, 14, 12),
|
padding: EdgeInsets.fromLTRB(8, 12, 14, 12),
|
||||||
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 8,
|
spacing: 8,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Assets.vec.editSvg.svg(
|
GestureDetector(
|
||||||
width: 20,
|
onTap: () {
|
||||||
height: 20,
|
controller.setEditData(item);
|
||||||
colorFilter: ColorFilter.mode(
|
Get.bottomSheet(
|
||||||
AppColor.blueNormal,
|
addPurchasedInformationBottomSheet(true),
|
||||||
BlendMode.srcIn,
|
isScrollControlled: true,
|
||||||
|
).whenComplete(() {
|
||||||
|
controller.resetSubmitForm();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Assets.vec.editSvg.svg(
|
||||||
|
width: 20,
|
||||||
|
height: 20,
|
||||||
|
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
'لرستان - خرم آباد',
|
'${item.province}-${item.city}',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan16.copyWith(
|
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
||||||
color: AppColor.greenDark,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
|
||||||
Assets.vec.trashSvg.svg(
|
GestureDetector(
|
||||||
width: 20,
|
onTap: () {
|
||||||
height: 20,
|
buildDeleteDialog(
|
||||||
colorFilter: ColorFilter.mode(
|
onConfirm: () => controller.deleteStewardPurchaseOutOfProvince(item.key!),
|
||||||
AppColor.error,
|
);
|
||||||
BlendMode.srcIn,
|
},
|
||||||
|
child: Assets.vec.trashSvg.svg(
|
||||||
|
width: 20,
|
||||||
|
height: 20,
|
||||||
|
colorFilter: ColorFilter.mode(AppColor.error, BlendMode.srcIn),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -195,19 +228,15 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
decoration: ShapeDecoration(
|
decoration: ShapeDecoration(
|
||||||
color: AppColor.blueLight,
|
color: AppColor.blueLight,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
side: BorderSide(
|
side: BorderSide(width: 1, color: AppColor.blueLightHover),
|
||||||
width: 1,
|
|
||||||
color: AppColor.blueLightHover,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: buildRow('تاریخ', '07:15:00 - 1402/07/01'),
|
child: buildRow('تاریخ', item.date?.formattedJalaliDateYHMS ?? 'N/A'),
|
||||||
),
|
),
|
||||||
|
|
||||||
buildRow('مشخصات فروشنده', 'افلاک - 09203659874'),
|
buildRow('مشخصات فروشنده', '${item.killHouseName} - ${item.killHouseMobile ?? 'N/A'}'),
|
||||||
buildRow('وزن خریداری شده', '200 کیلوگرم'),
|
buildRow('وزن خریداری شده', '${item.weightOfCarcasses?.toInt()} کیلوگرم'),
|
||||||
buildRow('لاشه خریداری شده', '200 عدد'),
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [Icon(CupertinoIcons.chevron_up, size: 12)],
|
children: [Icon(CupertinoIcons.chevron_up, size: 12)],
|
||||||
@@ -215,9 +244,7 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
crossFadeState: data.contains(index)
|
crossFadeState: expandList.contains(index) ? CrossFadeState.showSecond : CrossFadeState.showFirst,
|
||||||
? CrossFadeState.showSecond
|
|
||||||
: CrossFadeState.showFirst,
|
|
||||||
duration: Duration(milliseconds: 300),
|
duration: Duration(milliseconds: 300),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -230,16 +257,10 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColor.greenLightHover,
|
color: AppColor.greenLightHover,
|
||||||
borderRadius: BorderRadius.circular(4),
|
borderRadius: BorderRadius.circular(4),
|
||||||
border: Border.all(
|
border: Border.all(width: 0.50, color: AppColor.greenDarkActive),
|
||||||
width: 0.50,
|
|
||||||
color: AppColor.greenDarkActive,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text(
|
child: Text((index + 1).toString(), style: AppFonts.yekan12.copyWith(color: Colors.black)),
|
||||||
(index + 1).toString(),
|
|
||||||
style: AppFonts.yekan12.copyWith(color: Colors.black),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -262,10 +283,7 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
Assets.vec.cubeSearchSvg.svg(
|
Assets.vec.cubeSearchSvg.svg(
|
||||||
width: 24,
|
width: 24,
|
||||||
height: 24,
|
height: 24,
|
||||||
colorFilter: const ColorFilter.mode(
|
colorFilter: const ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
||||||
AppColor.blueNormal,
|
|
||||||
BlendMode.srcIn,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
SizedBox(width: 6),
|
SizedBox(width: 6),
|
||||||
],
|
],
|
||||||
@@ -293,9 +311,7 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
title,
|
title,
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
style: AppFonts.yekan14.copyWith(
|
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
||||||
color: AppColor.darkGreyDarkHover,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Flexible(
|
Flexible(
|
||||||
@@ -303,8 +319,354 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
value,
|
value,
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
style: AppFonts.yekan14.copyWith(
|
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
||||||
color: AppColor.darkGreyDarkHover,
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget addPurchasedInformationBottomSheet([bool isOnEdit = false]) {
|
||||||
|
return BaseBottomSheet(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
spacing: 16,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
isOnEdit ? 'ویرایش اطلاعات خرید' : 'ثبت اطلاعات خرید',
|
||||||
|
style: AppFonts.yekan16Bold.copyWith(color: AppColor.darkGreyDarkHover),
|
||||||
|
),
|
||||||
|
_productTypeWidget(),
|
||||||
|
RTextField(
|
||||||
|
controller: controller.sellerNameController,
|
||||||
|
label: 'نام فروشنده',
|
||||||
|
borderColor: AppColor.darkGreyLight,
|
||||||
|
),
|
||||||
|
RTextField(
|
||||||
|
controller: controller.sellerPhoneController,
|
||||||
|
label: 'تلفن فروشنده',
|
||||||
|
keyboardType: TextInputType.phone,
|
||||||
|
borderColor: AppColor.darkGreyLight,
|
||||||
|
),
|
||||||
|
_provinceWidget(),
|
||||||
|
_cityWidget(),
|
||||||
|
RTextField(
|
||||||
|
controller: controller.carcassWeightController,
|
||||||
|
label: 'وزن لاشه',
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
|
borderColor: AppColor.darkGreyLight,
|
||||||
|
),
|
||||||
|
RTextField(
|
||||||
|
controller: controller.carcassVolumeController,
|
||||||
|
label: 'حجم لاشه',
|
||||||
|
onChanged: (p0) {
|
||||||
|
iLog(controller.carcassVolumeController.text);
|
||||||
|
},
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
|
borderColor: AppColor.darkGreyLight,
|
||||||
|
),
|
||||||
|
_imageCarcasesWidget(isOnEdit),
|
||||||
|
submitButtonWidget(isOnEdit),
|
||||||
|
SizedBox(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget submitButtonWidget(bool isOnEdit) {
|
||||||
|
return ObxValue((data) {
|
||||||
|
return RElevated(
|
||||||
|
text: isOnEdit ? 'ویرایش خرید' : 'ثبت خرید جدید',
|
||||||
|
onPressed: data.value
|
||||||
|
? () async {
|
||||||
|
await controller.createStewardPurchaseOutOfProvince();
|
||||||
|
Get.back();
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
height: 40,
|
||||||
|
);
|
||||||
|
}, controller.isSubmitButtonEnabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _productTypeWidget() {
|
||||||
|
return Obx(() {
|
||||||
|
return OverlayDropdownWidget<ProductModel>(
|
||||||
|
items: controller.outOfTheProvinceLogic.rolesProductsModel,
|
||||||
|
onChanged: (value) {
|
||||||
|
controller.selectedProduct.value = value;
|
||||||
|
print('Selected Product: ${value.name}');
|
||||||
|
},
|
||||||
|
selectedItem: controller.selectedProduct.value,
|
||||||
|
itemBuilder: (item) => Text(item.name ?? 'بدون نام'),
|
||||||
|
labelBuilder: (item) => Text(item?.name ?? 'انتخاب محصول'),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _provinceWidget() {
|
||||||
|
return Obx(() {
|
||||||
|
return OverlayDropdownWidget<IranProvinceCityModel>(
|
||||||
|
items: controller.rootLogic.provinces,
|
||||||
|
onChanged: (value) {
|
||||||
|
controller.selectedProvince.value = value;
|
||||||
|
print('Selected Product: ${value.name}');
|
||||||
|
},
|
||||||
|
selectedItem: controller.selectedProvince.value,
|
||||||
|
itemBuilder: (item) => Text(item.name ?? 'بدون نام'),
|
||||||
|
labelBuilder: (item) => Text(item?.name ?? 'انتخاب استان'),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _cityWidget() {
|
||||||
|
return ObxValue((data) {
|
||||||
|
return OverlayDropdownWidget<IranProvinceCityModel>(
|
||||||
|
items: data,
|
||||||
|
onChanged: (value) {
|
||||||
|
controller.selectedCity.value = value;
|
||||||
|
print('Selected Product: ${value.name}');
|
||||||
|
},
|
||||||
|
selectedItem: controller.selectedCity.value,
|
||||||
|
itemBuilder: (item) => Text(item.name ?? 'بدون نام'),
|
||||||
|
labelBuilder: (item) => Text(item?.name ?? 'انتخاب شهر'),
|
||||||
|
);
|
||||||
|
}, controller.cites);
|
||||||
|
}
|
||||||
|
|
||||||
|
SizedBox _imageCarcasesWidget(bool isOnEdit) {
|
||||||
|
return SizedBox(
|
||||||
|
width: Get.width,
|
||||||
|
height: 250,
|
||||||
|
child: Card(
|
||||||
|
color: Colors.white,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: ObxValue((data) {
|
||||||
|
return Container(
|
||||||
|
width: Get.width,
|
||||||
|
decoration: BoxDecoration(color: AppColor.lightGreyNormal, borderRadius: BorderRadius.circular(8)),
|
||||||
|
child: Center(
|
||||||
|
child: isOnEdit
|
||||||
|
? Image.network(controller.editImageUrl.value ?? '')
|
||||||
|
: data.value == null
|
||||||
|
? Assets.images.placeHolder.image(height: 150, width: 200)
|
||||||
|
: Image.file(File(data.value!.path), fit: BoxFit.cover),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}, controller.selectedImage),
|
||||||
|
),
|
||||||
|
SizedBox(height: 15),
|
||||||
|
Container(
|
||||||
|
width: Get.width,
|
||||||
|
height: 40,
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text('تصویر بار', style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal)),
|
||||||
|
Spacer(),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
controller.selectedImage.value = await controller.imagePicker.pickImage(
|
||||||
|
source: ImageSource.camera,
|
||||||
|
imageQuality: 60,
|
||||||
|
maxWidth: 1080,
|
||||||
|
maxHeight: 720,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
color: AppColor.blueNormal,
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||||
|
),
|
||||||
|
padding: EdgeInsetsGeometry.symmetric(horizontal: 6, vertical: 4),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text('دوربین', style: AppFonts.yekan14.copyWith(color: Colors.white)),
|
||||||
|
SizedBox(width: 8),
|
||||||
|
Icon(CupertinoIcons.camera, color: Colors.white),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 16),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
controller.selectedImage.value = await controller.imagePicker.pickImage(
|
||||||
|
source: ImageSource.gallery,
|
||||||
|
imageQuality: 60,
|
||||||
|
maxWidth: 1080,
|
||||||
|
maxHeight: 720,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
color: AppColor.blueNormal,
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||||
|
),
|
||||||
|
padding: EdgeInsetsGeometry.symmetric(horizontal: 6, vertical: 4),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text('گالری', style: AppFonts.yekan14.copyWith(color: Colors.white)),
|
||||||
|
SizedBox(width: 8),
|
||||||
|
Icon(CupertinoIcons.photo, color: Colors.white),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> buildDeleteDialog({required Future<void> Function() onConfirm}) async {
|
||||||
|
await Get.defaultDialog(
|
||||||
|
title: 'حذف خرید',
|
||||||
|
middleText: 'آیا از حذف این خرید مطمئن هستید؟',
|
||||||
|
confirm: ElevatedButton(
|
||||||
|
style: ElevatedButton.styleFrom(backgroundColor: AppColor.error, foregroundColor: Colors.white),
|
||||||
|
onPressed: () async {
|
||||||
|
await onConfirm();
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
child: Text('بله'),
|
||||||
|
),
|
||||||
|
cancel: ElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
child: Text('خیر'),
|
||||||
|
),
|
||||||
|
).whenComplete(() => controller.getStewardPurchaseOutOfProvince());
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget filterBottomSheet() {
|
||||||
|
return BaseBottomSheet(
|
||||||
|
height: 250,
|
||||||
|
child: Column(
|
||||||
|
spacing: 16,
|
||||||
|
children: [
|
||||||
|
Text('فیلترها', style: AppFonts.yekan16Bold.copyWith(color: AppColor.darkGreyDarkHover)),
|
||||||
|
Row(
|
||||||
|
spacing: 8,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: timeFilterWidget(
|
||||||
|
date: controller.fromDateFilter,
|
||||||
|
onChanged: (jalali) => controller.fromDateFilter.value = jalali,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: timeFilterWidget(
|
||||||
|
isFrom: false,
|
||||||
|
date: controller.toDateFilter,
|
||||||
|
onChanged: (jalali) => controller.toDateFilter.value = jalali,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 2),
|
||||||
|
RElevated(
|
||||||
|
text: 'اعمال فیلتر',
|
||||||
|
onPressed: () {
|
||||||
|
controller.getStewardPurchaseOutOfProvince();
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
height: 40,
|
||||||
|
),
|
||||||
|
SizedBox(height: 16),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
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(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: <Widget>[
|
||||||
|
|
||||||
|
CupertinoButton(
|
||||||
|
child: Text('تایید', style: AppFonts.yekan14),
|
||||||
|
onPressed: () {
|
||||||
|
onDateSelected(tempPickedDate ?? Jalali.now());
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
CupertinoButton(
|
||||||
|
child: Text('لغو', style: AppFonts.yekan14.copyWith(color: AppColor.error)),
|
||||||
|
onPressed: () => Get.back(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Divider(height: 0, thickness: 1),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
child: PersianCupertinoDatePicker(
|
||||||
|
initialDateTime: Jalali.now(),
|
||||||
|
mode: PersianCupertinoDatePickerMode.date,
|
||||||
|
onDateTimeChanged: (dateTime) {
|
||||||
|
tempPickedDate = dateTime;
|
||||||
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -312,4 +674,36 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ObxValue<RxBool> _buildSearchWidget() {
|
||||||
|
return ObxValue((data) {
|
||||||
|
return AnimatedContainer(
|
||||||
|
duration: Duration(milliseconds: 300),
|
||||||
|
padding: EdgeInsets.only(top: 5),
|
||||||
|
curve: Curves.easeInOut,
|
||||||
|
height: data.value ? 50 : 0,
|
||||||
|
child: Visibility(
|
||||||
|
visible: data.value,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
|
child: RTextField(
|
||||||
|
suffixIcon: Padding(
|
||||||
|
padding: const EdgeInsets.all(12.0),
|
||||||
|
child: Assets.vec.searchSvg.svg(
|
||||||
|
width: 10,
|
||||||
|
height: 10,
|
||||||
|
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
hintText: 'جستجو',
|
||||||
|
onChanged: (value) {
|
||||||
|
controller.searchedValue.value = value;
|
||||||
|
},
|
||||||
|
controller: TextEditingController(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}, controller.searchIsSelected);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,9 +39,13 @@ export 'infrastructure/remote/dio_form_data.dart';
|
|||||||
export 'infrastructure/remote/dio_remote.dart';
|
export 'infrastructure/remote/dio_remote.dart';
|
||||||
export 'infrastructure/remote/dio_response.dart';
|
export 'infrastructure/remote/dio_response.dart';
|
||||||
export 'injection/di.dart';
|
export 'injection/di.dart';
|
||||||
|
|
||||||
|
///image picker
|
||||||
|
export 'package:image_picker/image_picker.dart';
|
||||||
|
|
||||||
//utils
|
//utils
|
||||||
export 'utils/logger_utils.dart';
|
export 'utils/logger_utils.dart';
|
||||||
export 'utils/safe_call_utils.dart';
|
export 'utils/network/network.dart';
|
||||||
export 'utils/date_time_utils.dart';
|
export 'utils/date_time_utils.dart';
|
||||||
export 'utils/num_utils.dart';
|
export 'utils/num_utils.dart';
|
||||||
export 'utils/map_utils.dart';
|
export 'utils/map_utils.dart';
|
||||||
|
|||||||
8
packages/core/lib/presentation/utils/image_utils.dart
Normal file
8
packages/core/lib/presentation/utils/image_utils.dart
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
Future<String> convertImageToBase64(String imagePath) async {
|
||||||
|
final bytes = await File(imagePath).readAsBytes();
|
||||||
|
String base64String = base64Encode(bytes);
|
||||||
|
return base64String;
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
export 'color_utils.dart';
|
export 'color_utils.dart';
|
||||||
|
export 'data_time_utils.dart';
|
||||||
|
export 'image_utils.dart';
|
||||||
export 'list_extensions.dart';
|
export 'list_extensions.dart';
|
||||||
export 'data_time_utils.dart';
|
|
||||||
@@ -20,7 +20,6 @@ class DraggableBottomSheet2 extends GetView<DraggableBottomSheetController> {
|
|||||||
return ObxValue((data) {
|
return ObxValue((data) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
// پسزمینه تیره
|
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class RTextField extends StatefulWidget {
|
|||||||
final RTextFieldVariant variant;
|
final RTextFieldVariant variant;
|
||||||
final bool filled;
|
final bool filled;
|
||||||
final Color? filledColor;
|
final Color? filledColor;
|
||||||
|
final Color? borderColor;
|
||||||
final bool showCounter;
|
final bool showCounter;
|
||||||
final bool isDense;
|
final bool isDense;
|
||||||
final TextInputType? keyboardType;
|
final TextInputType? keyboardType;
|
||||||
@@ -67,6 +68,7 @@ class RTextField extends StatefulWidget {
|
|||||||
this.validator,
|
this.validator,
|
||||||
this.onChanged,
|
this.onChanged,
|
||||||
this.onSubmitted,
|
this.onSubmitted,
|
||||||
|
this.borderColor,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -82,7 +84,7 @@ class RTextField extends StatefulWidget {
|
|||||||
_noBorder || _passwordNoBorder ? InputBorder.none : OutlineInputBorder(
|
_noBorder || _passwordNoBorder ? InputBorder.none : OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: AppColor.lightGreyDarkActive,
|
color: borderColor ?? AppColor.lightGreyDarkActive,
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ class _OverlayDropdownState<T> extends State<OverlayDropdownWidget<T>> {
|
|||||||
_isOpen.value
|
_isOpen.value
|
||||||
? CupertinoIcons.chevron_up
|
? CupertinoIcons.chevron_up
|
||||||
: CupertinoIcons.chevron_down,
|
: CupertinoIcons.chevron_down,
|
||||||
|
size: 14,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,10 +1,38 @@
|
|||||||
|
import 'package:intl/intl.dart';
|
||||||
import 'package:persian_datetime_picker/persian_datetime_picker.dart';
|
import 'package:persian_datetime_picker/persian_datetime_picker.dart';
|
||||||
|
|
||||||
extension xDateTime on String{
|
extension XDateTime on String{
|
||||||
get toDateTime => DateTime.parse(this);
|
get toDateTime => DateTime.parse(this);
|
||||||
|
|
||||||
get formattedJalaliDate{
|
get formattedJalaliDate{
|
||||||
final dateTime = DateTime.parse(this);
|
final dateTime = DateTime.parse(this);
|
||||||
final jalaliDate = Jalali.fromDateTime(dateTime);
|
final jalaliDate = Jalali.fromDateTime(dateTime);
|
||||||
return "${jalaliDate.year}/${jalaliDate.month.toString().padLeft(2, '0')}/${jalaliDate.day.toString().padLeft(2, '0')}";
|
return "${jalaliDate.year}/${jalaliDate.month.toString().padLeft(2, '0')}/${jalaliDate.day.toString().padLeft(2, '0')}";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
get formattedJalaliDateYHMS {
|
||||||
|
final dateTime = DateTime.parse(this);
|
||||||
|
final jalaliDate = Jalali.fromDateTime(dateTime);
|
||||||
|
return "${jalaliDate.year}/${jalaliDate.month.toString().padLeft(2, '0')}/${jalaliDate.day.toString().padLeft(2, '0')} - ${jalaliDate.hour.toString().padLeft(2, '0')}:${jalaliDate.minute.toString().padLeft(2, '0')}";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
get formattedYHMS{
|
||||||
|
return DateFormat('yyyy-MM-dd HH:mm:ss').format(toDateTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
extension XDateTime2 on DateTime{
|
||||||
|
|
||||||
|
|
||||||
|
get formattedJalaliDate{
|
||||||
|
final jalaliDate = Jalali.fromDateTime(this);
|
||||||
|
return "${jalaliDate.year}/${jalaliDate.month.toString().padLeft(2, '0')}/${jalaliDate.day.toString().padLeft(2, '0')}";
|
||||||
|
}
|
||||||
|
|
||||||
|
get formattedYHMS{
|
||||||
|
return DateFormat('yyyy-MM-dd HH:mm:ss').format(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ Map<String, dynamic> buildQueryParams({
|
|||||||
int? pageSize,
|
int? pageSize,
|
||||||
DateTime? fromDate,
|
DateTime? fromDate,
|
||||||
DateTime? toDate,
|
DateTime? toDate,
|
||||||
|
String? role,
|
||||||
|
|
||||||
}) {
|
}) {
|
||||||
final params = <String, dynamic>{};
|
final params = <String, dynamic>{};
|
||||||
@@ -40,5 +41,9 @@ Map<String, dynamic> buildQueryParams({
|
|||||||
params['page_size'] = pageSize;
|
params['page_size'] = pageSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(role != null && role.isNotEmpty) {
|
||||||
|
params['role'] = role;
|
||||||
|
}
|
||||||
|
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|||||||
2
packages/core/lib/utils/network/network.dart
Normal file
2
packages/core/lib/utils/network/network.dart
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
export 'resource.dart';
|
||||||
|
export 'safe_call_utils.dart';
|
||||||
46
packages/core/lib/utils/network/resource.dart
Normal file
46
packages/core/lib/utils/network/resource.dart
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
enum Status {
|
||||||
|
initial,
|
||||||
|
loading,
|
||||||
|
success,
|
||||||
|
error,
|
||||||
|
empty,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class Resource<T> {
|
||||||
|
final Status status;
|
||||||
|
final T? data;
|
||||||
|
final String? message;
|
||||||
|
|
||||||
|
const Resource._({
|
||||||
|
required this.status,
|
||||||
|
this.data,
|
||||||
|
this.message,
|
||||||
|
});
|
||||||
|
|
||||||
|
const Resource.initial() : this._(status: Status.initial);
|
||||||
|
|
||||||
|
const Resource.loading() : this._(status: Status.loading);
|
||||||
|
|
||||||
|
const Resource.success(T data) : this._(status: Status.success, data: data);
|
||||||
|
|
||||||
|
const Resource.error(String message) : this._(status: Status.error, message: message);
|
||||||
|
|
||||||
|
const Resource.empty() : this._(status: Status.empty);
|
||||||
|
|
||||||
|
|
||||||
|
bool get isInitial => status == Status.initial;
|
||||||
|
|
||||||
|
bool get isLoading => status == Status.loading;
|
||||||
|
|
||||||
|
bool get isSuccess => status == Status.success;
|
||||||
|
|
||||||
|
bool get isError => status == Status.error;
|
||||||
|
|
||||||
|
bool get isEmpty => status == Status.empty;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'Resource{status: $status, data: $data, message: $message}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
import '../core.dart';
|
import '../../core.dart';
|
||||||
|
|
||||||
typedef AppAsyncCallback<T> = Future<T> Function();
|
typedef AppAsyncCallback<T> = Future<T> Function();
|
||||||
typedef ErrorCallback = void Function(dynamic error, StackTrace? stackTrace);
|
typedef ErrorCallback = void Function(dynamic error, StackTrace? stackTrace);
|
||||||
@@ -177,6 +177,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.2"
|
version: "3.1.2"
|
||||||
|
cross_file:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: cross_file
|
||||||
|
sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.3.4+2"
|
||||||
crypto:
|
crypto:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -281,6 +289,38 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.0.1"
|
version: "7.0.1"
|
||||||
|
file_selector_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_linux
|
||||||
|
sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.9.3+2"
|
||||||
|
file_selector_macos:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_macos
|
||||||
|
sha256: "8c9250b2bd2d8d4268e39c82543bacbaca0fda7d29e0728c3c4bbb7c820fd711"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.9.4+3"
|
||||||
|
file_selector_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_platform_interface
|
||||||
|
sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.6.2"
|
||||||
|
file_selector_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_windows
|
||||||
|
sha256: "320fcfb6f33caa90f0b58380489fc5ac05d99ee94b61aa96ec2bff0ba81d3c2b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.9.3+4"
|
||||||
fixnum:
|
fixnum:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -339,6 +379,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.9.0"
|
version: "0.9.0"
|
||||||
|
flutter_plugin_android_lifecycle:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: flutter_plugin_android_lifecycle
|
||||||
|
sha256: f948e346c12f8d5480d2825e03de228d0eb8c3a737e4cdaa122267b89c022b5e
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.28"
|
||||||
flutter_rating_bar:
|
flutter_rating_bar:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -597,6 +645,70 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.1.2"
|
version: "4.1.2"
|
||||||
|
image_picker:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: image_picker
|
||||||
|
sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.2"
|
||||||
|
image_picker_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_android
|
||||||
|
sha256: "317a5d961cec5b34e777b9252393f2afbd23084aa6e60fcf601dcf6341b9ebeb"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.8.12+23"
|
||||||
|
image_picker_for_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_for_web
|
||||||
|
sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.6"
|
||||||
|
image_picker_ios:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_ios
|
||||||
|
sha256: "05da758e67bc7839e886b3959848aa6b44ff123ab4b28f67891008afe8ef9100"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.8.12+2"
|
||||||
|
image_picker_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_linux
|
||||||
|
sha256: "34a65f6740df08bbbeb0a1abd8e6d32107941fd4868f67a507b25601651022c9"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.1+2"
|
||||||
|
image_picker_macos:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_macos
|
||||||
|
sha256: "1b90ebbd9dcf98fb6c1d01427e49a55bd96b5d67b8c67cf955d60a5de74207c1"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.1+2"
|
||||||
|
image_picker_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_platform_interface
|
||||||
|
sha256: "886d57f0be73c4b140004e78b9f28a8914a09e50c2d816bdd0520051a71236a0"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.10.1"
|
||||||
|
image_picker_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_windows
|
||||||
|
sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.1+1"
|
||||||
image_size_getter:
|
image_size_getter:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ dependencies:
|
|||||||
#utils
|
#utils
|
||||||
device_info_plus: ^11.4.0
|
device_info_plus: ^11.4.0
|
||||||
|
|
||||||
|
##image_picker
|
||||||
|
image_picker: ^1.1.2
|
||||||
|
|
||||||
|
|
||||||
#UI
|
#UI
|
||||||
cupertino_icons: ^1.0.8
|
cupertino_icons: ^1.0.8
|
||||||
|
|||||||
112
pubspec.lock
112
pubspec.lock
@@ -193,6 +193,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.2"
|
version: "3.1.2"
|
||||||
|
cross_file:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: cross_file
|
||||||
|
sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.3.4+2"
|
||||||
crypto:
|
crypto:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -297,6 +305,38 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.0.1"
|
version: "7.0.1"
|
||||||
|
file_selector_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_linux
|
||||||
|
sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.9.3+2"
|
||||||
|
file_selector_macos:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_macos
|
||||||
|
sha256: "8c9250b2bd2d8d4268e39c82543bacbaca0fda7d29e0728c3c4bbb7c820fd711"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.9.4+3"
|
||||||
|
file_selector_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_platform_interface
|
||||||
|
sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.6.2"
|
||||||
|
file_selector_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_windows
|
||||||
|
sha256: "320fcfb6f33caa90f0b58380489fc5ac05d99ee94b61aa96ec2bff0ba81d3c2b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.9.3+4"
|
||||||
fixnum:
|
fixnum:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -363,6 +403,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.9.0"
|
version: "0.9.0"
|
||||||
|
flutter_plugin_android_lifecycle:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: flutter_plugin_android_lifecycle
|
||||||
|
sha256: f948e346c12f8d5480d2825e03de228d0eb8c3a737e4cdaa122267b89c022b5e
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.28"
|
||||||
flutter_rating_bar:
|
flutter_rating_bar:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -629,6 +677,70 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.5.4"
|
version: "4.5.4"
|
||||||
|
image_picker:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker
|
||||||
|
sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.2"
|
||||||
|
image_picker_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_android
|
||||||
|
sha256: "317a5d961cec5b34e777b9252393f2afbd23084aa6e60fcf601dcf6341b9ebeb"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.8.12+23"
|
||||||
|
image_picker_for_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_for_web
|
||||||
|
sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.6"
|
||||||
|
image_picker_ios:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_ios
|
||||||
|
sha256: "05da758e67bc7839e886b3959848aa6b44ff123ab4b28f67891008afe8ef9100"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.8.12+2"
|
||||||
|
image_picker_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_linux
|
||||||
|
sha256: "34a65f6740df08bbbeb0a1abd8e6d32107941fd4868f67a507b25601651022c9"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.1+2"
|
||||||
|
image_picker_macos:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_macos
|
||||||
|
sha256: "1b90ebbd9dcf98fb6c1d01427e49a55bd96b5d67b8c67cf955d60a5de74207c1"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.1+2"
|
||||||
|
image_picker_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_platform_interface
|
||||||
|
sha256: "886d57f0be73c4b140004e78b9f28a8914a09e50c2d816bdd0520051a71236a0"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.10.1"
|
||||||
|
image_picker_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_windows
|
||||||
|
sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.1+1"
|
||||||
image_size_getter:
|
image_size_getter:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
Reference in New Issue
Block a user