Commit f9602151 authored by Adam Barth's avatar Adam Barth Committed by GitHub

Remove unneeded analyzer ignores (#7109)

We don't need these anymore.
parent c2e965fd
...@@ -10,7 +10,7 @@ enum _Location { ...@@ -10,7 +10,7 @@ enum _Location {
Bermuda Bermuda
} }
typedef Widget DemoItemBodyBuilder(DemoItem<dynamic> item); typedef Widget DemoItemBodyBuilder<T>(DemoItem<T> item);
typedef String ValueToString<T>(T value); typedef String ValueToString<T>(T value);
class DualHeaderWithHint extends StatelessWidget { class DualHeaderWithHint extends StatelessWidget {
...@@ -152,7 +152,7 @@ class DemoItem<T> { ...@@ -152,7 +152,7 @@ class DemoItem<T> {
final String name; final String name;
final String hint; final String hint;
final DemoItemBodyBuilder builder; final DemoItemBodyBuilder<T> builder;
final ValueToString<T> valueToString; final ValueToString<T> valueToString;
T value; T value;
bool isExpanded = false; bool isExpanded = false;
...@@ -189,7 +189,7 @@ class _ExpansionPanelsDemoState extends State<ExpasionPanelsDemo> { ...@@ -189,7 +189,7 @@ class _ExpansionPanelsDemoState extends State<ExpasionPanelsDemo> {
value: 'Caribbean cruise', value: 'Caribbean cruise',
hint: 'Change trip name', hint: 'Change trip name',
valueToString: (String value) => value, valueToString: (String value) => value,
builder: (DemoItem<String> item) { // ignore: argument_type_not_assignable, https://github.com/flutter/flutter/issues/5771 builder: (DemoItem<String> item) {
void close() { void close() {
setState(() { setState(() {
item.isExpanded = false; item.isExpanded = false;
...@@ -223,7 +223,7 @@ class _ExpansionPanelsDemoState extends State<ExpasionPanelsDemo> { ...@@ -223,7 +223,7 @@ class _ExpansionPanelsDemoState extends State<ExpasionPanelsDemo> {
value: _Location.Bahamas, value: _Location.Bahamas,
hint: 'Select location', hint: 'Select location',
valueToString: (_Location location) => location.toString().split(".")[1], valueToString: (_Location location) => location.toString().split(".")[1],
builder: (DemoItem<_Location> item) { // ignore: argument_type_not_assignable, https://github.com/flutter/flutter/issues/5771 builder: (DemoItem<_Location> item) {
void close() { void close() {
setState(() { setState(() {
item.isExpanded = false; item.isExpanded = false;
...@@ -293,7 +293,7 @@ class _ExpansionPanelsDemoState extends State<ExpasionPanelsDemo> { ...@@ -293,7 +293,7 @@ class _ExpansionPanelsDemoState extends State<ExpasionPanelsDemo> {
value: 80.0, value: 80.0,
hint: 'Select sun level', hint: 'Select sun level',
valueToString: (double amount) => '${amount.round()}', valueToString: (double amount) => '${amount.round()}',
builder: (DemoItem<double> item) { // ignore: argument_type_not_assignable, https://github.com/flutter/flutter/issues/5771 builder: (DemoItem<double> item) {
void close() { void close() {
setState(() { setState(() {
item.isExpanded = false; item.isExpanded = false;
......
...@@ -209,7 +209,6 @@ class ListItem extends StatelessWidget { ...@@ -209,7 +209,6 @@ class ListItem extends StatelessWidget {
height: itemHeight, height: itemHeight,
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: new Row( child: new Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: children children: children
) )
) )
......
...@@ -142,9 +142,9 @@ class AssetImage extends AssetBundleImageProvider { ...@@ -142,9 +142,9 @@ class AssetImage extends AssetBundleImageProvider {
if (json == null) if (json == null)
return null; return null;
// TODO(ianh): JSON decoding really shouldn't be on the main thread. // 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);
// TODO(ianh): convert that data structure to the right types. // 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);
} }
String _chooseVariant(String main, ImageConfiguration config, List<String> candidates) { String _chooseVariant(String main, ImageConfiguration config, List<String> candidates) {
......
...@@ -25,7 +25,7 @@ abstract class UniqueWidget<T extends State<StatefulWidget>> extends StatefulWid ...@@ -25,7 +25,7 @@ abstract class UniqueWidget<T extends State<StatefulWidget>> extends StatefulWid
/// The [key] argument cannot be null because it identifies the unique /// The [key] argument cannot be null because it identifies the unique
/// inflated instance of this widget. /// inflated instance of this widget.
UniqueWidget({ UniqueWidget({
@required GlobalKey key @required GlobalKey<T> key
}) : super(key: key) { }) : super(key: key) {
assert(key != null); assert(key != null);
} }
...@@ -37,7 +37,7 @@ abstract class UniqueWidget<T extends State<StatefulWidget>> extends StatefulWid ...@@ -37,7 +37,7 @@ abstract class UniqueWidget<T extends State<StatefulWidget>> extends StatefulWid
/// ///
/// Might be null if the widget is not currently in the tree. /// Might be null if the widget is not currently in the tree.
T get currentState { T get currentState {
GlobalKey globalKey = key; GlobalKey<T> globalKey = key;
return globalKey.currentState; // ignore: return_of_invalid_type, https://github.com/flutter/flutter/issues/5771 return globalKey.currentState;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment