color

Colors

red

);

// Or, a test may have specifically looked for the BoxDecoration, e.g.:

expect

find

byType

BoxDecoration

),

findsOneWidget

);

});

Code after migration:

testWidgets

'Container color'

WidgetTester

tester

async

await

tester

pumpWidget

Container

color:

Colors

red

));

final

Container

container

tester

widgetList

Container

>()

first