我只想减小布局的大小,如果有人可以帮助的话:
return Container(
child: Row(
children: <Widget>[
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),
],
),),
),
);
}
}
快乐编码!!