早上好,知更鸟 2023-03-30 16:58 采纳率: 80%
浏览 8

关于Flutter的界面设计问题

这是我弄的

img

太丑了,我希望能改改,弄得更好看点,而且里面的净值小数点我希望可以标红或标绿,根据正负号来决定颜色,如何处理

代码:

Container(
              padding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Expanded(
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: <Widget>[
                        Text('基金代码:'+_funds[index].id),
                        Text(_funds[index].name),
                        Text(_funds[index].type),
                        Text('第一天:'+(_funds[index].d1 ?? 'null')),
                        Text('第二天:'+(_funds[index].d2 ?? 'null')),
                        Text('第三天:'+(_funds[index].d3 ?? 'null')),
                        Text('第四天:'+(_funds[index].d4 ?? 'null')),
                        Text('第五天:'+(_funds[index].d5 ?? 'null')),
                      ],
                    ),
                  ),
                  Column(
                    children: [
                      ElevatedButton(
                        style: ElevatedButton.styleFrom(
                          primary: Colors.green, // 按钮背景颜色
                          shape: RoundedRectangleBorder(
                            borderRadius: BorderRadius.circular(8.0), // 设置按钮圆角
                          ),
                        ),
                        onPressed: () {
                          print("Selected: ${_funds[index].name} - ${_funds[index].type} 打印自选");
                        },
                        child: Text('自选'),
                      ),
                      SizedBox(width: 8.0), // 添加间隔
                      ElevatedButton(
                        style: ElevatedButton.styleFrom(
                          primary: Colors.red, // 按钮背景颜色
                          shape: RoundedRectangleBorder(
                            borderRadius: BorderRadius.circular(8.0), // 设置按钮圆角
                          ),
                        ),
                        onPressed: () {
                          print("Selected: ${_funds[index].name} - ${_funds[index].type} 打印买入");
                        },
                        child: Text('买入'),
                      ),
                      SizedBox(width: 8.0), // 添加间隔
                      ElevatedButton(
                        style: ElevatedButton.styleFrom(
                          primary: Colors.blue, // 按钮背景颜色
                          shape: RoundedRectangleBorder(
                            borderRadius: BorderRadius.circular(8.0), // 设置按钮圆角
                          ),
                        ),
                        onPressed: () {
                          print("Selected: ${_funds[index].name} - ${_funds[index].type} 打印打印");
                        },
                        child: Text('打印'),
                      ),
                    ],
                  ),
                ],
              ),
            );

  • 写回答

1条回答 默认 最新

报告相同问题?

问题事件

  • 创建了问题 3月30日

悬赏问题

  • ¥100 速求!商品购买力最优化问题(用遗传算法求解,给出python代码)
  • ¥15 虚拟机检测,可以是封装好的DLL,可付费
  • ¥15 kafka无法正常启动(只启动了一瞬间会然后挂了)
  • ¥30 使用matlab将观测点聚合成多条目标轨迹
  • ¥15 Workbench中材料库无法更新,如何解决?
  • ¥20 如何推断此服务器配置
  • ¥15 关于github的项目怎么在pycharm上面运行
  • ¥15 内存地址视频流转RTMP
  • ¥100 有偿,谁有移远的EC200S固件和最新的Qflsh工具。
  • ¥15 有没有整苹果智能分拣线上图像数据