import "codable.dart"; class MapPadding implements Codable { final double left; final double top; final double right; final double bottom; MapPadding({this.left = 0, this.top = 0, this.right = 0, this.bottom = 0}); @override Map toJson() { return { 'left': left, 'top': top, 'right': right, 'bottom': bottom, }; } factory MapPadding.fromJson(Map map) { return MapPadding( left: map['left'], top: map['top'], right: map['right'], bottom: map['bottom'], ); } @override String toString() { return 'MapPadding{left: $left, top: $top, right: $right, bottom: $bottom}'; } }