Flutter 无法在flatter中调整行小部件的大小

Flutter 无法在flatter中调整行小部件的大小,flutter,layout,resize,agora.io,Flutter,Layout,Resize,Agora.io,如果有人能帮忙,我只想缩小我的布局尺寸: return Container( child: Row( children: <Widget>[ MainAxisSize.max(){ _expandedVideoRow([views[0]]);}, MainAxisSize.min(){ _expandedV

如果有人能帮忙,我只想缩小我的布局尺寸:

return Container(
            child: Row(
              children: <Widget>[
                MainAxisSize.max(){
                _expandedVideoRow([views[0]]);},
                MainAxisSize.min(){
                _expandedVideoRow([views[1]]);}
              ],
            ));
返回容器(
孩子:排(
儿童:[
MainAxisSize.max(){
_expandedVideoRow([views[0]]);},
MainAxisSize.min(){
_expandedVideoRow([views[1]];}
],
));

大小不变。

如以下示例所示,为容器添加宽度

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return MyAppState();
  }
}

class MyAppState extends State<MyApp> {
 @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("Width sizing"),
        ),
        body: Container(
          width: 70.0,
            child: Row(
              children: <Widget>[
                Container(
                  width: 35.0,
                  height: 35.0,
                  color: Colors.blue),
                 Container(
                  width: 35.0,
                  height: 35.0,
                  color: Colors.green),
              ],
            ),),
        ),
    );
  }
}
导入“包装:颤振/材料.省道”;
void main()=>runApp(MyApp());
类MyApp扩展了StatefulWidget{
@凌驾
状态createState(){
返回MyAppState();
}
}
类MyAppState扩展了状态{
@凌驾
小部件构建(构建上下文){
返回材料PP(
家:脚手架(
appBar:appBar(
标题:文本(“宽度大小”),
),
主体:容器(
宽度:70.0,
孩子:排(
儿童:[
容器(
宽度:35.0,
身高:35.0,
颜色:颜色。蓝色),
容器(
宽度:35.0,
身高:35.0,
颜色:颜色。绿色),
],
),),
),
);
}
}

快乐编码

我建议在发布问题之前格式化代码。还可以从中查看
容器