Skip to content

Remove unneeded analyzer ignores - #7109

Merged
abarth merged 1 commit into
flutter:masterfrom
abarth:remove_ignores
Nov 30, 2016
Merged

abarth merged 1 commit into
flutter:masterfrom
abarth:remove_ignores

Conversation

@abarth

@abarth abarth commented Nov 30, 2016

Copy link
Copy Markdown
Contributor

We don't need these anymore.

We don't need these anymore.
@abarth

abarth commented Nov 30, 2016

Copy link
Copy Markdown
Contributor Author

@Hixie

height: itemHeight,
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: new Row(
crossAxisAlignment: CrossAxisAlignment.center,

Copy link
Copy Markdown
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
Copy Markdown
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.

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
Copy Markdown
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.

final Map<String, List<String>> parsedManifest = JSON.decode(json);
// 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
Copy Markdown
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
Copy Markdown
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

Hixie commented Nov 30, 2016

Copy link
Copy Markdown
Contributor

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.

3 participants