Commit 190fa8a1 by Mobile : Art

update

parent 4d86403a
65bf9efbfad64e1b5e4b50eeaed8247f
\ No newline at end of file
......@@ -10,81 +10,32 @@ project 'Runner', {
'Release' => :release,
}
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
generated_key_values = {}
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) do |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
generated_key_values[podname] = podpath
else
puts "Invalid plugin specification: #{line}"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
generated_key_values
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
# Flutter Pod
copied_flutter_dir = File.join(__dir__, 'Flutter')
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
unless File.exist?(generated_xcode_build_settings_path)
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
unless File.exist?(copied_framework_path)
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
end
unless File.exist?(copied_podspec_path)
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
end
end
# Keep pod path relative so it can be checked into Podfile.lock.
pod 'Flutter', :path => 'Flutter'
# Plugin Pods
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.each do |name, path|
symlink = File.join('.symlinks', 'plugins', name)
File.symlink(path, symlink)
pod name, :path => File.join(symlink, 'ios')
end
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
flutter_additional_ios_build_settings(target)
end
end
PODS:
- Flutter (1.0.0)
- flutter_plugin_android_lifecycle (0.0.1):
- image_cropper (0.0.3):
- Flutter
- image_cropper (0.0.2):
- Flutter
- TOCropViewController (~> 2.5.2)
- TOCropViewController (~> 2.5.4)
- image_picker (0.0.1):
- Flutter
- path_provider_linux (0.0.1):
- Flutter
- shared_preferences (0.0.1):
- Flutter
- shared_preferences_linux (0.0.1):
- Flutter
- shared_preferences_macos (0.0.1):
- Flutter
- shared_preferences_web (0.0.1):
- TOCropViewController (2.5.4)
- url_launcher (0.0.1):
- Flutter
- TOCropViewController (2.5.3)
DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`)
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
- shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
SPEC REPOS:
trunk:
......@@ -37,35 +25,23 @@ SPEC REPOS:
EXTERNAL SOURCES:
Flutter:
:path: Flutter
flutter_plugin_android_lifecycle:
:path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios"
image_cropper:
:path: ".symlinks/plugins/image_cropper/ios"
image_picker:
:path: ".symlinks/plugins/image_picker/ios"
path_provider_linux:
:path: ".symlinks/plugins/path_provider_linux/ios"
shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios"
shared_preferences_linux:
:path: ".symlinks/plugins/shared_preferences_linux/ios"
shared_preferences_macos:
:path: ".symlinks/plugins/shared_preferences_macos/ios"
shared_preferences_web:
:path: ".symlinks/plugins/shared_preferences_web/ios"
url_launcher:
:path: ".symlinks/plugins/url_launcher/ios"
SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
image_cropper: 3c16d7651730ffe85897f5a1c4e2547e6b54989a
image_cropper: c8f9b4157933c7bb965a66d1c5e6c8fd408c6eb4
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
TOCropViewController: 20a14b6a7a098308bf369e7c8d700dc983a974e6
TOCropViewController: 2a1ae1242600b1f2d996fd91a5268b2309a33b5c
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
PODFILE CHECKSUM: 1b66dae606f75376c5f2135a8290850eeb09ae83
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
COCOAPODS: 1.9.1
COCOAPODS: 1.10.0.beta.1
......@@ -263,9 +263,22 @@
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../Flutter/Flutter.framework",
"${BUILT_PRODUCTS_DIR}/TOCropViewController/TOCropViewController.framework",
"${BUILT_PRODUCTS_DIR}/image_cropper/image_cropper.framework",
"${BUILT_PRODUCTS_DIR}/image_picker/image_picker.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
"${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TOCropViewController.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_cropper.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
......@@ -308,7 +321,6 @@
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
......@@ -385,7 +397,6 @@
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
......@@ -441,7 +452,6 @@
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
......
class NearMeListModel {
int id;
String storeCode;
String storeName;
String storeCover;
String displayCover;
String isActive;
int storeOrder;
int customerGroupId;
int vendorId;
Null createdAt;
String updatedAt;
String location;
String email;
String phone;
String mobile;
String address;
String city;
String country;
String zipCode;
String website;
String allowRoute;
String excerpt;
String detail;
String storeLogo;
String isFacilities;
String distanceWithLocation;
int star;
List<StoreProduct> storeProduct;
List<Null> comment;
Null ratings;
NearMeListModel(
{this.id,
this.storeCode,
this.storeName,
this.storeCover,
this.displayCover,
this.isActive,
this.storeOrder,
this.customerGroupId,
this.vendorId,
this.createdAt,
this.updatedAt,
this.location,
this.email,
this.phone,
this.mobile,
this.address,
this.city,
this.country,
this.zipCode,
this.website,
this.allowRoute,
this.excerpt,
this.detail,
this.storeLogo,
this.isFacilities,
this.distanceWithLocation,
this.star,
this.storeProduct,
this.comment,
this.ratings});
NearMeListModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
storeCode = json['store_code'];
storeName = json['store_name'];
storeCover = json['store_cover'];
displayCover = json['display_cover'];
isActive = json['is_active'];
storeOrder = json['store_order'];
customerGroupId = json['customer_group_id'];
vendorId = json['vendor_id'];
createdAt = json['created_at'];
updatedAt = json['updated_at'];
location = json['location'];
email = json['email'];
phone = json['phone'];
mobile = json['mobile'];
address = json['address'];
city = json['city'];
country = json['country'];
zipCode = json['zip_code'];
website = json['website'];
allowRoute = json['allow_route'];
excerpt = json['excerpt'];
detail = json['detail'];
storeLogo = json['store_logo'];
isFacilities = json['is_facilities'];
distanceWithLocation = json['distance_with_location'];
star = json['star'];
if (json['store_product'] != null) {
storeProduct = new List<StoreProduct>();
json['store_product'].forEach((v) {
storeProduct.add(new StoreProduct.fromJson(v));
});
}
if (json['comment'] != null) {
comment = new List<Null>();
json['comment'].forEach((v) {
comment.add(new Null.fromJson(v));
});
}
ratings = json['ratings'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['store_code'] = this.storeCode;
data['store_name'] = this.storeName;
data['store_cover'] = this.storeCover;
data['display_cover'] = this.displayCover;
data['is_active'] = this.isActive;
data['store_order'] = this.storeOrder;
data['customer_group_id'] = this.customerGroupId;
data['vendor_id'] = this.vendorId;
data['created_at'] = this.createdAt;
data['updated_at'] = this.updatedAt;
data['location'] = this.location;
data['email'] = this.email;
data['phone'] = this.phone;
data['mobile'] = this.mobile;
data['address'] = this.address;
data['city'] = this.city;
data['country'] = this.country;
data['zip_code'] = this.zipCode;
data['website'] = this.website;
data['allow_route'] = this.allowRoute;
data['excerpt'] = this.excerpt;
data['detail'] = this.detail;
data['store_logo'] = this.storeLogo;
data['is_facilities'] = this.isFacilities;
data['distance_with_location'] = this.distanceWithLocation;
data['star'] = this.star;
if (this.storeProduct != null) {
data['store_product'] = this.storeProduct.map((v) => v.toJson()).toList();
}
if (this.comment != null) {
data['comment'] = this.comment.map((v) => v.toJson()).toList();
}
data['ratings'] = this.ratings;
return data;
}
}
class StoreProduct {
int id;
int productId;
int storeId;
int vendorId;
String status;
int sortOrders;
Null createdAt;
Null updatedAt;
Null typeRateService;
Null priceRateService;
Product product;
StoreProduct(
{this.id,
this.productId,
this.storeId,
this.vendorId,
this.status,
this.sortOrders,
this.createdAt,
this.updatedAt,
this.typeRateService,
this.priceRateService,
this.product});
StoreProduct.fromJson(Map<String, dynamic> json) {
id = json['id'];
productId = json['product_id'];
storeId = json['store_id'];
vendorId = json['vendor_id'];
status = json['status'];
sortOrders = json['sort_orders'];
createdAt = json['created_at'];
updatedAt = json['updated_at'];
typeRateService = json['type_rate_service'];
priceRateService = json['price_rate_service'];
product =
json['product'] != null ? new Product.fromJson(json['product']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['product_id'] = this.productId;
data['store_id'] = this.storeId;
data['vendor_id'] = this.vendorId;
data['status'] = this.status;
data['sort_orders'] = this.sortOrders;
data['created_at'] = this.createdAt;
data['updated_at'] = this.updatedAt;
data['type_rate_service'] = this.typeRateService;
data['price_rate_service'] = this.priceRateService;
if (this.product != null) {
data['product'] = this.product.toJson();
}
return data;
}
}
class Product {
int id;
String urlCode;
String name;
String cover;
String excerpt;
String detail;
String price;
String specialPrice;
String sku;
Null tax;
int quantity;
Null weight;
String visibility;
Null newsFromDate;
Null newsToDate;
Null layout;
Null theme;
String duration;
Null sellingStartTime;
Null sellingEndTime;
Null redemptionStartTime;
Null redemptionEndTime;
Null availibility;
String isFeatured;
String isDeal;
String hasTeam;
String offpeak;
String reviewStatus;
String relatedStatus;
String upSellsStatus;
String crossSellsStatus;
String allowGiftMessage;
String stockStatus;
int status;
int businessTypeId;
int businessCateId;
Null businessServiceId;
int attributeSetId;
int vendorId;
String allowRoute;
Null type;
int star;
List<CategoryByProductId> categoryByProductId;
List<Null> ratings;
int storeProductId;
Null typeRateService;
Null priceRateService;
int productId;
int storeId;
String storeCode;
String storeName;
String location;
int storeStatus;
int vendorStatus;
String latitude;
String longitude;
Null popular;
Product(
{this.id,
this.urlCode,
this.name,
this.cover,
this.excerpt,
this.detail,
this.price,
this.specialPrice,
this.sku,
this.tax,
this.quantity,
this.weight,
this.visibility,
this.newsFromDate,
this.newsToDate,
this.layout,
this.theme,
this.duration,
this.sellingStartTime,
this.sellingEndTime,
this.redemptionStartTime,
this.redemptionEndTime,
this.availibility,
this.isFeatured,
this.isDeal,
this.hasTeam,
this.offpeak,
this.reviewStatus,
this.relatedStatus,
this.upSellsStatus,
this.crossSellsStatus,
this.allowGiftMessage,
this.stockStatus,
this.status,
this.businessTypeId,
this.businessCateId,
this.businessServiceId,
this.attributeSetId,
this.vendorId,
this.allowRoute,
this.type,
this.star,
this.categoryByProductId,
this.ratings,
this.storeProductId,
this.typeRateService,
this.priceRateService,
this.productId,
this.storeId,
this.storeCode,
this.storeName,
this.location,
this.storeStatus,
this.vendorStatus,
this.latitude,
this.longitude,
this.popular});
Product.fromJson(Map<String, dynamic> json) {
id = json['id'];
urlCode = json['url_code'];
name = json['name'];
cover = json['cover'];
excerpt = json['excerpt'];
detail = json['detail'];
price = json['price'];
specialPrice = json['special_price'];
sku = json['sku'];
tax = json['tax'];
quantity = json['quantity'];
weight = json['weight'];
visibility = json['visibility'];
newsFromDate = json['news_from_date'];
newsToDate = json['news_to_date'];
layout = json['layout'];
theme = json['theme'];
duration = json['duration'];
sellingStartTime = json['selling_start_time'];
sellingEndTime = json['selling_end_time'];
redemptionStartTime = json['redemption_start_time'];
redemptionEndTime = json['redemption_end_time'];
availibility = json['availibility'];
isFeatured = json['is_featured'];
isDeal = json['is_deal'];
hasTeam = json['has_team'];
offpeak = json['offpeak'];
reviewStatus = json['review_status'];
relatedStatus = json['related_status'];
upSellsStatus = json['up_sells_status'];
crossSellsStatus = json['cross_sells_status'];
allowGiftMessage = json['allow_gift_message'];
stockStatus = json['stock_status'];
status = json['status'];
businessTypeId = json['business_type_id'];
businessCateId = json['business_cate_id'];
businessServiceId = json['business_service_id'];
attributeSetId = json['attribute_set_id'];
vendorId = json['vendor_id'];
allowRoute = json['allow_route'];
type = json['type'];
star = json['star'];
if (json['category_by_product_id'] != null) {
categoryByProductId = new List<CategoryByProductId>();
json['category_by_product_id'].forEach((v) {
categoryByProductId.add(new CategoryByProductId.fromJson(v));
});
}
if (json['ratings'] != null) {
ratings = new List<Null>();
json['ratings'].forEach((v) {
ratings.add(new Null.fromJson(v));
});
}
storeProductId = json['store_product_id'];
typeRateService = json['type_rate_service'];
priceRateService = json['price_rate_service'];
productId = json['product_id'];
storeId = json['store_id'];
storeCode = json['store_code'];
storeName = json['store_name'];
location = json['location'];
storeStatus = json['store_status'];
vendorStatus = json['vendor_status'];
latitude = json['latitude'];
longitude = json['longitude'];
popular = json['popular'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['url_code'] = this.urlCode;
data['name'] = this.name;
data['cover'] = this.cover;
data['excerpt'] = this.excerpt;
data['detail'] = this.detail;
data['price'] = this.price;
data['special_price'] = this.specialPrice;
data['sku'] = this.sku;
data['tax'] = this.tax;
data['quantity'] = this.quantity;
data['weight'] = this.weight;
data['visibility'] = this.visibility;
data['news_from_date'] = this.newsFromDate;
data['news_to_date'] = this.newsToDate;
data['layout'] = this.layout;
data['theme'] = this.theme;
data['duration'] = this.duration;
data['selling_start_time'] = this.sellingStartTime;
data['selling_end_time'] = this.sellingEndTime;
data['redemption_start_time'] = this.redemptionStartTime;
data['redemption_end_time'] = this.redemptionEndTime;
data['availibility'] = this.availibility;
data['is_featured'] = this.isFeatured;
data['is_deal'] = this.isDeal;
data['has_team'] = this.hasTeam;
data['offpeak'] = this.offpeak;
data['review_status'] = this.reviewStatus;
data['related_status'] = this.relatedStatus;
data['up_sells_status'] = this.upSellsStatus;
data['cross_sells_status'] = this.crossSellsStatus;
data['allow_gift_message'] = this.allowGiftMessage;
data['stock_status'] = this.stockStatus;
data['status'] = this.status;
data['business_type_id'] = this.businessTypeId;
data['business_cate_id'] = this.businessCateId;
data['business_service_id'] = this.businessServiceId;
data['attribute_set_id'] = this.attributeSetId;
data['vendor_id'] = this.vendorId;
data['allow_route'] = this.allowRoute;
data['type'] = this.type;
data['star'] = this.star;
if (this.categoryByProductId != null) {
data['category_by_product_id'] =
this.categoryByProductId.map((v) => v.toJson()).toList();
}
if (this.ratings != null) {
data['ratings'] = this.ratings.map((v) => v.toJson()).toList();
}
data['store_product_id'] = this.storeProductId;
data['type_rate_service'] = this.typeRateService;
data['price_rate_service'] = this.priceRateService;
data['product_id'] = this.productId;
data['store_id'] = this.storeId;
data['store_code'] = this.storeCode;
data['store_name'] = this.storeName;
data['location'] = this.location;
data['store_status'] = this.storeStatus;
data['vendor_status'] = this.vendorStatus;
data['latitude'] = this.latitude;
data['longitude'] = this.longitude;
data['popular'] = this.popular;
return data;
}
}
class CategoryByProductId {
int id;
Null parentId;
String name;
String code;
String displayName;
String cover;
String detail;
Null type;
String status;
int sortOrder;
Null storeId;
Null vendorId;
Null createdAt;
String updatedAt;
String visibility;
Pivot pivot;
CategoryByProductId(
{this.id,
this.parentId,
this.name,
this.code,
this.displayName,
this.cover,
this.detail,
this.type,
this.status,
this.sortOrder,
this.storeId,
this.vendorId,
this.createdAt,
this.updatedAt,
this.visibility,
this.pivot});
CategoryByProductId.fromJson(Map<String, dynamic> json) {
id = json['id'];
parentId = json['parent_id'];
name = json['name'];
code = json['code'];
displayName = json['display_name'];
cover = json['cover'];
detail = json['detail'];
type = json['type'];
status = json['status'];
sortOrder = json['sort_order'];
storeId = json['store_id'];
vendorId = json['vendor_id'];
createdAt = json['created_at'];
updatedAt = json['updated_at'];
visibility = json['visibility'];
pivot = json['pivot'] != null ? new Pivot.fromJson(json['pivot']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['parent_id'] = this.parentId;
data['name'] = this.name;
data['code'] = this.code;
data['display_name'] = this.displayName;
data['cover'] = this.cover;
data['detail'] = this.detail;
data['type'] = this.type;
data['status'] = this.status;
data['sort_order'] = this.sortOrder;
data['store_id'] = this.storeId;
data['vendor_id'] = this.vendorId;
data['created_at'] = this.createdAt;
data['updated_at'] = this.updatedAt;
data['visibility'] = this.visibility;
if (this.pivot != null) {
data['pivot'] = this.pivot.toJson();
}
return data;
}
}
class Pivot {
int productId;
int categoryId;
String createdAt;
String updatedAt;
Pivot({this.productId, this.categoryId, this.createdAt, this.updatedAt});
Pivot.fromJson(Map<String, dynamic> json) {
productId = json['product_id'];
categoryId = json['category_id'];
createdAt = json['created_at'];
updatedAt = json['updated_at'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['product_id'] = this.productId;
data['category_id'] = this.categoryId;
data['created_at'] = this.createdAt;
data['updated_at'] = this.updatedAt;
return data;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment