1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Analysis options, fixes and format (#107)

This commit is contained in:
Brett Morgan
2019-07-04 15:48:56 +10:00
committed by GitHub
parent 01478f5e88
commit 815079cd4d
11 changed files with 69 additions and 37 deletions

View File

@@ -47,7 +47,7 @@ class PressableCard extends StatefulWidget {
final Widget child;
@override
State<StatefulWidget> createState() => new _PressableCardState();
State<StatefulWidget> createState() => _PressableCardState();
}
class _PressableCardState extends State<PressableCard>
@@ -280,7 +280,7 @@ class SongPlaceholderTile extends StatelessWidget {
void showChoices(BuildContext context, List<String> choices) {
switch (defaultTargetPlatform) {
case TargetPlatform.android:
showDialog(
showDialog<void>(
context: context,
builder: (context) {
int selectedRadio = 1;
@@ -295,7 +295,8 @@ void showChoices(BuildContext context, List<String> choices) {
title: Text(choices[index]),
value: index,
groupValue: selectedRadio,
onChanged: (value) {
// ignore: avoid_types_on_closure_parameters
onChanged: (int value) {
setState(() => selectedRadio = value);
},
);
@@ -318,7 +319,7 @@ void showChoices(BuildContext context, List<String> choices) {
);
return;
case TargetPlatform.iOS:
showCupertinoModalPopup(
showCupertinoModalPopup<void>(
context: context,
builder: (context) {
return SizedBox(