Fireship · @fireship
Flutter in 100 seconds
Uploaded April 14, 2020 · Length 2:10
Summary
learn flutter UI framework for building apps on multiple platforms in 100 seconds
- flutter
- ui framework
- mobile app development
- dart programming
- cross-platform development
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
flutter a UI framework for building apps
- 0:02
on iOS Android the web and desktop at
- 0:04
its core flutter combines a high
- 0:06
performance graphics engine with the
- 0:08
dart programming language in development
- 0:10
dart provides full type safety and
- 0:11
stateful hot reload to help you build
- 0:13
reliable apps quickly in production dart
- 0:16
compiles to native machine code which
- 0:18
means your graphics will render
- 0:19
beautifully on any platform install
- 0:21
flutter then run flutter create to
- 0:23
create a new project now open the main
- 0:25
dart file this is where you build your
- 0:27
app the UI is laid out as a tree of
- 0:29
widgets and the framework provides
- 0:30
hundreds of pre-built widgets to handle
- 0:32
things like animations scrolling
- 0:34
responsive layout and more you can build
- 0:36
your own widget by extending the
- 0:38
stateless widget class you then define
- 0:40
your UI by overriding its build method
- 0:41
now it's important to understand that
- 0:43
everything in flutter is a widget this
- 0:45
method returns a widget and it's
- 0:47
children return widgets and their
- 0:48
children return widgets giving us an
- 0:50
expressive declarative UI structure
- 0:52
which you can easily Traverse using
- 0:54
flutters awesome tool whenever the input
- 0:56
data to this widget changes flutter will
- 0:58
rebuild the UI by calling your build
- 1:00
method stateless widgets are immutable
- 1:01
and don't have any internal data when
- 1:03
you have an interactive widgets where
- 1:05
the internal data might change based on
- 1:06
user input you can extend a stateful
- 1:08
widget properties defined on this class
- 1:10
can be reactive for example we might
- 1:12
have a counter that starts at zero then
- 1:14
in our build method we have one of
- 1:16
flutters built-in buttons that cause a
- 1:17
function whenever it's pressed it
- 1:19
increments the counter by coin set state
- 1:21
which tells the framework that the
- 1:22
widgets data has changed causing the UI
- 1:24
to re-render with the latest data you
- 1:26
can now play with this app on a real
- 1:27
device using the flutter run command
- 1:29
that's cool and all but let's make some
- 1:31
changes we'll go back to our source code
- 1:33
and Center the button on the middle of
- 1:34
the screen instead of writing code just
- 1:36
click on the button and hit control
- 1:38
shift R then wrap your button with a
- 1:39
center widget next change the color of
- 1:41
the button and notice how flutter
- 1:42
previews that color directly in your IDE
- 1:44
now too hot reload the app simply type
- 1:47
or into the command line it only took a
- 1:48
few milliseconds to build a new version
- 1:50
of our app and notice how the state of
- 1:52
the counter was unchanged that's what I
- 1:53
like to call an awesome developer
- 1:55
experience this has been flutter in 100
- 1:57
seconds if you want to learn more check
- 1:59
out my newly updated flutter fire based


