Task: Add sample client sdk

This commit is contained in:
2021-09-04 19:07:29 +07:00
commit 82de95b4b7
13 changed files with 135 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
class Category {
int id;
String name;
Category(this.id, this.name);
}

View File

@@ -0,0 +1,20 @@
class Product {
int id;
String name;
double price;
Product(this.id, this.name, this.price);
static Product fromJson(dynamic json) => Product(
json['id'],
json['name'],
json['price'],
);
}
class ProductRequest {
String name;
double price;
ProductRequest(this.name, this.price);
}