代码格式优化完毕

This commit is contained in:
toly
2022-03-26 21:25:40 +08:00
parent 36b5adbd7b
commit 59f8125e1a
265 changed files with 1684 additions and 1494 deletions

View File

@@ -13,18 +13,20 @@ import 'package:flutter/material.dart';
// }
class TableCellDemo extends StatelessWidget {
const TableCellDemo({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
var title = _ItemBean("单位称", "量纲", "单位", "单位名称", "单位符号");
var m = _ItemBean("长度", "L", "1m", "", "m");
var kg = _ItemBean("质量", "M", "1Kg", "千克", "Kg");
var s = _ItemBean("时间", "T", "1s", "", "s");
var a = _ItemBean("安培", "Ι", "1A", "安培", "A");
var k = _ItemBean("热力学温度", "θ", "1K", "开尔文", "K");
var mol = _ItemBean("物质的量", "N", "1mol", "摩尔", "mol");
var cd = _ItemBean("发光强度", "J", "1cd", "坎德拉", "cd");
_ItemBean title = _ItemBean("单位称", "量纲", "单位", "单位名称", "单位符号");
_ItemBean m = _ItemBean("长度", "L", "1m", "", "m");
_ItemBean kg = _ItemBean("质量", "M", "1Kg", "千克", "Kg");
_ItemBean s = _ItemBean("时间", "T", "1s", "", "s");
_ItemBean a = _ItemBean("安培", "Ι", "1A", "安培", "A");
_ItemBean k = _ItemBean("热力学温度", "θ", "1K", "开尔文", "K");
_ItemBean mol = _ItemBean("物质的量", "N", "1mol", "摩尔", "mol");
_ItemBean cd = _ItemBean("发光强度", "J", "1cd", "坎德拉", "cd");
var data = <_ItemBean>[title, m, kg, s, a, k, mol, cd];
List<_ItemBean> data = [title, m, kg, s, a, k, mol, cd];
return SingleChildScrollView(
scrollDirection: Axis.horizontal,
@@ -45,7 +47,7 @@ class TableCellDemo extends StatelessWidget {
verticalAlignment: TableCellVerticalAlignment.bottom,
child: Text(
item.name,
style: TextStyle(color: Colors.blue),
style: const TextStyle(color: Colors.blue),
)),
TableCell(
verticalAlignment: TableCellVerticalAlignment.baseline,
@@ -58,7 +60,7 @@ class TableCellDemo extends StatelessWidget {
child: Text(item.unitName)),
TableCell(
verticalAlignment: TableCellVerticalAlignment.middle,
child: Container(height: 30, child: Text(item.unit)),
child: SizedBox(height: 30, child: Text(item.unit)),
),
]))
.toList(),