New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flutter StatefulWidget State name collision #41
Comments
I don't see this as an issue. If your problem is having to type // Will import the entire package except for State
import 'package:dartz/dartz.dart' hide State; or // Will import only the name Option from dartz, everything else won't be imported
import 'package:dartz/dartz.dart' show Option; |
As @mateusfccp (thanks!) mentions above, Dart comes with excellent tools for dealing with name conflicts. While I agree that it is unfortunate that there is a conflict to begin with, the name Are you ok with closing this? |
@spebbe sure. I just wanted to open this so if somebody searches for this error he will find the solution. |
ah, ok! |
personally, I think it would be nice if dartz could avoid the name conflicts since lots of flutter developers are using the nice plugin. 👍 It a little bit annoying to use a prefix or hide/show (prefix will cause the syntax longer and all of them need a manually fix for every import). 😁 |
I don't think so. I hardly use |
You are absolutely right, UI should be decoupled of logic. The reason I suggest here is that if we apply dartz to value object (DDD), Either() will frequently appear to UI layer. |
Since today in my Android Studio the dart compiler values the dartz import more than the material.dart import so I have to use
when I want to use a
StatefulWidget
and some dartz objects or functions. Otherwise the app doesn't compile and throws this error message:The text was updated successfully, but these errors were encountered: