
Adds the ObjectBox database dependency for local data persistence. Updates the Product ID field type from nullable String to non-nullable int with a default value of 0 to align with ObjectBox's integer ID requirements. Includes necessary generated files for plugin registration and model serialization.
28 lines
908 B
Dart
28 lines
908 B
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'product_struct.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
_ProductStruct _$ProductStructFromJson(Map<String, dynamic> json) =>
|
|
_ProductStruct(
|
|
id: (json['id'] as num?)?.toInt() ?? 0,
|
|
code: json['code'] as String?,
|
|
name: json['name'] as String?,
|
|
description: json['description'] as String?,
|
|
price: json['price'] as String?,
|
|
quantity: json['quantity'] as String?,
|
|
);
|
|
|
|
Map<String, dynamic> _$ProductStructToJson(_ProductStruct instance) =>
|
|
<String, dynamic>{
|
|
'id': instance.id,
|
|
'code': instance.code,
|
|
'name': instance.name,
|
|
'description': instance.description,
|
|
'price': instance.price,
|
|
'quantity': instance.quantity,
|
|
};
|