为什么加载这段代码我手机上什么都没显示
外面包了一层sizeBox指定高度也试过了,还是什么都没有
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
theme: ThemeData(primarySwatch: Colors.blue),
home: Scaffold(
appBar: AppBar(
title: const Text(
'Welcome!',
style: TextStyle(
color: Color.fromARGB(255, 70, 77, 77), fontSize: 20.0),
)),
body: const Column(
children: [MyHomePage()],
))));
}
class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return ListView(
children: [
Container(
width: double.infinity,
height: 200,
color: Colors.black,
),
Row(
children: [
Expanded(
flex: 2,
child: Container(
color: Colors.blue,
)),
Expanded(
flex: 1,
child: Column(
children: [
Expanded(
flex: 1,
child: Container(
color: Colors.amberAccent,
)),
Expanded(
flex: 1,
child: Container(
color: Colors.red,
))
],
))
],
)
],
);
}
}