mirror of https://github.com/flutter/samples.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
476 B
20 lines
476 B
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);
|
|
}
|