I recommend you read this after reading My Dart Notes.
this document is a reminder of everything Dart related ! There is a different one for flutter.
Why ? Because I have a problem, I don’t limit myself to a few languages like normal human beings, I know A LOT of programming languages, and when you don’t use a language long enough, you start messing up which syntax works where, so I create those small “Reminder” pages that I can skim through in an hour before I start working with any language after leaving it for some time !
Mind you, I eventually lose the page “in the (It is on some hard drive somewhere) and that is because after using it a couple of times, I no longer need it. but when i come across old ones, I will post them on this blog.
I am posting this one online because I am composing it now, and I haven’t lost it yet
1- react’s expo is the main alternative (Or KMP/KMM)
2- navigation, theming, and localization.
MeterialApp vs CupertinoApp….
For more on Cupertino => https://www.youtube.com/watch?v=3PdUaidHc-E&t=5s
Flutter does not embrace the native platform, it doesn’t take advantage of the apple and android stuff
Flutter’s Impeller (rendering runtime) replaces SKIA and improves the rendering on IOS (Use the GPU)
using the fragment programming api, you can create your own shaders
In react/Expo, you have to build everything (Styling/component libraries) and there is more to learn even though if you do react-web you will become react native in a few hours
react native bridge is a bottleneck, it will improve soon
If you want to have the iOS look on iOS, and the android look on android, check this out
https://dev.to/fluttertanzania/difference-between-material-cupertino-in-flutter-5ob
problem with Cupertino on android is that due to copyright issues, the fonts and other things won’t render on android !
WidgetsApp = when you want to use your own ! alternative to Material and Cupertino
Navigator 1.0: there is also 2.0 that is a little bit more complex, Small applications without complex deep linking can use Navigator, while apps with specific deep linking and navigation requirements should also use the Router to correctly handle deep links on Android and iOS,
Firebase, AWS amplify, superbase,
mediaQuerry and layout builder are gret for responsive UI and are builkt into flutter
——————–
Don’t start with flutter before getting really familiar (read and memorize, not necessarily practice), it will take longer to memorize if you don’t understand how shit works
DevTools
1- when you combine widgets, they make a widget tree
2- WIDGETS ARE EITHER STATELESS OR STATEFUL !
The above statement is wrong if we are strictly speaking, all widgets are stateless, a companion state widget is what is stateful in a stateful widget, not the widget itself
stateless widgets are immutable widgets where the only way to modify a stateless widget is to delete and recreate it
Kickoff
In flutter, within the main dart function, the kickoff is calling the runApp function.
although you can call everything directly from within the runApp, it is recommended to have runApp get a parameter of a certain class you create that returns a widget !
The main method to override in a StatelessWidget is build()
—-
the first thing inside the runApp is usually MaterialApp which implements a lot of features required in an app, such as navigation, theming, and localization. now MaterialApp is google’s material design widget implementation, you can also use CupertinoApp if you want apples design thing, or WidgetsApp if you want your own ! for now, we will use MaterialApp
When something extends StatelessWidget, the constructor should pass the OPTIONAL “key” parameter to the super class
MaterialApp = Widget
Container = Styled Box Widget
Padding = The Padding widget will adjust the spacing of its child which can be any widget of any shape or size
Probably one of the most popular widgets in an app is AppBar
————–
Flutter forms
Net Ninja: https://www.youtube.com/watch?v=2DX0TtM9Hug