Skip to content

Instantly share code, notes, and snippets.

@zacksleo
Created March 16, 2022 05:25
Show Gist options
  • Save zacksleo/e667bd3a4b2c4d78646ae7b9daa81265 to your computer and use it in GitHub Desktop.
Save zacksleo/e667bd3a4b2c4d78646ae7b9daa81265 to your computer and use it in GitHub Desktop.
DynamoDetailScreen
import 'package:flutter/widgets.dart';
import 'package:mpcore/mpcore.dart';
class DynamoDetailScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MPScaffold(
body: Table(
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
columnWidths: {
0: FlexColumnWidth(),
1: FlexColumnWidth(),
2: FlexColumnWidth(),
3: FixedColumnWidth(28),
},
children: [
TableRow(
decoration: BoxDecoration(color: Colors.blue),
children: [
Text('产品名称', style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
Text('产品型号', style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
Text('互换型号', style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
Text('数量', style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500)),
]),
TableRow(children: [
Text('环保机油滤清器'),
Text('5408103711000', style: TextStyle(color: Colors.blue)),
Text('YG200-1012243B'),
Text('1'),
]),
TableRow(children: [
Text('环保机油滤清器'),
GestureDetector(
child: Text('5408103711000', style: TextStyle(color: Colors.blue)),
onTap: () => Navigator.pushNamed(context, '/oe-model/detail', arguments: {'id': '5408103711000'}),
),
Text('YG200-1012243B'),
Text('1'),
]),
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment