Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:02,280 --> 00:00:07,480
So now that we know what Flutter is or that we at least have a rough idea about that,
2
00:00:07,500 --> 00:00:14,610
let's have a look at the architecture of a Flutter application and there, the most important thing
3
00:00:14,790 --> 00:00:21,540
which you'll see over and over throughout the course is that Flutter has that idea of building user interfaces
4
00:00:21,610 --> 00:00:22,770
as code,
5
00:00:23,070 --> 00:00:29,220
that's called UI as Code. You build a widget tree in your Flutter apps and I'll come back to that
6
00:00:29,220 --> 00:00:30,130
in a second,
7
00:00:30,150 --> 00:00:36,780
in the end the idea is that you will have no visual drag and drop editor for adding buttons or text
8
00:00:36,780 --> 00:00:39,570
inputs to your screens, to what the user sees,
9
00:00:39,570 --> 00:00:43,500
instead you'll work only in code, we'll write everything in code
10
00:00:43,500 --> 00:00:46,450
and whilst this might sound intimidating at first,
11
00:00:46,470 --> 00:00:52,020
you will see the Flutter has a really nice approach for that, which makes creating interfaces with this
12
00:00:52,050 --> 00:00:55,080
UI as Code approach a breeze.
13
00:00:55,080 --> 00:01:01,740
Now besides this core idea of how you build your apps in Flutter, this UI as Code approach, it's also
14
00:01:01,740 --> 00:01:07,680
important to understand that Flutter apps do actually embrace platform differences, whilst being based
15
00:01:07,680 --> 00:01:09,090
on one codebase.
16
00:01:09,090 --> 00:01:15,930
So we work in one project but we will still have the ability to create different user interfaces at
17
00:01:15,930 --> 00:01:20,790
some points or in some parts of our app if we need it for the different platforms
18
00:01:20,790 --> 00:01:24,060
because Android and iOS are not exactly the same.
19
00:01:24,090 --> 00:01:26,180
They're not just for different phones,
20
00:01:26,250 --> 00:01:30,000
they do have some small differences and sometimes, that doesn't matter to you
21
00:01:30,030 --> 00:01:35,610
but if it does, Flutter gives you the tools to find out on which platform you're running, so that if
22
00:01:35,610 --> 00:01:38,060
you're on Android, you can execute code A
23
00:01:38,190 --> 00:01:44,410
and if you're on iOS, you can execute code B, so Flutter gives you the full flexibility there.
24
00:01:44,430 --> 00:01:47,380
Now let's first of all have a look at that widget thing again.
25
00:01:47,400 --> 00:01:48,240
In Flutter,
26
00:01:48,240 --> 00:01:51,100
everything's a widget, that's important to understand.
27
00:01:51,180 --> 00:01:57,540
If you had an app that looks like this, then this is a bunch of widgets. For example here,
28
00:01:57,540 --> 00:02:00,040
the app bar at the top with the tabs in there,
29
00:02:00,120 --> 00:02:06,270
that's one huge widget with a lot of smaller widgets in there and all these elements on the screen are
30
00:02:06,270 --> 00:02:07,890
just widgets in the end,
31
00:02:07,950 --> 00:02:11,440
you build your entire screen, your entire app from such widgets.
32
00:02:11,640 --> 00:02:13,740
Actually the whole page is a widget
33
00:02:13,800 --> 00:02:19,080
and even the whole app is wrapped in one main widget and a widget as you will see throughout this course
34
00:02:19,290 --> 00:02:25,230
is really just a code snippet, an instruction you placed in your code, something like Please render a button
35
00:02:25,230 --> 00:02:25,500
here,
36
00:02:25,530 --> 00:02:26,410
that's a widget,
37
00:02:26,430 --> 00:02:31,260
it'll be as simple as that and your entire app is therefore built as a widget tree.
38
00:02:31,260 --> 00:02:37,110
You have this root widget which is your app itself, then you might have different screens there, on
39
00:02:37,110 --> 00:02:42,420
the different screens, you have different sections and in there you might have text inputs, text outputs,
40
00:02:42,690 --> 00:02:50,430
buttons, tabs, drop downs and a widget might hold other widgets, for example your tabs widget might hold
41
00:02:50,490 --> 00:02:51,960
individual tab widgets
42
00:02:52,380 --> 00:02:58,260
but thinking about this in an abstract way can be really difficult and therefore for now, just keep that
43
00:02:58,290 --> 00:03:00,170
term "widget tree" in mind,
44
00:03:00,270 --> 00:03:05,250
we'll have a look at how this works and how this looks and we'll actually write all the code for that
45
00:03:05,250 --> 00:03:06,160
together throughout the
46
00:03:06,190 --> 00:03:11,590
course. Now this UI as Code concept is also important,
47
00:03:11,590 --> 00:03:17,470
if you had an application that looks like this here, then as I mentioned earlier, you don't build it by
48
00:03:17,470 --> 00:03:20,460
dragging and dropping elements into a visual editor,
49
00:03:20,650 --> 00:03:22,690
you have no visual editor indeed,
50
00:03:22,720 --> 00:03:24,280
instead you only work in code.
51
00:03:24,280 --> 00:03:30,430
The code for this could look like that here and here you already get a brief preview at how these widgets
52
00:03:30,430 --> 00:03:35,320
work and how you structure your entire app with the help of these widgets, how you configure your app
53
00:03:35,320 --> 00:03:36,510
with these widgets
54
00:03:36,510 --> 00:03:42,730
and as you can see, even without understanding that code, that probably doesn't look too difficult. In
55
00:03:42,730 --> 00:03:43,030
the end,
56
00:03:43,030 --> 00:03:47,650
here we just have a bunch of instructions on what should get rendered on the screen and how the different
57
00:03:47,650 --> 00:03:49,000
things are related
58
00:03:49,000 --> 00:03:52,480
and of course you'll learn all about that throughout the course.
59
00:03:52,480 --> 00:03:55,530
So this is extremely straightforward way of building your app
60
00:03:55,600 --> 00:04:00,210
and I will introduce you to this approach carefully step-by-step.
61
00:04:00,340 --> 00:04:06,250
We'll build our apps from scratch and I will introduce you to the core widgets and how they work together
62
00:04:06,250 --> 00:04:13,560
step-by-step in this course. Now this one codebase thing or concept is also important to understand.
63
00:04:13,650 --> 00:04:19,440
In the end, you will have a bunch of Dart files in your project and these will make up your application
64
00:04:19,440 --> 00:04:23,680
and you build a Android and an iOS app based on that one project
65
00:04:23,730 --> 00:04:29,010
but as I mentioned, if you need to, you can still find out on which platform you are running and then
66
00:04:29,010 --> 00:04:32,310
render different content based on that platform.
67
00:04:32,310 --> 00:04:34,380
So these are the core Flutter ideas,
68
00:04:34,380 --> 00:04:38,070
again if they're not 100% clear at this point, that's normal,
69
00:04:38,070 --> 00:04:39,150
we just started,
70
00:04:39,150 --> 00:04:45,060
we'll of course use all these features and go through all these features step-by-step as we progress through
71
00:04:45,060 --> 00:04:45,600
the course.
7418
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.