GaspardMerten / date_field

Flutter DateField and DateFormField
Other
46 stars 32 forks source link

Can't start the app while importing the package #76

Closed CreeperFarm closed 3 months ago

CreeperFarm commented 3 months ago

Describe the bug I can't launch the app from the time I add import 'package:date_field/date_field.dart'; and it give me the error : `../../../.pub-cache/hosted/pub.dev/date_field-5.2.1/lib/src/widgets/field.dart:329:8: Error: 'WidgetState' isn't a type.

{ ^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/date_field-5.2.1/lib/src/widgets/field.dart:327:9: Error: The getter 'WidgetStateProperty' isn't defined for the class '_DateTimeFieldState'. - '_DateTimeFieldState' is from 'package:date_field/src/widgets/field.dart' ('../../../.pub-cache/hosted/pub.dev/date_field-5.2.1/lib/src/widgets/field.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'WidgetStateProperty'. WidgetStateProperty.resolveAs( ^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/date_field-5.2.1/lib/src/widgets/field.dart:328:7: Error: The getter 'WidgetStateMouseCursor' isn't defined for the class '_DateTimeFieldState'. - '_DateTimeFieldState' is from 'package:date_field/src/widgets/field.dart' ('../../../.pub-cache/hosted/pub.dev/date_field-5.2.1/lib/src/widgets/field.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'WidgetStateMouseCursor'. WidgetStateMouseCursor.clickable, ^^^^^^^^^^^^^^^^^^^^^^ ../../../.pub-cache/hosted/pub.dev/date_field-5.2.1/lib/src/widgets/field.dart:330:24: Error: The getter 'WidgetState' isn't defined for the class '_DateTimeFieldState'. - '_DateTimeFieldState' is from 'package:date_field/src/widgets/field.dart' ('../../../.pub-cache/hosted/pub.dev/date_field-5.2.1/lib/src/widgets/field.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'WidgetState'. if (!_enabled) WidgetState.disabled, ^^^^^^^^^^^` **To Reproduce** Steps to reproduce the behavior: 1. On a page add `import 'package:date_field/date_field.dart';` 2. Launch the app 3. See error **Expected behavior** I can't start the app from the time I try to import the package **Screenshots** image ![SCR-20240812-mytj](https://github.com/user-attachments/assets/60524431-353b-4af8-b334-8e7c07fb831a) **Smartphone :** - Device: iPhone 15 Pro Max - OS: iOS 17.5
CreeperFarm commented 3 months ago

After upgrading flutter the error is now gone