Home > other >  Error: No named parameter with the name 'selectableDayPredicate'
Error: No named parameter with the name 'selectableDayPredicate'

Time:11-04

My code was working great until a few days ago. I get this error. My code is like that

FormBuilderDateRangePicker(
    onChanged: (val) => onEditing(val),
    selectableDayPredicate: (DateTime val) => val.isAfter(DateTime.now()) ? false : true,//here it throws the error
    autofocus: true,
    locale: Locale(_myLocale),
    name: "choose_date_range",
    firstDate: DateTime(2017),
    lastDate: DateTime( DateTime.now().year 1),
    format: DateFormat("yyyy-MM-dd"),
    ...

Any thoughts?

CodePudding user response:

You are using parameters for the FormBuilderDateTimePicker class but calling FormBuilderDateRangePicker class

  • Related