@@ -11,7 +11,6 @@ import {
1111 getCrossAxisAlignment ,
1212 getMainAxisAlignment ,
1313} from "./builderImpl/flutterAutoLayout" ;
14- import { commonSortChildrenWhenInferredAutoLayout } from "../common/commonChildrenOrder" ;
1514import { PluginSettings } from "types" ;
1615import { addWarning } from "../common/commonConversionWarnings" ;
1716import { getPlaceholderImage } from "../common/images" ;
@@ -152,9 +151,9 @@ const flutterContainer = (node: SceneNode, child: string): string => {
152151 }
153152
154153 const builder = new FlutterDefaultBuilder ( propChild )
155- . createContainer ( node , localSettings . optimizeLayout )
154+ . createContainer ( node )
156155 . blendAttr ( node )
157- . position ( node , localSettings . optimizeLayout ) ;
156+ . position ( node ) ;
158157
159158 return builder . child ;
160159} ;
@@ -163,24 +162,15 @@ const flutterText = (node: TextNode): string => {
163162 const builder = new FlutterTextBuilder ( ) . createText ( node ) ;
164163 previousExecutionCache . push ( builder . child ) ;
165164
166- return builder
167- . blendAttr ( node )
168- . textAutoSize ( node )
169- . position ( node , localSettings . optimizeLayout ) . child ;
165+ return builder . blendAttr ( node ) . textAutoSize ( node ) . position ( node ) . child ;
170166} ;
171167
172168const flutterFrame = (
173169 node : SceneNode & BaseFrameMixin & MinimalBlendMixin ,
174170) : string => {
175- // Sort children according to layout direction
176- const sortedChildren = commonSortChildrenWhenInferredAutoLayout (
177- node ,
178- localSettings . optimizeLayout ,
179- ) ;
180-
181171 // Check if any direct children need absolute positioning
182- const hasAbsoluteChildren = sortedChildren . some (
183- ( child ) => ( child as any ) . layoutPositioning === "ABSOLUTE" ,
172+ const hasAbsoluteChildren = node . children . some (
173+ ( child : any ) => ( child as any ) . layoutPositioning === "ABSOLUTE" ,
184174 ) ;
185175
186176 // Add warning if we need to use Stack due to absolute positioning
@@ -209,7 +199,7 @@ const flutterFrame = (
209199 const rowColumn = makeRowColumn ( node , children ) ;
210200 return flutterContainer ( node , rowColumn ) ;
211201 } else {
212- if ( localSettings . optimizeLayout && node . inferredAutoLayout ) {
202+ if ( node . inferredAutoLayout ) {
213203 const rowColumn = makeRowColumn ( node . inferredAutoLayout , children ) ;
214204 return flutterContainer ( node , rowColumn ) ;
215205 }
0 commit comments