我使用三个扩展块。当我用展开包装容器时,显示空格/行。
我无法在扩展块之间将其删除。尽管我已经使用了很多方法。
有人遇到过同样的案件吗?谢谢
enter image description here
import 'package:flutter/material.dart';
void main() async {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
backgroundColor: Color(0x000000),
body: Container(
color: Color(0x000000),
child: SizedBox.expand(
child: VariousDiscs(),
),
),
),
),
);
}
class VariousDiscs extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Expanded Column Sample'),
),
body: Center(
child: Column(
children: <Widget>[
Expanded(
child: Container(
color: Color(0xbf000000),
height: 100,
width: 100
),
),
Expanded(
child: Container(
color: Color(0xbf000000),
height: 100,
width: 100,
),
),
Expanded(
child: Container(
color: Color(0xbf000000),
height: 100,
width: 100,
),
),
],
),
),
);
}
}