skip to Main Content

This is my widget that i want to pop up.

CustomCalendar(
                          earliestDate: DateTime.now()
                              .subtract(const Duration(days: 120 * 365)),
                          latestDate: DateTime.now()
                              .subtract(const Duration(days: 18 * 365)),
                          validationCallBack: (text) {
                          BlocProvider.of<
                                  FormValidationBloc<
                                      KnowMoreValidationResult>>(context)
                              .add(FieldUpdatedEvent(
                                  fieldName: formDefinition.dobField,
                                  value: text!.toIso8601String()));
                          return null;
                        }),

I cant seem to find a way to toggle the widget. I want the UI to initially show a textfield widget but when pressed, to pop up the above widget, has anyone implemented something like this before.

2

Answers


  1.  showDialog(
        context: context,
        barrierDismissible: false,
        builder: (context) => CustomCalendar(),
      );
    
    Login or Signup to reply.
  2. Yes, you can make a clickable text which you can create by wrapping that particular text inside the onTap widget of flutter and then you can popup the CustomCalendar widget

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search