Skip to content

Commit 59d8aca

Browse files
authored
Fix a few prefer_const_declarations and avoid_redundant_argument_values. (flutter#92929)
1 parent ffcd32e commit 59d8aca

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

packages/flutter/test/cupertino/text_field_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import '../widgets/editable_text_utils.dart' show OverflowWidgetTextEditingContr
2727
import '../widgets/semantics_tester.dart';
2828

2929
// On web, the context menu (aka toolbar) is provided by the browser.
30-
final bool isContextMenuProvidedByPlatform = isBrowser;
30+
const bool isContextMenuProvidedByPlatform = isBrowser;
3131

3232
class MockTextSelectionControls extends TextSelectionControls {
3333
@override

packages/flutter/test/material/text_field_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ import 'feedback_tester.dart';
3131
typedef FormatEditUpdateCallback = void Function(TextEditingValue, TextEditingValue);
3232

3333
// On web, the context menu (aka toolbar) is provided by the browser.
34-
final bool isContextMenuProvidedByPlatform = isBrowser;
34+
const bool isContextMenuProvidedByPlatform = isBrowser;
3535

3636
// On web, key events in text fields are handled by the browser.
37-
final bool areKeyEventsHandledByPlatform = isBrowser;
37+
const bool areKeyEventsHandledByPlatform = isBrowser;
3838

3939
class MaterialLocalizationsDelegate extends LocalizationsDelegate<MaterialLocalizations> {
4040
@override

packages/flutter/test/painting/image_provider_network_image_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void main() {
3636
});
3737

3838
test('Expect thrown exception with statusCode - evicts from cache and drains', () async {
39-
final int errorStatusCode = HttpStatus.notFound;
39+
const int errorStatusCode = HttpStatus.notFound;
4040
const String requestUrl = 'foo-url';
4141

4242
httpClient.request.response.statusCode = errorStatusCode;

packages/flutter_localizations/test/material/date_picker_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ void main() {
1313
late DateTime initialDate;
1414

1515
setUp(() {
16-
firstDate = DateTime(2001, DateTime.january);
16+
firstDate = DateTime(2001);
1717
lastDate = DateTime(2031, DateTime.december, 31);
1818
initialDate = DateTime(2016, DateTime.january, 15);
1919
});

0 commit comments

Comments
 (0)