RaisedPickerStyle constructor
RaisedPickerStyle(
{ - bool haveRadius = false,
- String? title,
- Color color = Colors.blue,
})
Implementation
RaisedPickerStyle({bool haveRadius: false, String? title, Color color: Colors.blue}) {
if (haveRadius) {
this.headDecoration = BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10)));
}
this.commitButton = Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 3),
margin: const EdgeInsets.only(right: 22),
decoration: BoxDecoration(color: color, borderRadius: BorderRadius.circular(4)),
child: Text('确定', style: TextStyle(color: Colors.white, fontSize: 15.0)),
);
this.cancelButton = Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 3),
margin: const EdgeInsets.only(left: 22),
decoration: BoxDecoration(border: Border.all(color: color, width: 1), borderRadius: BorderRadius.circular(4)),
child: Text('取消', style: TextStyle(color: color, fontSize: 15.0)),
);
if (title != null && title != '') {
this.title = Center(child: Text(title, style: TextStyle(color: Colors.grey, fontSize: 14)));
}
}