show static method

void show(
  1. BuildContext context, {
  2. int maxLength = 200,
  3. String? hintText,
  4. String? leftTag,
  5. String title = "",
  6. String? rightTag,
  7. BottomWritePickerClickCallback? onCancel,
  8. BottomWritePickerConfirmClickCallback? onConfirm,
  9. bool confirmDismiss = false,
  10. bool cancelDismiss = true,
  11. Color? rightTextColor,
  12. Color? cursorColor,
  13. String? defaultText,
  14. TextEditingController? textEditingController,
})

Implementation

static void show(BuildContext context,
    {int maxLength = 200,
    String? hintText,
    String? leftTag,
    String title = "",
    String? rightTag,
    BottomWritePickerClickCallback? onCancel,
    BottomWritePickerConfirmClickCallback? onConfirm,
    bool confirmDismiss = false,
    bool cancelDismiss = true,
    Color? rightTextColor,
    Color? cursorColor,
    String? defaultText,
    TextEditingController? textEditingController}) {
  final ThemeData theme = Theme.of(context);
  showGeneralDialog(
      context: context,
      pageBuilder: (BuildContext buildContext, Animation<double> animation,
          Animation<double> secondaryAnimation) {
        final Widget pageChild = BottomWritePicker(
          maxLength: maxLength,
          hintText:
              hintText ?? BrnIntl.of(context).localizedResource.pleaseEnter,
          leftTag: leftTag ?? BrnIntl.of(context).localizedResource.cancel,
          title: title,
          rightTag: rightTag ?? BrnIntl.of(context).localizedResource.ok,
          onConfirm: onConfirm,
          onCancel: onCancel,
          rightTextColor: rightTextColor ??
              BaseThemeConfig.instance.getConfig().commonConfig.brandPrimary,
          cursorColor: cursorColor ??
              BaseThemeConfig.instance.getConfig().commonConfig.brandPrimary,
          defaultText: defaultText,
          textEditingController: textEditingController,
        );
        return Theme(data: theme, child: pageChild);
      });
}