0

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!

Michael
  • 89
  • 2
  • 7
  • 2
    What's your flutter version? The names of the texthemes have changed. Maybe this will help: https://stackoverflow.com/a/60864190/6704033 – Er1 Nov 01 '21 at 10:41
  • My flutter version is 2.5.1. Thank you very much though! – Michael Nov 01 '21 at 10:57

1 Answers1

0

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.

Roslan Amir
  • 1,141
  • 8
  • 16