Here https://codelabs.developers.google.com/codelabs/first-flutter-app-pt1/#2
We are told to copy-paste some code into our main.dart including :
appBar: AppBar(
title: const Text('Welcome to Flutter'),
),
body: const Center(
child: const Text('Hello World'),
),
On the next page, we are asking to paste new lines and update some others, but on line we don't have to touch, the const kw is disappearing from appBar title and body
https://codelabs.developers.google.com/codelabs/first-flutter-app-pt1/#3
our old pice of code became :
appBar: AppBar(
title: Text('Welcome to Flutter'),
),
body: Center(
//child: Text('Hello World'), // Replace this text...
child: Text(wordPair.asPascalCase), // With this text.
),
As a noob in Dart, I was a bit lost because I manually updated my code as following :
final wordPair = WordPair.random();
//...
child: const Text('Hello World'), // from
child: const Text(wordPair.asPascalCase) // to
and it's not working (for some reason I don't yet understand precisely but can guess, as wordPair is holding a "final" variable)
We have to remove both const from body and child, yet it's not indicated (at least for the body) nor explained, + it's also removed from appBar.title
Here https://codelabs.developers.google.com/codelabs/first-flutter-app-pt1/#2
We are told to copy-paste some code into our main.dart including :
On the next page, we are asking to paste new lines and update some others, but on line we don't have to touch, the
constkw is disappearing from appBar title and bodyhttps://codelabs.developers.google.com/codelabs/first-flutter-app-pt1/#3
our old pice of code became :
As a noob in Dart, I was a bit lost because I manually updated my code as following :
and it's not working (for some reason I don't yet understand precisely but can guess, as wordPair is holding a "final" variable)
We have to remove both
constfrombodyandchild, yet it's not indicated (at least for thebody) nor explained, + it's also removed from appBar.title