【发布时间】:2022-09-28 11:37:00
【问题描述】:
我想将此“近期交易”移至下一行。 出于某种原因,当我实现一个滑块时,我希望“最近的交易”文本移动到下一行,它只是没有,而是与滑块保持在同一行。
我的源代码如下所示:
import \'package:flutter/material.dart\';
class BaseScreen extends StatelessWidget {
const BaseScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: SizedBox(
width: double.infinity,
height: 150,
child: ListView(
scrollDirection: Axis.horizontal,
children: [
Container(
margin: const EdgeInsets.all(15),
width: 250,
height: 100,
color: Colors.green,
alignment: Alignment.center,
child: const Text(
\'\\$5200.00\',
style: TextStyle(
fontSize: 15,
color: Colors.white,
fontWeight: FontWeight.bold),
),
),
Container(
margin: const EdgeInsets.all(15),
width: 250,
height: 100,
color: Colors.green,
alignment: Alignment.center,
child: const Text(
\'\\$1200.00\',
style: TextStyle(
fontSize: 15,
color: Colors.white,
fontWeight: FontWeight.bold),
),
),
SizedBox(height: 30),
Text(\"Recent Transactions\")
],
),
)));
}
}
我对此很陌生,我需要某种形式的指导。请帮忙。
这就是它的样子
标签: flutter