Skip to content

Commit 7c8c2fd

Browse files
committed
Use return instead of temporary result variable
1 parent c5b080b commit 7c8c2fd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/flutter/lib/src/material/time_picker.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,6 @@ class _DayPeriodControl extends StatelessWidget {
647647
dayPeriodSize = defaultTheme.dayPeriodInputSize;
648648
}
649649

650-
final Widget result;
651650
OutlinedBorder amShape = resolvedShape;
652651
OutlinedBorder pmShape = resolvedShape;
653652
final bool hasRoundedBorder =
@@ -700,7 +699,7 @@ class _DayPeriodControl extends StatelessWidget {
700699
shape: pmShape,
701700
);
702701

703-
result = _DayPeriodInputPadding(
702+
return _DayPeriodInputPadding(
704703
minSize: minInteractiveSize,
705704
orientation: orientation,
706705
child: SizedBox.fromSize(
@@ -755,7 +754,7 @@ class _DayPeriodControl extends StatelessWidget {
755754
shape: pmShape,
756755
);
757756

758-
result = _DayPeriodInputPadding(
757+
return _DayPeriodInputPadding(
759758
minSize: minInteractiveSize,
760759
orientation: orientation,
761760
child: SizedBox(
@@ -769,7 +768,6 @@ class _DayPeriodControl extends StatelessWidget {
769768
),
770769
);
771770
}
772-
return result;
773771
}
774772
}
775773

0 commit comments

Comments
 (0)