mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-02 18:19:25 +01:00
22 lines
434 B
Dart
22 lines
434 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'weight_unit.g.dart';
|
|
|
|
@JsonSerializable()
|
|
class WeightUnit {
|
|
@JsonKey(required: true)
|
|
final int id;
|
|
|
|
@JsonKey(required: true)
|
|
final String name;
|
|
|
|
WeightUnit({
|
|
this.id,
|
|
this.name,
|
|
});
|
|
|
|
// Boilerplate
|
|
factory WeightUnit.fromJson(Map<String, dynamic> json) => _$WeightUnitFromJson(json);
|
|
Map<String, dynamic> toJson() => _$WeightUnitToJson(this);
|
|
}
|