import 'package:freezed_annotation/freezed_annotation.dart'; part 'product_struct.freezed.dart'; part 'product_struct.g.dart'; @Freezed(toJson: true) abstract class ProductStruct with _$ProductStruct { factory ProductStruct({ @Default(0) int id, String? code, String? name, String? description, String? price, String? quantity, String? image, }) = _ProductStruct; factory ProductStruct.fromJson(Map json) => _$ProductStructFromJson(json); }