3.3 Setting a theme
It’s already included pubspec.yaml
Missing “in” for your intended meaning:
It’s already included in pubspec.yaml
3.3 Setting a theme
It’s already included pubspec.yaml
Missing “in” for your intended meaning:
It’s already included in pubspec.yaml
In 3.3 Setting a theme
you treat “declares” and “defines” as synonyms. I highlighted them in bold here:
This code does the following:
Declares a TextTheme
called lightTextTheme
, which uses the Google font Open Sans and has a predefined font size and weight. Most importantly, the color of the text is black.
Then it defines darkTextTheme
. In this case, the text is white.
Next, it defines a static method, light
, which returns the color tones for a light theme using the lightTextTheme
you created in step 1.
Finally, it declares a static method, dark
, which returns the color tones for a dark theme using the darkTextTheme
you created in step 2.
That’s fine for casual conversations, but please consider that these two words have specific and precise meanings in C, and most certainly they are not synonyms of each other in C. A book on any computer language should use these kinds of keywords with great care.
I’m sure you’ll be able to find a useful synonym for your intended use that doesn’t have the keyword baggage that these two have.
I’ll leave that choice as an exercise for the writer
You use these terms throughout the book, so this is quite a challenge.
One elegant possibility would be to use only “define” (as in an axiomatic mathematical system) and to avoid using “declare”.
legit way of explaining with diagram
As already reported in 2020, the divisions property of the Slider widget in Chapter 2.5 should be 9 instead of 10.
The symptom is that the middle tick can’t be selected, because it belongs to 5.5, which is rounded to 6, but when we set the slider’s value to 6, it’s closest to the next tick at 6.4.
@nflnfl thanks we will log this issue, evaluate, and fix the issue in the next update.
Uploading: IMG_20211017_201657_596.jpg…
Please i need help, my images aren’t uploading and my asset folder is in the same path with other folders
@iphie_flutter can’t see your image, can you please reupload?
On 7.11 Creating the router, on subsection Handling pop events you have…
Locate
// TOOD: Add _handlePopPage
and replace it with the following:
It should be TODO
instead of TOOD
.
Regards!
@iphie_flutter
Did you add the asset folder in the pubspec.yaml?
Yes I did , I added the assets/ to pubspec.yaml
@iphie_flutter did you make sure your assets folders have those images?
You can get them at the root folder of /02-hello-folder
Here:
If this doesn’t work, I would check the final project to see if you have the same issue. Thanks!
Of course yes, the asset folder has the images and I copied the asset folder from the GitHub link you just posted which is part of the book materials.
@iphie_flutter please try running the final project to see if it works. If it doesn’t you can upload your github project and i’ll check it out.
Sorry for late response, I have uploaded it on my GitHub , my username:ify1101.
@iphie_flutter I just tested your project here GitHub - ify1101/recipes and it works fine in the emulator. Are you trying to run it on a device?
@iphie_flutter … did you run flutter pub get in the terminal after adding your assets folder in pubspec.yaml? That could explain why it does NOT work for you but does work for @funkyboy.
Thanks @jefff9511 i just ran flutter pub get and its working
, thanks also @jomoka
Chapter -1
1.2 Flutter’s history
It runs directly on the GPU using Vulcan on Android
It should be Vulkan.