RaisedPickerStyle.dark constructor
夜间
Implementation
RaisedPickerStyle.dark({bool haveRadius: false, String? title, Color? color}) {
this.headDecoration = BoxDecoration(
color: Colors.grey[800],
borderRadius:
!haveRadius ? null : 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 ?? Colors.blue, 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: Colors.white, width: 1), borderRadius: BorderRadius.circular(4)),
child: Text('取消', style: TextStyle(color: Colors.white, fontSize: 15.0)),
);
if (title != null && title != '') {
this.title = Center(child: Text(title, style: TextStyle(color: Colors.white, fontSize: 14)));
}
this.backgroundColor = Colors.grey[800]!;
this.textColor = Colors.white;
}