我想增加Chip()
的宽度。我该如何实现?
Chip(
elevation: 6.0,
backgroundColor: Colors.white,
shape:
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0) ),
label: Text('09AM - 10AM'),
),
答案 0 :(得分:2)
您可以使用padding
属性:
Chip(
elevation: 6.0,
backgroundColor: Colors.white,
padding: const EdgeInsets.only(left :20, right : 20),
shape:
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0)),
label: Text('09AM - 10AM'),
),
https://api.flutter.dev/flutter/material/Chip/padding.html
https://api.flutter.dev/flutter/painting/EdgeInsets-class.html