MiuixWindowDropdownPreference.entry constructor

const MiuixWindowDropdownPreference.entry({
  1. Key? key,
  2. required MiuixDropdownEntry? entry,
  3. required String title,
  4. MiuixBasicComponentColors? titleColor,
  5. String? summary,
  6. MiuixBasicComponentColors? summaryColor,
  7. MiuixDropdownColors? dropdownColors,
  8. Widget? startAction,
  9. Widget? bottomAction,
  10. EdgeInsetsGeometry insideMargin = MiuixBasicComponentDefaults.insideMargin,
  11. double? maxHeight,
  12. bool enabled = true,
  13. bool showValue = true,
  14. bool? collapseOnSelection = true,
  15. ValueChanged<bool>? onExpandedChange,
})

窗口级下拉偏好行(单分组)。对应 Kotlin WindowDropdownPreference(entry)

Implementation

const MiuixWindowDropdownPreference.entry({
  super.key,
  required this.entry,
  required this.title,
  this.titleColor,
  this.summary,
  this.summaryColor,
  this.dropdownColors,
  this.startAction,
  this.bottomAction,
  this.insideMargin = MiuixBasicComponentDefaults.insideMargin,
  this.maxHeight,
  this.enabled = true,
  this.showValue = true,
  this.collapseOnSelection = true,
  this.onExpandedChange,
})  : items = const <String>[],
      selectedIndex = 0,
      entries = const <MiuixDropdownEntry>[],
      onSelectedIndexChange = null;