prefer_const_declarations on local variables (#14358)
This commit is contained in:
committed by
GitHub
parent
b0e17949aa
commit
841d5d7bd5
@@ -514,8 +514,8 @@ class _HasGoodToStringDeep extends Matcher {
|
||||
// If a toStringDeep method doesn't properly handle nested values that
|
||||
// contain line breaks it can fail to add the required prefixes to all
|
||||
// lined when toStringDeep is called specifying prefixes.
|
||||
final String prefixLineOne = 'PREFIX_LINE_ONE____';
|
||||
final String prefixOtherLines = 'PREFIX_OTHER_LINES_';
|
||||
const String prefixLineOne = 'PREFIX_LINE_ONE____';
|
||||
const String prefixOtherLines = 'PREFIX_OTHER_LINES_';
|
||||
final List<String> prefixIssues = <String>[];
|
||||
String descriptionWithPrefixes =
|
||||
object.toStringDeep(prefixLineOne: prefixLineOne, prefixOtherLines: prefixOtherLines);
|
||||
|
||||
@@ -113,7 +113,7 @@ void main() {
|
||||
testWidgets('fails with a custom description in the message', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(const Text('foo', textDirection: TextDirection.ltr));
|
||||
|
||||
final String customDescription = 'custom description';
|
||||
const String customDescription = 'custom description';
|
||||
TestFailure failure;
|
||||
try {
|
||||
expect(find.byElementPredicate((_) => false, description: customDescription), findsOneWidget);
|
||||
@@ -130,7 +130,7 @@ void main() {
|
||||
testWidgets('fails with a custom description in the message', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(const Text('foo', textDirection: TextDirection.ltr));
|
||||
|
||||
final String customDescription = 'custom description';
|
||||
const String customDescription = 'custom description';
|
||||
TestFailure failure;
|
||||
try {
|
||||
expect(find.byWidgetPredicate((_) => false, description: customDescription), findsOneWidget);
|
||||
|
||||
Reference in New Issue
Block a user