
Introduces a side navigation drawer on the home page to improve navigation and centralize user actions. Displays the logged-in user's information (name, email) in the drawer header. Adds a link to the Product List page ("Inventaire") within the drawer. Moves the logout functionality to the drawer, ensuring user data is also cleared from local storage upon logout. Ensures user data is saved to local storage during the login process and fetched when the home page loads. Includes minor text updates on the Product Form page.
164 lines
6.7 KiB
Dart
164 lines
6.7 KiB
Dart
// dart format width=80
|
|
// coverage:ignore-file
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// ignore_for_file: type=lint
|
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
|
|
|
part of 'product_struct.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// dart format off
|
|
T _$identity<T>(T value) => value;
|
|
|
|
/// @nodoc
|
|
mixin _$ProductStruct {
|
|
|
|
String? get id; String? get code; String? get name; String? get description; String? get price; String? get quantity;
|
|
/// Create a copy of ProductStruct
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$ProductStructCopyWith<ProductStruct> get copyWith => _$ProductStructCopyWithImpl<ProductStruct>(this as ProductStruct, _$identity);
|
|
|
|
/// Serializes this ProductStruct to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is ProductStruct&&(identical(other.id, id) || other.id == id)&&(identical(other.code, code) || other.code == code)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.price, price) || other.price == price)&&(identical(other.quantity, quantity) || other.quantity == quantity));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,code,name,description,price,quantity);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ProductStruct(id: $id, code: $code, name: $name, description: $description, price: $price, quantity: $quantity)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $ProductStructCopyWith<$Res> {
|
|
factory $ProductStructCopyWith(ProductStruct value, $Res Function(ProductStruct) _then) = _$ProductStructCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
String? id, String? code, String? name, String? description, String? price, String? quantity
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$ProductStructCopyWithImpl<$Res>
|
|
implements $ProductStructCopyWith<$Res> {
|
|
_$ProductStructCopyWithImpl(this._self, this._then);
|
|
|
|
final ProductStruct _self;
|
|
final $Res Function(ProductStruct) _then;
|
|
|
|
/// Create a copy of ProductStruct
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? code = freezed,Object? name = freezed,Object? description = freezed,Object? price = freezed,Object? quantity = freezed,}) {
|
|
return _then(_self.copyWith(
|
|
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as String?,code: freezed == code ? _self.code : code // ignore: cast_nullable_to_non_nullable
|
|
as String?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String?,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
|
as String?,price: freezed == price ? _self.price : price // ignore: cast_nullable_to_non_nullable
|
|
as String?,quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _ProductStruct implements ProductStruct {
|
|
_ProductStruct({this.id, this.code, this.name, this.description, this.price, this.quantity});
|
|
factory _ProductStruct.fromJson(Map<String, dynamic> json) => _$ProductStructFromJson(json);
|
|
|
|
@override final String? id;
|
|
@override final String? code;
|
|
@override final String? name;
|
|
@override final String? description;
|
|
@override final String? price;
|
|
@override final String? quantity;
|
|
|
|
/// Create a copy of ProductStruct
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$ProductStructCopyWith<_ProductStruct> get copyWith => __$ProductStructCopyWithImpl<_ProductStruct>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$ProductStructToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProductStruct&&(identical(other.id, id) || other.id == id)&&(identical(other.code, code) || other.code == code)&&(identical(other.name, name) || other.name == name)&&(identical(other.description, description) || other.description == description)&&(identical(other.price, price) || other.price == price)&&(identical(other.quantity, quantity) || other.quantity == quantity));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,code,name,description,price,quantity);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ProductStruct(id: $id, code: $code, name: $name, description: $description, price: $price, quantity: $quantity)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$ProductStructCopyWith<$Res> implements $ProductStructCopyWith<$Res> {
|
|
factory _$ProductStructCopyWith(_ProductStruct value, $Res Function(_ProductStruct) _then) = __$ProductStructCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
String? id, String? code, String? name, String? description, String? price, String? quantity
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$ProductStructCopyWithImpl<$Res>
|
|
implements _$ProductStructCopyWith<$Res> {
|
|
__$ProductStructCopyWithImpl(this._self, this._then);
|
|
|
|
final _ProductStruct _self;
|
|
final $Res Function(_ProductStruct) _then;
|
|
|
|
/// Create a copy of ProductStruct
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? code = freezed,Object? name = freezed,Object? description = freezed,Object? price = freezed,Object? quantity = freezed,}) {
|
|
return _then(_ProductStruct(
|
|
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as String?,code: freezed == code ? _self.code : code // ignore: cast_nullable_to_non_nullable
|
|
as String?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String?,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable
|
|
as String?,price: freezed == price ? _self.price : price // ignore: cast_nullable_to_non_nullable
|
|
as String?,quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
// dart format on
|