DialogProviderPlus constructor
DialogProviderPlus(
- BuildContext context, {
- bool? dark,
- String? title,
- String? okButton,
- String? cancelButton,
Implementation
DialogProviderPlus(
this.context, {
bool? dark,
this.title,
this.okButton,
this.cancelButton,
}) {
// 这里初始化些什么
_dark = dark ?? (Theme.of(context).brightness == Brightness.dark);
_barrierColor = _dark ? kDarkBarrierColor : kLightBarrierColor;
_backgroundColor = _dark ? Colors.black54 : Colors.white70;
_textColor = _dark ? Colors.white : Colors.black87;
_borderEnableColor = _dark ? Colors.white54 : Colors.black54;
_hintColor = _dark ? Colors.white54 : Colors.black54;
}