GaspardMerten / date_field

Flutter DateField and DateFormField
Other
45 stars 32 forks source link

DateField should not depend on dart:io #73

Closed GaspardMerten closed 2 months ago

GaspardMerten commented 3 months ago

Currently, we use dart:io to detect the Platform we use.

While it appears to work when building for the web (probably due to the kIsWeb condition, which prevents web code from ever accessing the dart:io calls), the static analysis from pub.dev does not agree.

torbenkeller commented 3 months ago

@GaspardMerten I think we can close this. The kIsWeb check allows to use the package also on web and for the date format evaluation, the ThemeData.platformTarget is not enough. The Browser does not provide the system region so we can not adapt to that.

GaspardMerten commented 2 months ago

We could use a plugin-like interface, this would solve the static analysis issue, what do you think about that?

torbenkeller commented 2 months ago

Which static analysis issue? On pub dev the package gets 50 of 50 possible points in the static analysis

GaspardMerten commented 2 months ago

Wow, indeed... Either I dreamed of it, or something with the new analysis system caused an issue. I remember quite clearly that it used "dart:io" 0/10.

Closing the issue.