[go: nahoru, domu]

Skip to content
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

Remove unneeded analyzer ignores #7109

Merged
merged 1 commit into from
Nov 30, 2016
Merged

Conversation

abarth
Copy link
Contributor
@abarth abarth commented Nov 30, 2016

We don't need these anymore.

We don't need these anymore.
@abarth
Copy link
Contributor Author
abarth commented Nov 30, 2016

@Hixie

@@ -209,7 +209,6 @@ class ListItem extends StatelessWidget {
height: itemHeight,
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: new Row(
crossAxisAlignment: CrossAxisAlignment.center,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this an intentional change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is the default value.

@@ -142,9 +142,9 @@ class AssetImage extends AssetBundleImageProvider {
if (json == null)
return null;
// TODO(ianh): JSON decoding really shouldn't be on the main thread.
final Map<dynamic, dynamic> parsedManifest = JSON.decode(json);
final Map<String, List<String>> parsedManifest = JSON.decode(json);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not right. JSON.decode will not return a Map<String, List<String>>. It has a return type of dynamic and (if the JSON is what we expect) return a Map<String, dynamic> that happens to only contain List<String>s.

// TODO(ianh): convert that data structure to the right types.
return new SynchronousFuture<Map<dynamic, dynamic>>(parsedManifest); // ignore: return_of_invalid_type, https://github.com/flutter/flutter/issues/5771
return new SynchronousFuture<Map<String, List<String>>>(parsedManifest);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fail in strong mode, since it's an invalid cast, as far as I can tell.

GlobalKey globalKey = key;
return globalKey.currentState; // ignore: return_of_invalid_type, https://github.com/flutter/flutter/issues/5771
GlobalKey<T> globalKey = key;
return globalKey.currentState;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh. I thought I'd tried that and it didn't work for some reason. Weird.

@Hixie
Copy link
Contributor
Hixie commented Nov 30, 2016

LGTM

@abarth abarth merged commit f960215 into flutter:master Nov 30, 2016
@abarth abarth deleted the remove_ignores branch November 30, 2016 22:54
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants