forked from eatvio/eatvio_app
fix: fixed analyzer issues and merge conflicts
This commit is contained in:
@@ -46,7 +46,7 @@ abstract class PlanModel with _$PlanModel {
|
||||
factory PlanModel.fromJson(Map<String, dynamic> json) => _$PlanModelFromJson(json);
|
||||
}
|
||||
|
||||
PacketOptions? parseOption(json) {
|
||||
PacketOptions? parseOption(dynamic json) {
|
||||
if (json is Map<String, dynamic>) {
|
||||
return PacketOptions.fromJson(json);
|
||||
}
|
||||
@@ -74,7 +74,7 @@ abstract class PacketOptions with _$PacketOptions {
|
||||
factory PacketOptions.empty() => PacketOptions(items: [], price: double.parse('1200'), short: '', description: '');
|
||||
}
|
||||
|
||||
List<String> _parseItems(json) {
|
||||
List<String> _parseItems(dynamic json) {
|
||||
if (json is Map<String, dynamic>) {
|
||||
return json.values.map((e) => e as String).toList();
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ abstract class Ingredient with _$Ingredient {
|
||||
|
||||
factory Ingredient.fromJson(Map<String, Object?> json) => _$IngredientFromJson(json);
|
||||
}
|
||||
int _parseProductId(json) {
|
||||
int _parseProductId(dynamic json) {
|
||||
if (json is String) {
|
||||
return int.parse(json);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user