Files
FlutterUnit/lib/views/widgets/SingleChildRenderObjectWidget/Padding/node3_symmetric.dart
2020-05-03 23:05:53 +08:00

38 lines
872 B
Dart

import 'package:flutter/material.dart';
/// create by 张风捷特烈 on 2020/5/3
/// contact me by email 1981462002@qq.com
/// 说明:
// {
// "widgetId": 74,
// "name": 'Padding方向边距',
// "priority": 3,
// "subtitle":
// "EdgeInsets.symmetric用来限定水平和竖直方向的边距",
// }
class PaddingSymmetric extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
color: Colors.grey.withAlpha(22),
width: 200,
height: 150,
child: Padding(
padding: EdgeInsets.symmetric(vertical: 30,horizontal: 10),
child: _buildChild(),
),
);
}
Widget _buildChild() {
return Container(
alignment: Alignment.center,
color: Colors.cyanAccent,
width: 100,
height: 100,
child: Text("孩子"),
);
}
}