You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
class Supplier {
|
|
|
|
|
Supplier({
|
|
|
|
|
this.id,
|
|
|
|
|
this.suppliername,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Supplier.fromJson(dynamic json) {
|
|
|
|
|
id = json['id'];
|
|
|
|
|
suppliername = json['suppliername'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
num? id; // Now nullable
|
|
|
|
|
String? suppliername; // Now nullable
|
|
|
|
|
|
|
|
|
|
Supplier copyWith({
|
|
|
|
|
num? id, // Parameter is now nullable
|
|
|
|
|
String? suppliername, // Parameter is now nullable
|
|
|
|
|
}) =>
|
|
|
|
|
Supplier(
|
|
|
|
|
id: id ?? this.id,
|
|
|
|
|
suppliername: suppliername ?? this.suppliername,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final map = <String, dynamic>{};
|
|
|
|
|
map['id'] = id;
|
|
|
|
|
map['suppliername'] = suppliername;
|
|
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
}
|