-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Typing for extra #2315
Comments
What does typing help here? You can always safely cast fields by using |
A generic way to pass data to the interceptor. |
Guess you're right. This feature is not needed. After I understood the power of |
Also pattern matching is great when destructing extras. See https://dart.dev/language/patterns#validating-incoming-json. |
Cant pattern match with class on the map object. Too bad... |
If I have a class like: class RequestMetadata {
final int code;
RequestMetadata({required this.code});
} I can pattern match it on interceptor only with this var code = switch (options.extra) { {"code": int code} => code, _ => "" }; Not a perfect situation. |
Request Statement
Right now there is no typing for extras that could be passed to the request.
For instance, we want to pass some extra data to the interceptor.
Solution Brainstorm
No response
The text was updated successfully, but these errors were encountered: