1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-09 22:38:42 +00:00
Files
samples/code_sharing/shared/lib/src/models.dart
2022-10-20 09:00:41 -07:00

20 lines
476 B
Dart

import 'package:freezed_annotation/freezed_annotation.dart';
part 'models.freezed.dart';
part 'models.g.dart';
@Freezed()
class Increment with _$Increment {
const factory Increment({required int by}) = _Increment;
factory Increment.fromJson(Map<String, dynamic> json) =>
_$IncrementFromJson(json);
}
@Freezed()
class Count with _$Count {
const factory Count(int value) = _Count;
factory Count.fromJson(Map<String, dynamic> json) => _$CountFromJson(json);
}