@@ -13,6 +13,7 @@ import {
1313import { numberToFixedString } from "../common/numToAutoFixed" ;
1414import { getCommonRadius } from "../common/commonRadius" ;
1515import { commonStroke } from "../common/commonStroke" ;
16+ import { generateRotationMatrix } from "./builderImpl/flutterBlend" ;
1617
1718export const flutterContainer = ( node : SceneNode , child : string ) : string => {
1819 // ignore the view when size is zero or less
@@ -42,6 +43,18 @@ export const flutterContainer = (node: SceneNode, child: string): string => {
4243 let result : string ;
4344 const hasConstraints = constraints && Object . keys ( constraints ) . length > 0 ;
4445
46+ const properties : Record < string , string > = { } ;
47+
48+ // If node has rotation, get the matrix for the transform property
49+ if ( "rotation" in node ) {
50+ const matrix = generateRotationMatrix ( node ) ;
51+ if ( matrix ) {
52+ properties . transform = matrix ;
53+ }
54+ }
55+
56+ properties . child = child ;
57+
4558 if ( width || height || propBoxDecoration || clipBehavior ) {
4659 const parsedDecoration = skipDefaultProperty (
4760 propBoxDecoration ,
@@ -53,7 +66,7 @@ export const flutterContainer = (node: SceneNode, child: string): string => {
5366 padding : propPadding ,
5467 clipBehavior : clipBehavior ,
5568 decoration : clipBehavior ? propBoxDecoration : parsedDecoration ,
56- child : child ,
69+ ... properties ,
5770 } ) ;
5871 } else if ( propPadding ) {
5972 // if there is just a padding, add Padding
0 commit comments