import { Widget } from "./widget" ; import { Double , double } from "../dart/double" ; import { Size } from "../dart-ui/size" ; import { Snippet } from "../builder/buildable-tree" ; /**
 * https://api.flutter.dev/flutter/widgets/SizedBox-class.html
 */ export class SizedBox extends Widget { width : double ; height : double ; child : Widget ; constructor ( args ) { super ( ) ; this . child = args . child ; this . width = args ?. width ; this . height = args ?. height ; } static expand ( child ) { return new SizedBox ( { child : child , width : Double . infinity as Snippet , height : Double . infinity as Snippet , } ) ; } static shrink ( child ) { return new SizedBox ( { child : child , width : 0.0 , height : 0.0 , } ) ; } static fromSize ( args ) { return new SizedBox ( { child : args . child , width : args . size . width , height : args . size . height , } ) ; } }