ClosePickerStyle constructor

ClosePickerStyle({
  1. bool haveRadius = false,
  2. String? title,
})

日间

Implementation

ClosePickerStyle({bool haveRadius = false, String? title}) {
  if (haveRadius) {
    headDecoration = const BoxDecoration(
      color: Colors.white,
      borderRadius: BorderRadius.vertical(top: Radius.circular(10)),
    );
  }

  cancelButton = const SizedBox();
  if (title != null && title.isNotEmpty) {
    this.title = Padding(
      padding: const EdgeInsets.only(left: 16),
      child: Align(
        alignment: Alignment.centerLeft,
        child: Text(
          title,
          style: const TextStyle(color: Colors.grey, fontSize: 14),
        ),
      ),
    );
  }
  commitButton = Container(
    margin: const EdgeInsets.only(right: 12),
    child: const Icon(Icons.close, color: Colors.grey, size: 28),
  );
}