forked from eatvio/eatvio_app
16 lines
331 B
Dart
16 lines
331 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'product.freezed.dart';
|
|
|
|
part 'product.g.dart';
|
|
|
|
@freezed
|
|
class Product with _$Product {
|
|
const factory Product({
|
|
required int id,
|
|
required String name,
|
|
}) = _Product;
|
|
|
|
factory Product.fromJson(Map<String, Object?> json) => _$ProductFromJson(json);
|
|
}
|