ConstrainedBox定義された幅と高さ

クラスLayoutDemoextends StatelessWidget {

@オーバーライド

  Widgetbuild(BuildContextコンテキスト){

(新しい足場を返します

アプリケーションバー:新しいアプリケーションバー(

タイトル:新しいテキスト(「ConstrainedBox定義された幅と高さの典型的な」)、

      )、

      ボディ:新しいConstrainedBox(

制約:CONST BoxConstraints(

minWidth:250.0、

          minHeightプロパティ:150.0、

          maxWidth:320.0、

          maxHeight:220.0、

        )、

        子供:新しいコンテナ(

幅:300.0、

          高さ:300.0、

          色:Colors.green、

        )、

      )、

    );

  }

}

おすすめ

転載: blog.csdn.net/weixin_33895604/article/details/90866674