Files
OneTrip/one_trip/lib/api/models/ingredient.dart
Alexander Laevens 25e1a42392 rename to one trip
2022-11-26 00:25:22 -07:00

29 lines
671 B
Dart

import 'package:one_trip/api/auth.dart';
import 'package:one_trip/api/consts.dart';
import 'package:http/http.dart' as http;
class Ingredient {
int id;
String name;
bool inStock;
int contentType;
int objectID;
Ingredient({
required this.id,
required this.name,
required this.inStock,
required this.contentType,
required this.objectID,
});
factory Ingredient.fromJson(Map<String, dynamic> json) {
return Ingredient(
id: json["id"] as int,
name: json["name"] as String,
inStock: json["in_stock"] as bool,
contentType: json["content_type"] as int,
objectID: json["object_id"] as int);
}
}