Files
FlutterUnit/lib/views/widgets/StatelessWidget/VerticalDivider/node1_base.dart
2020-05-03 23:05:53 +08:00

34 lines
939 B
Dart

import 'package:flutter/material.dart';
/// create by 张风捷特烈 on 2020/4/27
/// contact me by email 1981462002@qq.com
/// 说明:
// {
// "widgetId": 35,
// "priority": 1,
// "name": "VerticalDivider颜色和粗细",
// "subtitle": "【color】: 颜色 【Color】\n"
// "【thickness】: 线粗细 【double】",
// }
class CustomVerticalDivider extends StatelessWidget {
@override
Widget build(BuildContext context) {
var dataColor = [
Colors.red, Colors.yellow,
Colors.blue, Colors.green];
var dataThickness = [1.0, 2.0, 4.0, 6.0];
var data = Map.fromIterables(dataColor, dataThickness);
return Container(
height: 150,
child: Row(
mainAxisSize: MainAxisSize.min,
children: dataColor
.map((e) => VerticalDivider(
color: e,
thickness: data[e],
))
.toList(),
),
);
}
}