@@ -66,24 +66,24 @@ class FigmaStyleModel {
6666 final FigmaStyleBlendMode blendMode;
6767
6868 FigmaStyleModel ._fromJson (Map <String , dynamic > json) :
69- color = json['color' ] == null || json ['color' ][ 'r ' ] == null ? null : Color .fromRGBO (
70- (json['color' ]['r' ] * 255.0 ).round (),
71- (json['color' ]['g' ] * 255.0 ).round (),
72- (json['color' ]['b' ] * 255.0 ).round (),
73- (json['color ' ]['o ' ] ?? 1.0 ).toDouble (),
69+ color = json['fill' ] ['color' ] == null ? null : Color .fromRGBO (
70+ (json['fill' ][ ' color' ]['r' ] * 255.0 ).round (),
71+ (json['fill' ][ ' color' ]['g' ] * 255.0 ).round (),
72+ (json['fill' ][ ' color' ]['b' ] * 255.0 ).round (),
73+ (json['fill ' ]['opacity ' ] ?? 1.0 ).toDouble (),
7474 ),
7575 borderRadius = json['border' ]['radius' ]['tl' ] == null ? null : BorderRadius .only (
7676 topLeft: Radius .circular (json['border' ]['radius' ]['tl' ].toDouble ()),
7777 topRight: Radius .circular (json['border' ]['radius' ]['tr' ].toDouble ()),
7878 bottomLeft: Radius .circular (json['border' ]['radius' ]['bl' ].toDouble ()),
7979 bottomRight: Radius .circular (json['border' ]['radius' ]['br' ].toDouble ())
8080 ),
81- border = json['border' ]['color' ] == null || json[ 'border' ][ 'color' ][ 'r' ] == null ? null : FigmaStyleBorder .all (
81+ border = json['border' ]['color' ] == null ? null : FigmaStyleBorder .all (
8282 color: Color .fromRGBO (
8383 (json['border' ]['color' ]['r' ] * 255.0 ).round (),
8484 (json['border' ]['color' ]['g' ] * 255.0 ).round (),
8585 (json['border' ]['color' ]['b' ] * 255.0 ).round (),
86- (json['color ' ]['o ' ] ?? 1.0 ).toDouble (),
86+ (json['border ' ]['opacity ' ] ?? 1.0 ).toDouble (),
8787 ),
8888 width: json['border' ]['width' ].toDouble ()
8989 ),
0 commit comments