1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-09 14:28:51 +00:00

code sharing sample: flat package directory (#1486)

This commit is contained in:
Kevin Moore
2022-10-20 09:00:41 -07:00
committed by GitHub
parent c21fcd6573
commit 6caaa0a3c9
19 changed files with 32 additions and 19 deletions

View File

@@ -0,0 +1,19 @@
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);
}