Line data Source code
1 : import 'package:freezed_annotation/freezed_annotation.dart'; 2 : 3 : part 'dimension.freezed.dart'; 4 : part 'dimension.g.dart'; 5 : 6 : ///Dimension model 7 : /// 8 : ///Handle [width] and [height] data, used in `Image` 9 : @freezed 10 : class Dimension with _$Dimension { 11 : ///Deafult factory constructor for Dimension 12 : factory Dimension({ 13 : required double height, 14 : required double width, 15 : }) = _Dimension; 16 : 17 : ///Creates a Dimension object from json 18 1 : factory Dimension.fromJson(Map<String, dynamic> json) => 19 1 : _$DimensionFromJson(json); 20 : }