Home > Enterprise >  I am using date picker in my flutter app, but when I import it I get several errors
I am using date picker in my flutter app, but when I import it I get several errors

Time:11-02

import 'package:date_range_picker/date_range_picker.dart' as DateRangePicker;

and I get the above errors:

1)Error: The getter 'display1' isn't defined for the class 'TextTheme'

2)Error: The getter 'subhead' isn't defined for the class 'TextTheme'

3)Error: The getter 'body1' isn't defined for the class 'TextTheme'

4)Error: The getter 'body2' isn't defined for the class 'TextTheme'

5)Error: The getter 'headline' isn't defined for the class 'TextTheme'

Any help? The datepicker was working great on my app until some months ago. Thank you in advance!

CodePudding user response:

Like the commenter said, you were using the older version of the TextTheme class. Each of the styles you listed have changed names. Read the link provided by the commenter above.

  • Related