MultiDataPicker constructor

MultiDataPicker({
  1. Key? key,
  2. required BuildContext context,
  3. required MultiDataPickerDelegate delegate,
  4. String title = "",
  5. TextStyle? titleTextStyle,
  6. TextStyle? confirmTextStyle,
  7. TextStyle? cancelTextStyle,
  8. List<String>? pickerTitles,
  9. double? pickerTitleFontSize,
  10. Color? pickerTitleColor,
  11. double? textFontSize,
  12. Color? textColor,
  13. Color? textSelectedColor,
  14. ScrollBehavior? behavior,
  15. ConfirmButtonClick? confirmClick,
  16. MultiDataPickerCreateWidgetCallback? createItemWidget,
  17. PickerConfig? themeData,
  18. bool sync = true,
})

Implementation

MultiDataPicker(
    {Key? key,
    required this.context,
    required this.delegate,
    this.title = "",
    this.titleTextStyle,
    this.confirmTextStyle,
    this.cancelTextStyle,
    this.pickerTitles,
    this.pickerTitleFontSize,
    this.pickerTitleColor,
    this.textFontSize,
    this.textColor,
    this.textSelectedColor,
    this.behavior,
    this.confirmClick,
    this.createItemWidget,
    this.themeData,
    this.sync = true}) {
  themeData ??= PickerConfig();
  themeData = BaseThemeConfig.instance
      .getConfig(configId: themeData!.configId)
      .pickerConfig
      .merge(themeData);
  themeData = themeData!.merge(PickerConfig(
    cancelTextStyle: BaseTextStyle.withStyle(cancelTextStyle),
    confirmTextStyle: BaseTextStyle.withStyle(confirmTextStyle),
    titleTextStyle: BaseTextStyle.withStyle(titleTextStyle),
    itemTextStyle: BaseTextStyle(color: textColor, fontSize: textFontSize),
    itemTextSelectedStyle:
        BaseTextStyle(color: textSelectedColor, fontSize: textFontSize),
  ));
}