Добавьте ширину к контейнеру, как показано в примере ниже
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),
],
),),
),
);
}
}
Happy Coding !!!