extends

State

Foo

String

buttonLabel

'Click Me'

@override

Widget

build

BuildContext

context

return

ElevatedButton

onPressed:

()

async

final

newLabel

await

Navigator

pushNamed

context

'/bar'

);

setState

(()

buttonLabel

newLabel

});

},

child:

Text

buttonLabel

),

);

Timeline