Enable avoid_redundant_argument_values lint (#91409)
This commit is contained in:
@@ -64,8 +64,8 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
||||
restorationId: 'date_picker_dialog',
|
||||
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||
initialDate: DateTime.fromMillisecondsSinceEpoch(arguments! as int),
|
||||
firstDate: DateTime(2021, 1, 1),
|
||||
lastDate: DateTime(2022, 1, 1),
|
||||
firstDate: DateTime(2021),
|
||||
lastDate: DateTime(2022),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -41,7 +41,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
||||
String? get restorationId => widget.restorationId;
|
||||
|
||||
final RestorableDateTimeN _startDate =
|
||||
RestorableDateTimeN(DateTime(2021, 1, 1));
|
||||
RestorableDateTimeN(DateTime(2021));
|
||||
final RestorableDateTimeN _endDate =
|
||||
RestorableDateTimeN(DateTime(2021, 1, 5));
|
||||
late final RestorableRouteFuture<DateTimeRange?>
|
||||
@@ -85,9 +85,9 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
||||
restorationId: 'date_picker_dialog',
|
||||
initialDateRange:
|
||||
_initialDateTimeRange(arguments! as Map<dynamic, dynamic>),
|
||||
firstDate: DateTime(2021, 1, 1),
|
||||
firstDate: DateTime(2021),
|
||||
currentDate: DateTime(2021, 1, 25),
|
||||
lastDate: DateTime(2022, 1, 1),
|
||||
lastDate: DateTime(2022),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -42,7 +42,6 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
return DropdownButton<String>(
|
||||
value: dropdownValue,
|
||||
icon: const Icon(Icons.arrow_downward),
|
||||
iconSize: 24,
|
||||
elevation: 16,
|
||||
style: const TextStyle(color: Colors.deepPurple),
|
||||
underline: Container(
|
||||
|
||||
@@ -47,7 +47,6 @@ class _ArticleDescription extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
@@ -73,7 +72,6 @@ class _ArticleDescription extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
|
||||
@@ -49,7 +49,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
},
|
||||
side: MaterialStateBorderSide.resolveWith((Set<MaterialState> states) {
|
||||
if (states.contains(MaterialState.selected)) {
|
||||
return const BorderSide(width: 1, color: Colors.red);
|
||||
return const BorderSide(color: Colors.red);
|
||||
}
|
||||
return null; // Defer to default value on the theme or widget.
|
||||
}),
|
||||
|
||||
@@ -49,7 +49,6 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Radio<int>(
|
||||
value: index,
|
||||
|
||||
@@ -39,7 +39,6 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
Widget build(BuildContext context) {
|
||||
return RangeSlider(
|
||||
values: _currentRangeValues,
|
||||
min: 0,
|
||||
max: 100,
|
||||
divisions: 5,
|
||||
labels: RangeLabels(
|
||||
|
||||
@@ -39,7 +39,6 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
Widget build(BuildContext context) {
|
||||
return Slider(
|
||||
value: _currentSliderValue,
|
||||
min: 0,
|
||||
max: 100,
|
||||
divisions: 5,
|
||||
label: _currentSliderValue.round().toString(),
|
||||
|
||||
Reference in New Issue
Block a user