Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
1
00:00:02,050 --> 00:00:04,880
So let's install Flutter then.
2
2
00:00:04,880 --> 00:00:07,090
And the installation actually differs
3
3
00:00:07,090 --> 00:00:09,630
between Mac OS and Windows.
4
4
00:00:09,630 --> 00:00:12,190
For the rest of the course the code we write
5
5
00:00:12,190 --> 00:00:13,690
and so on will be the same.
6
6
00:00:13,690 --> 00:00:15,820
But here for the installation, it differs.
7
7
00:00:15,820 --> 00:00:18,250
So therefore, in this video,
8
8
00:00:18,250 --> 00:00:22,570
we'll set up Flutter and all the surrounding packages
9
9
00:00:22,570 --> 00:00:24,710
and dependencies we need for Mac.
10
10
00:00:24,710 --> 00:00:26,050
And then the next video,
11
11
00:00:26,050 --> 00:00:27,760
we'll do the same for Windows.
12
12
00:00:27,760 --> 00:00:30,060
So if you are a Windows user,
13
13
00:00:30,060 --> 00:00:31,990
you can simply skip this video.
14
14
00:00:31,990 --> 00:00:33,430
And if you are a Mac user,
15
15
00:00:33,430 --> 00:00:35,360
you can skip the next video.
16
16
00:00:35,360 --> 00:00:37,850
So let's proceed with the Mac setup then.
17
17
00:00:37,850 --> 00:00:42,850
on Flutter.io, you can simply click on get started,
18
18
00:00:43,430 --> 00:00:46,000
and then choose install on Mac OS.
19
19
00:00:46,000 --> 00:00:47,340
By the way, if you're on Linux,
20
20
00:00:47,340 --> 00:00:48,940
the steps are pretty much the same.
21
21
00:00:48,940 --> 00:00:51,140
But you can also click on install on Linux,
22
22
00:00:51,140 --> 00:00:52,640
to see them in detail.
23
23
00:00:52,640 --> 00:00:55,860
And that's in general what I would recommend.
24
24
00:00:55,860 --> 00:00:58,200
Go through these steps in detail.
25
25
00:00:58,200 --> 00:01:01,040
The good thing is you can read them here.
26
26
00:01:01,040 --> 00:01:02,430
And I strongly recommend,
27
27
00:01:02,430 --> 00:01:04,750
following along here and reading these,
28
28
00:01:04,750 --> 00:01:06,830
whilst you also watch this video,
29
29
00:01:06,830 --> 00:01:10,010
or whilst you are going through the installation process.
30
30
00:01:10,010 --> 00:01:15,010
Because A, some tiny steps could change over time.
31
31
00:01:15,080 --> 00:01:18,870
And B, this is a great way of resolving issues,
32
32
00:01:18,870 --> 00:01:21,800
since there might be something you overlook in the video.
33
33
00:01:21,800 --> 00:01:24,830
Which you can then simply read about in this article.
34
34
00:01:24,830 --> 00:01:26,490
So let's continue.
35
35
00:01:26,490 --> 00:01:29,140
First of all, let's check the system requirements.
36
36
00:01:29,140 --> 00:01:30,650
Well, we need the operating system,
37
37
00:01:30,650 --> 00:01:32,130
Mac OS obviously.
38
38
00:01:32,130 --> 00:01:34,300
Enough free space on our disk.
39
39
00:01:34,300 --> 00:01:37,260
And then we depend on these command line tools,
40
40
00:01:37,260 --> 00:01:40,410
which actually should all be available by default.
41
41
00:01:40,410 --> 00:01:43,400
Now Git might not be,
42
42
00:01:43,400 --> 00:01:47,300
so it's a good idea to download it before you get started.
43
43
00:01:47,300 --> 00:01:51,180
You can simply search for Git on Google,
44
44
00:01:51,180 --> 00:01:52,930
and then actually pick that first,
45
45
00:01:52,930 --> 00:01:57,080
or actually that second link to find the downloads page.
46
46
00:01:57,080 --> 00:01:59,900
And there simply choose Mac OS or Linux,
47
47
00:01:59,900 --> 00:02:01,040
depending on what you're on.
48
48
00:02:01,040 --> 00:02:04,610
And then, the download should start automatically.
49
49
00:02:04,610 --> 00:02:07,820
If it doesn't, you can simply click here obviously.
50
50
00:02:07,820 --> 00:02:09,920
And this will download an installer,
51
51
00:02:09,920 --> 00:02:12,180
for which you can simply work to install Git.
52
52
00:02:12,180 --> 00:02:14,220
which is a Version Management System,
53
53
00:02:14,220 --> 00:02:15,680
on your machine.
54
54
00:02:15,680 --> 00:02:18,530
Now you don't need to use that Version Management System,
55
55
00:02:18,530 --> 00:02:20,720
but Flutter uses it behind the scenes.
56
56
00:02:20,720 --> 00:02:23,020
This is why you need to have this available.
57
57
00:02:23,020 --> 00:02:24,473
Once you've got Git installed,
58
58
00:02:24,473 --> 00:02:26,810
with the help of that installer you can download.
59
59
00:02:26,810 --> 00:02:28,700
Which I showed you a second ago,
60
60
00:02:28,700 --> 00:02:30,610
you can proceed with these steps.
61
61
00:02:30,610 --> 00:02:33,440
And the next step is to actually download Flutter.
62
62
00:02:33,440 --> 00:02:35,810
Now, at the point of time recording this,
63
63
00:02:35,810 --> 00:02:37,800
the latest version is 0.3.2 beta.
64
64
00:02:39,685 --> 00:02:42,150
Chances are that when you're watching this,
65
65
00:02:42,150 --> 00:02:44,420
there's a higher version available.
66
66
00:02:44,420 --> 00:02:47,260
But the code we write will still be the same.
67
67
00:02:47,260 --> 00:02:50,450
So download the latest version you're seeing here of course.
68
68
00:02:50,450 --> 00:02:52,800
Now I'll go with this one.
69
69
00:02:52,800 --> 00:02:55,230
Simply download it to your machine.
70
70
00:02:55,230 --> 00:02:56,240
And this can take a while,
71
71
00:02:56,240 --> 00:02:57,900
as you can see it's quite a big file.
72
72
00:02:57,900 --> 00:02:59,900
So I will jump forward,
73
73
00:02:59,900 --> 00:03:03,093
to the point of time where this already is downloaded.
74
74
00:03:04,090 --> 00:03:06,150
The installation just finished for me,
75
75
00:03:06,150 --> 00:03:08,100
you can now simply unzip this.
76
76
00:03:08,100 --> 00:03:10,630
And you can do that with the command you see here,
77
77
00:03:10,630 --> 00:03:13,810
or simply well, click on that downloaded file.
78
78
00:03:13,810 --> 00:03:18,190
Simply open it in the folder where it was downloaded.
79
79
00:03:18,190 --> 00:03:20,940
Simply click on it down there.
80
80
00:03:20,940 --> 00:03:22,410
And then unzip this.
81
81
00:03:22,410 --> 00:03:24,190
Now this can take a couple of seconds of course,
82
82
00:03:24,190 --> 00:03:26,740
since it's a rather big file.
83
83
00:03:26,740 --> 00:03:28,550
Once it is unzipped,
84
84
00:03:28,550 --> 00:03:30,550
you have this Flutter folder.
85
85
00:03:30,550 --> 00:03:32,530
And now you should copy this somewhere,
86
86
00:03:32,530 --> 00:03:33,800
where do you wanna store this.
87
87
00:03:33,800 --> 00:03:36,010
Now this Flutter thing here,
88
88
00:03:36,010 --> 00:03:37,760
is an entire tool set.
89
89
00:03:37,760 --> 00:03:41,190
It's the SDK, the Software Development Kit,
90
90
00:03:41,190 --> 00:03:43,680
you need for developing Flutter apps.
91
91
00:03:43,680 --> 00:03:46,550
It includes a lot of dependencies Flutter needs.
92
92
00:03:46,550 --> 00:03:49,470
So this is really a central package of program,
93
93
00:03:49,470 --> 00:03:50,860
you should store in your machine.
94
94
00:03:50,860 --> 00:03:54,510
And you can copy it wherever you want on your machine.
95
95
00:03:54,510 --> 00:03:56,500
Now I got that tools folder,
96
96
00:03:56,500 --> 00:03:57,333
where I wanna have it.
97
97
00:03:57,333 --> 00:03:59,450
So I'll just drag it over there.
98
98
00:03:59,450 --> 00:04:02,490
And now with Flutter added to that folder,
99
99
00:04:02,490 --> 00:04:04,280
we can proceed with well,
100
100
00:04:04,280 --> 00:04:06,570
the installation or with using it.
101
101
00:04:06,570 --> 00:04:07,990
So the Flutter tool,
102
102
00:04:07,990 --> 00:04:11,200
is actually a tool we execute from the command line.
103
103
00:04:11,200 --> 00:04:14,530
Therefore, we need to add it to our path.
104
104
00:04:14,530 --> 00:04:17,020
The path is basically a global variable,
105
105
00:04:17,020 --> 00:04:19,360
which ensures that the Flutter program,
106
106
00:04:19,360 --> 00:04:21,270
or which ensures that any program,
107
107
00:04:21,270 --> 00:04:23,320
can be accessed through the command line.
108
108
00:04:23,320 --> 00:04:25,450
And we wanna configure the Flutter program
109
109
00:04:25,450 --> 00:04:26,820
to be found there.
110
110
00:04:26,820 --> 00:04:27,910
Now to be found there,
111
111
00:04:27,910 --> 00:04:31,070
we could execute this command in the command line.
112
112
00:04:31,070 --> 00:04:35,650
If we navigated into the newly created Flutter folder,
113
113
00:04:35,650 --> 00:04:37,960
or we do something which is seen
114
114
00:04:37,960 --> 00:04:40,100
a little bit further down the article.
115
115
00:04:40,100 --> 00:04:42,960
Here, we update our path permanently.
116
116
00:04:42,960 --> 00:04:44,270
Now how does that work?
117
117
00:04:44,270 --> 00:04:46,560
For that you should go into your user folder,
118
118
00:04:46,560 --> 00:04:49,370
and there you need to turn on the setting
119
119
00:04:49,370 --> 00:04:50,950
to see hidden files.
120
120
00:04:50,950 --> 00:04:53,750
You should then see that bash profile file.
121
121
00:04:53,750 --> 00:04:57,550
Important if you're on Mac OS Catalina or higher,
122
122
00:04:57,550 --> 00:05:01,480
It will not be a bash profile file,
123
123
00:05:01,480 --> 00:05:05,420
but a .zprofile file.
124
124
00:05:05,420 --> 00:05:07,180
It fulfills the same purpose,
125
125
00:05:07,180 --> 00:05:08,710
it's just a different name,
126
126
00:05:08,710 --> 00:05:11,480
and you should then edit that file.
127
127
00:05:11,480 --> 00:05:12,700
Another important note,
128
128
00:05:12,700 --> 00:05:14,980
if you see neither of these files.
129
129
00:05:14,980 --> 00:05:17,700
If you don't have such a profile file,
130
130
00:05:17,700 --> 00:05:20,720
whatever name it is for your Operating System.
131
131
00:05:20,720 --> 00:05:21,970
You can simply create it.
132
132
00:05:21,970 --> 00:05:24,070
Simply create a Text file,
133
133
00:05:24,070 --> 00:05:26,880
insert what we're about to insert in the next seconds,
134
134
00:05:26,880 --> 00:05:30,130
and then save it under .bash profile,
135
135
00:05:30,130 --> 00:05:33,397
for Mac OS older than Catalina,
136
136
00:05:33,397 --> 00:05:34,230
and .zprofile for Mac OS after Catalina.
137
137
00:05:38,980 --> 00:05:40,870
Now you can simply open that,
138
138
00:05:40,870 --> 00:05:43,160
with the normal Text editor app,
139
139
00:05:43,160 --> 00:05:45,920
or with any Text editor of your choice.
140
140
00:05:45,920 --> 00:05:47,680
If you're using the Text editor app,
141
141
00:05:47,680 --> 00:05:52,030
just make sure you're viewing this in plain text mode,
142
142
00:05:52,030 --> 00:05:53,890
not in rich text mode.
143
143
00:05:53,890 --> 00:05:55,860
So if you open this then.
144
144
00:05:55,860 --> 00:05:57,360
Let me make this a bit bigger.
145
145
00:05:58,440 --> 00:05:59,670
You can edit this file.
146
146
00:05:59,670 --> 00:06:02,300
And this basically configures path settings,
147
147
00:06:02,300 --> 00:06:03,870
for your terminal.
148
148
00:06:03,870 --> 00:06:07,150
For your command line tool on Mac or Linux.
149
149
00:06:07,150 --> 00:06:09,640
Now, we wanna add something here.
150
150
00:06:09,640 --> 00:06:11,160
We wanna add this line,
151
151
00:06:11,160 --> 00:06:14,074
which you can find in the installation steps.
152
152
00:06:14,074 --> 00:06:16,620
Simply add it at the bottom.
153
153
00:06:16,620 --> 00:06:19,600
And we need to replace this part here,
154
154
00:06:19,600 --> 00:06:21,880
with the actual path.
155
155
00:06:21,880 --> 00:06:26,280
The folder path to that Flutter tool on our machine.
156
156
00:06:26,280 --> 00:06:30,310
Now that of course depends on where you dragged it.
157
157
00:06:30,310 --> 00:06:34,370
For me, it can be found under users,
158
158
00:06:34,370 --> 00:06:38,510
then my username, then there's a development folder.
159
159
00:06:38,510 --> 00:06:40,810
And then there I created a tools folder.
160
160
00:06:40,810 --> 00:06:43,910
And again, you really have to pick your path there,
161
161
00:06:43,910 --> 00:06:46,740
where you dragged that Flutter tool.
162
162
00:06:46,740 --> 00:06:50,120
Can view that also by clicking on get info here,
163
163
00:06:50,120 --> 00:06:51,470
then you can see where it's found.
164
164
00:06:51,470 --> 00:06:55,930
In my case users, my user name, development tools.
165
165
00:06:55,930 --> 00:06:57,970
With that, simply save that file,
166
166
00:06:57,970 --> 00:07:01,530
and thereafter open your normal terminal app
167
167
00:07:01,530 --> 00:07:03,750
on Mac or Linux.
168
168
00:07:03,750 --> 00:07:05,160
Once you did open that,
169
169
00:07:05,160 --> 00:07:08,710
you should be able to run Flutter doctor.
170
170
00:07:08,710 --> 00:07:10,710
Now this is a tool which will also check,
171
171
00:07:10,710 --> 00:07:13,130
if you need to do something to make Flutter work.
172
172
00:07:13,130 --> 00:07:16,290
And it should at least do something,
173
173
00:07:16,290 --> 00:07:19,090
if you set up your Flutter installation correctly.
174
174
00:07:19,090 --> 00:07:21,600
By the way, the fact that my installation is 30 days old,
175
175
00:07:21,600 --> 00:07:22,820
we can ignore that here.
176
176
00:07:22,820 --> 00:07:26,240
Because we know we just downloaded the latest version,
177
177
00:07:26,240 --> 00:07:27,830
0.3.2 in my case.
178
178
00:07:27,830 --> 00:07:29,580
So this is all fine.
179
179
00:07:29,580 --> 00:07:32,130
Now this is already looking quite good here,
180
180
00:07:32,130 --> 00:07:35,320
because I actually have a decent setup.
181
181
00:07:35,320 --> 00:07:38,580
I'll still walk you through the remaining steps here though.
182
182
00:07:38,580 --> 00:07:40,700
So we updated our path.
183
183
00:07:40,700 --> 00:07:43,220
We now ran flutter doctor too.
184
184
00:07:43,220 --> 00:07:44,300
Now what we need to do is,
185
185
00:07:44,300 --> 00:07:46,350
we need to configure our system
186
186
00:07:46,350 --> 00:07:51,163
to be able to build iOS and or Android apps.
187
187
00:07:52,010 --> 00:07:54,690
For that, If you wanna build iOS apps.
188
188
00:07:54,690 --> 00:07:56,370
If you wanna test your app on iOS,
189
189
00:07:56,370 --> 00:07:59,180
and ultimately build it for that platform.
190
190
00:07:59,180 --> 00:08:00,820
You need to install Xcode.
191
191
00:08:00,820 --> 00:08:03,910
Which is Apple's development IDE,
192
192
00:08:03,910 --> 00:08:08,200
but also a absolutely required tool for building iOS apps.
193
193
00:08:08,200 --> 00:08:11,300
Even if you use Flutter and no native code for that.
194
194
00:08:11,300 --> 00:08:13,170
So install Xcode,
195
195
00:08:13,170 --> 00:08:16,350
by downloading it from the Mac App Store.
196
196
00:08:16,350 --> 00:08:18,570
And once you got installed,
197
197
00:08:18,570 --> 00:08:20,490
you need to make sure that you can use,
198
198
00:08:20,490 --> 00:08:23,230
the so called Xcode command-line tools.
199
199
00:08:23,230 --> 00:08:26,500
And this can be done by simply copy and pasting,
200
200
00:08:26,500 --> 00:08:29,170
this command into your terminal.
201
201
00:08:29,170 --> 00:08:31,250
So you can simply run this.
202
202
00:08:31,250 --> 00:08:33,993
You might be prompted to enter your password there.
203
203
00:08:35,630 --> 00:08:37,700
And then it might or might not do something,
204
204
00:08:37,700 --> 00:08:40,130
depending on whether you already configured this.
205
205
00:08:40,130 --> 00:08:42,900
It might prompt you to accept the license.
206
206
00:08:42,900 --> 00:08:45,310
Once you've completed this step,
207
207
00:08:45,310 --> 00:08:48,210
you can continue to step number three.
208
208
00:08:48,210 --> 00:08:49,510
And execute this command,
209
209
00:08:49,510 --> 00:08:52,800
to accept the license agreements of Xcodebuild.
210
210
00:08:52,800 --> 00:08:54,850
Which is the build tool we're going to use.
211
211
00:08:54,850 --> 00:08:57,340
Now here we can simply scroll to the bottom,
212
212
00:08:57,340 --> 00:09:00,693
which can be sped up by hitting space a couple of times.
213
213
00:09:01,660 --> 00:09:04,013
And then type agree down there.
214
214
00:09:05,070 --> 00:09:07,340
Now with that out of the way we can continue.
215
215
00:09:07,340 --> 00:09:09,880
And we can bring up the iOS simulator.
216
216
00:09:09,880 --> 00:09:13,710
Which simply is iPhone running on our machine.
217
217
00:09:13,710 --> 00:09:15,870
It can be started with this command.
218
218
00:09:15,870 --> 00:09:18,900
You could also start it from within the Xcode by the way.
219
219
00:09:18,900 --> 00:09:21,310
But I will simply start it with this command.
220
220
00:09:21,310 --> 00:09:25,690
Open dash A Simulator with a capital S.
221
221
00:09:25,690 --> 00:09:27,760
And now what this should do,
222
222
00:09:27,760 --> 00:09:32,560
is it should bring up this iOS simulator here.
223
223
00:09:32,560 --> 00:09:34,080
Now this is the device running,
224
224
00:09:34,080 --> 00:09:37,530
you can change the type of phone you're emulating here,
225
225
00:09:37,530 --> 00:09:40,900
from that menu device, and then iOS,
226
226
00:09:40,900 --> 00:09:42,950
and then choose your favorite device here.
227
227
00:09:42,950 --> 00:09:44,960
And now with that up and running,
228
228
00:09:44,960 --> 00:09:46,100
what you can do is,
229
229
00:09:46,100 --> 00:09:48,280
you can start your Flutter app.
230
230
00:09:48,280 --> 00:09:51,740
By running Flutter run in the command prompt.
231
231
00:09:51,740 --> 00:09:55,670
Now for that, we need a Flutter app though, right.
232
232
00:09:55,670 --> 00:09:57,940
Because right now we only install Flutter,
233
233
00:09:57,940 --> 00:10:01,100
but we haven't set up a Flutter app, a new project.
234
234
00:10:01,100 --> 00:10:02,290
So let's quickly do that.
235
235
00:10:02,290 --> 00:10:03,123
And for that,
236
236
00:10:03,123 --> 00:10:05,610
you should first of all navigate into the folder,
237
237
00:10:05,610 --> 00:10:08,010
where you want to create your Flutter app.
238
238
00:10:08,010 --> 00:10:10,360
Once you navigated into that folder,
239
239
00:10:10,360 --> 00:10:12,770
where you want to create your new Flutter project.
240
240
00:10:12,770 --> 00:10:15,570
Run, Flutter, create, and then the name.
241
241
00:10:15,570 --> 00:10:17,920
For example, first underscore app.
242
242
00:10:17,920 --> 00:10:20,730
Important, this project name must
243
243
00:10:20,730 --> 00:10:23,210
not contain dashes or white spaces.
244
244
00:10:23,210 --> 00:10:25,750
It should be using underscores instead,
245
245
00:10:25,750 --> 00:10:28,290
or it will be one word only.
246
246
00:10:28,290 --> 00:10:31,610
Hit enter, and this will now set up a new Flutter project
247
247
00:10:31,610 --> 00:10:33,810
in that specified location.
248
248
00:10:33,810 --> 00:10:37,370
A new sub folder which holds that project to be precise.
249
249
00:10:37,370 --> 00:10:38,853
Can take a couple of seconds.
250
250
00:10:40,400 --> 00:10:41,670
And once it's done,
251
251
00:10:41,670 --> 00:10:44,460
you can navigate into this newly created folder.
252
252
00:10:44,460 --> 00:10:46,920
In my case, it's named first underscore app.
253
253
00:10:46,920 --> 00:10:49,510
And then hit Flutter run.
254
254
00:10:49,510 --> 00:10:50,870
Enter this, hit enter.
255
255
00:10:50,870 --> 00:10:53,770
And with the iOS simulator up and running,
256
256
00:10:53,770 --> 00:10:56,390
you should be able to see that Flutter app
257
257
00:10:56,390 --> 00:11:00,130
on that iOS simulator momentarily.
258
258
00:11:00,130 --> 00:11:02,980
The first build or the first time you run this,
259
259
00:11:02,980 --> 00:11:05,720
can take a couple of seconds longer, by the way.
260
260
00:11:05,720 --> 00:11:06,553
Here we are.
261
261
00:11:06,553 --> 00:11:09,140
Now important, keep that process running,
262
262
00:11:09,140 --> 00:11:09,973
don't quit it.
263
263
00:11:09,973 --> 00:11:12,250
You could quit it with Ctrl + C,
264
264
00:11:12,250 --> 00:11:13,920
but you wanna keep that running,
265
265
00:11:13,920 --> 00:11:16,880
so that you can always rebuild your project,
266
266
00:11:16,880 --> 00:11:19,660
and instantly ship that new version to the device.
267
267
00:11:19,660 --> 00:11:22,490
Whenever you change something in your code.
268
268
00:11:22,490 --> 00:11:25,500
So with that, you should see this.
269
269
00:11:25,500 --> 00:11:28,900
Your first Flutter app running on the iPhone.
270
270
00:11:28,900 --> 00:11:30,880
And you can hit that plus button,
271
271
00:11:30,880 --> 00:11:33,380
to see a counter that is incremented.
272
272
00:11:33,380 --> 00:11:36,230
This is an app the Flutter tool created for you.
273
273
00:11:36,230 --> 00:11:39,260
We of course didn't write any code yet.
274
274
00:11:39,260 --> 00:11:40,093
Now that's cool.
275
275
00:11:40,093 --> 00:11:42,370
And we will actually edit this a little bit,
276
276
00:11:42,370 --> 00:11:43,990
to see how we can well,
277
277
00:11:43,990 --> 00:11:46,160
work with that first Flutter app.
278
278
00:11:46,160 --> 00:11:49,880
But obviously, we also wanna build for Android, right.
279
279
00:11:49,880 --> 00:11:52,390
So let's go back to these installation docs.
280
280
00:11:52,390 --> 00:11:54,540
We're done with the iOS setup here,
281
281
00:11:54,540 --> 00:11:55,870
the simulator at least.
282
282
00:11:55,870 --> 00:11:59,110
Now if you wanna deploy to a real iOS device,
283
283
00:11:59,110 --> 00:12:02,390
you can follow these steps here.
284
284
00:12:02,390 --> 00:12:06,270
You will essentially need to plug in your real iPhone.
285
285
00:12:06,270 --> 00:12:07,580
Then also again,
286
286
00:12:07,580 --> 00:12:09,780
execute these steps to install Homebrew,
287
287
00:12:09,780 --> 00:12:12,070
and then these extra tools which you need,
288
288
00:12:12,070 --> 00:12:16,600
to be able to ship your app to a real iPhone.
289
289
00:12:16,600 --> 00:12:18,120
And once you're done with that,
290
290
00:12:18,120 --> 00:12:20,250
you can continue with these steps.
291
291
00:12:20,250 --> 00:12:23,720
And you will need to do some tweaking in Xcode,
292
292
00:12:23,720 --> 00:12:26,880
to be able to ship your app to your real device.
293
293
00:12:26,880 --> 00:12:28,710
Now, that is something I'll come back
294
294
00:12:28,710 --> 00:12:30,930
to later in this course.
295
295
00:12:30,930 --> 00:12:34,460
When we will actually test this on a real device,
296
296
00:12:34,460 --> 00:12:36,830
and also deploy the app at the end.
297
297
00:12:36,830 --> 00:12:39,440
But again, feel free to already go through these steps.
298
298
00:12:39,440 --> 00:12:40,650
They're really simple,
299
299
00:12:40,650 --> 00:12:43,120
if you wanna run this on a real device.
300
300
00:12:43,120 --> 00:12:45,720
Now I'll move on to Android for now.
301
301
00:12:45,720 --> 00:12:48,730
And for that we will need Android Studio.
302
302
00:12:48,730 --> 00:12:51,580
Just like Xcode is the official IDE,
303
303
00:12:51,580 --> 00:12:54,710
and contains all the build tools for iOS apps.
304
304
00:12:54,710 --> 00:12:57,550
Android Studio is the same for Android.
305
305
00:12:57,550 --> 00:13:00,270
So click that link to be forwarded
306
306
00:13:00,270 --> 00:13:02,940
to the download page of Android Studio.
307
307
00:13:02,940 --> 00:13:04,010
And on that page,
308
308
00:13:04,010 --> 00:13:07,990
it should automatically present to you the Mac OS download.
309
309
00:13:07,990 --> 00:13:10,940
So you can simply hit download Android Studio here.
310
310
00:13:10,940 --> 00:13:14,870
Accept these license agreements and well then download.
311
311
00:13:14,870 --> 00:13:18,120
Store this in any folder of your choice.
312
312
00:13:18,120 --> 00:13:21,430
And this again, is a little bit of a bigger file.
313
313
00:13:21,430 --> 00:13:24,683
So let's wait for this to finish before we continue.
314
314
00:13:25,670 --> 00:13:27,470
Now the download did finish.
315
315
00:13:27,470 --> 00:13:29,530
You can then simply execute that file,
316
316
00:13:29,530 --> 00:13:32,050
and it will launch an installer for you.
317
317
00:13:32,050 --> 00:13:34,893
But we also close the iOS simulator here.
318
318
00:13:36,610 --> 00:13:38,640
Now that Android Studio installer
319
319
00:13:38,640 --> 00:13:40,690
is pretty straightforward on Mac.
320
320
00:13:40,690 --> 00:13:43,343
Just drag that into that applications folder.
321
321
00:13:45,050 --> 00:13:49,320
And this will copy or install that tool in that folder,
322
322
00:13:49,320 --> 00:13:51,580
which again will take a couple of seconds,
323
323
00:13:51,580 --> 00:13:54,500
since it also unpacks that folder.
324
324
00:13:54,500 --> 00:13:56,550
And once you're done with that,
325
325
00:13:56,550 --> 00:13:59,990
let's go back to the Flutter installation page.
326
326
00:13:59,990 --> 00:14:01,810
Once you're done with that,
327
327
00:14:01,810 --> 00:14:04,040
you need to start Android Studio,
328
328
00:14:04,040 --> 00:14:05,920
and go through the setup wizard
329
329
00:14:05,920 --> 00:14:09,180
to configure everything and install everything you need.
330
330
00:14:09,180 --> 00:14:11,650
Now you could also be getting a security warning,
331
331
00:14:11,650 --> 00:14:14,210
that the opening of Android Studio was blocked,
332
332
00:14:14,210 --> 00:14:15,393
because it was from,
333
333
00:14:16,860 --> 00:14:17,693
well, from the internet,
334
334
00:14:17,693 --> 00:14:19,920
not from an identified developer.
335
335
00:14:19,920 --> 00:14:22,020
You can then open it anyways through
336
336
00:14:22,020 --> 00:14:23,973
the Mac security and privacy settings.
337
337
00:14:25,970 --> 00:14:29,280
And ultimately, this should bring up this setup wizard.
338
338
00:14:29,280 --> 00:14:31,280
Now click next on the first screen,
339
339
00:14:31,280 --> 00:14:34,230
click custom on the next screen.
340
340
00:14:34,230 --> 00:14:37,940
Next again, now here you can choose your editor theme,
341
341
00:14:37,940 --> 00:14:40,110
if you wanna have the light or the dark one.
342
342
00:14:40,110 --> 00:14:42,500
You don't need to use Android Studio
343
343
00:14:42,500 --> 00:14:44,350
as an editor for this course.
344
344
00:14:44,350 --> 00:14:45,860
And actually I won't,
345
345
00:14:45,860 --> 00:14:48,770
but you can, so I'll go with dark color here.
346
346
00:14:48,770 --> 00:14:50,680
But that is totally up to you.
347
347
00:14:50,680 --> 00:14:51,610
Now on the next screen,
348
348
00:14:51,610 --> 00:14:55,040
make sure to also check Android Virtual Device here,
349
349
00:14:55,040 --> 00:14:56,723
under the installation options.
350
350
00:14:57,740 --> 00:15:00,310
The default installation path then should be all right.
351
351
00:15:00,310 --> 00:15:02,430
Click next, and finish.
352
352
00:15:02,430 --> 00:15:05,340
And now this will download a bunch of things,
353
353
00:15:05,340 --> 00:15:08,500
and install all the SDKs and tools,
354
354
00:15:08,500 --> 00:15:10,950
you need to develop Android apps.
355
355
00:15:10,950 --> 00:15:13,990
And these will be used behind the scenes by Flutter,
356
356
00:15:13,990 --> 00:15:15,740
which is why we need them.
357
357
00:15:15,740 --> 00:15:19,800
So let me fast forward until this is also done.
358
358
00:15:19,800 --> 00:15:22,230
Now, by the way, this take a couple of minutes,
359
359
00:15:22,230 --> 00:15:24,310
so don't worry if it takes a bit longer.
360
360
00:15:24,310 --> 00:15:27,083
It downloads and installs quite a lot of things.
361
361
00:15:28,010 --> 00:15:29,760
Now the set up finished for me here.
362
362
00:15:29,760 --> 00:15:31,890
So let's click finish.
363
363
00:15:31,890 --> 00:15:33,930
And thereafter, you can click on open
364
364
00:15:33,930 --> 00:15:36,443
an existing Android Studio project.
365
365
00:15:37,550 --> 00:15:40,160
Now there simply navigate to the folder,
366
366
00:15:40,160 --> 00:15:43,530
where you just created your new Flutter app.
367
367
00:15:43,530 --> 00:15:47,290
In my case, that's that first underscore app folder.
368
368
00:15:47,290 --> 00:15:49,693
Select a whole folder and click open.
369
369
00:15:50,610 --> 00:15:52,830
And this will bring up Android Studio
370
370
00:15:52,830 --> 00:15:54,850
with that project open.
371
371
00:15:54,850 --> 00:15:57,340
Now when you open it for the first time,
372
372
00:15:57,340 --> 00:15:59,720
it will actually scan that folder.
373
373
00:15:59,720 --> 00:16:02,550
So let's wait for this to finish.
374
374
00:16:02,550 --> 00:16:05,220
And it should actually suggest to you two things.
375
375
00:16:05,220 --> 00:16:08,400
Down there, it finds something about a plugin.
376
376
00:16:08,400 --> 00:16:10,030
And there, you can simply expand this,
377
377
00:16:10,030 --> 00:16:12,260
and click on configure plugins.
378
378
00:16:12,260 --> 00:16:15,090
It actually also shows you something about the Dart files,
379
379
00:16:15,090 --> 00:16:16,740
we ignore this for now.
380
380
00:16:16,740 --> 00:16:20,600
So now choose that Flutter plugin and click Okay.
381
381
00:16:20,600 --> 00:16:22,430
And thereafter click yes,
382
382
00:16:22,430 --> 00:16:24,520
to also install that Dart plugin
383
383
00:16:24,520 --> 00:16:26,223
for which it's asking up there.
384
384
00:16:30,840 --> 00:16:33,560
Thereafter, simply restart.
385
385
00:16:33,560 --> 00:16:35,070
Now once you restarted,
386
386
00:16:35,070 --> 00:16:38,680
you may get a message at the bottom here,
387
387
00:16:38,680 --> 00:16:40,250
regarding IDE and plugin updates.
388
388
00:16:40,250 --> 00:16:41,450
If you don't, that's fine too.
389
389
00:16:41,450 --> 00:16:43,290
In my case, I do get one.
390
390
00:16:43,290 --> 00:16:45,210
So I'll simply update now,
391
391
00:16:45,210 --> 00:16:47,790
to install the latest versions of all the SDKs,
392
392
00:16:47,790 --> 00:16:48,960
and build tools I might need.
393
393
00:16:48,960 --> 00:16:51,250
And that again, will get downloaded.
394
394
00:16:51,250 --> 00:16:54,150
Which again, will take a couple of seconds.
395
395
00:16:54,150 --> 00:16:55,480
And now with all that done,
396
396
00:16:55,480 --> 00:16:56,913
let me click finish here.
397
397
00:16:58,125 --> 00:17:00,020
And now this is our Flutter project.
398
398
00:17:00,020 --> 00:17:02,220
Now I will open this in a different IDE,
399
399
00:17:02,220 --> 00:17:04,070
where it's also a bit easier to read.
400
400
00:17:04,070 --> 00:17:07,630
In a second, for now we won't work on that code here.
401
401
00:17:07,630 --> 00:17:11,110
Instead, let's run this on an emulator.
402
402
00:17:11,110 --> 00:17:14,110
For that, we can simply go to tools,
403
403
00:17:14,110 --> 00:17:15,710
and then AVD Manager.
404
404
00:17:15,710 --> 00:17:18,393
That stands for Android Virtual Device.
405
405
00:17:19,250 --> 00:17:20,690
Let's open that tool.
406
406
00:17:20,690 --> 00:17:24,140
And here I actually got some pre-configured devices.
407
407
00:17:24,140 --> 00:17:26,090
You should at least have one,
408
408
00:17:26,090 --> 00:17:28,640
that Nexus or some other device,
409
409
00:17:28,640 --> 00:17:30,750
which is created with the installation.
410
410
00:17:30,750 --> 00:17:32,980
You can always create a new virtual device,
411
411
00:17:32,980 --> 00:17:35,570
by clicking that button here at the bottom.
412
412
00:17:35,570 --> 00:17:38,700
And then you can choose which device you wanna use.
413
413
00:17:38,700 --> 00:17:40,870
Let's say the Pixel two.
414
414
00:17:40,870 --> 00:17:43,260
Continue, choose your API version.
415
415
00:17:43,260 --> 00:17:46,460
Now typically, the highest one is a good choice,
416
416
00:17:46,460 --> 00:17:48,920
or the one selected by default I should say.
417
417
00:17:48,920 --> 00:17:52,300
Not necessarily the cutting edge one, but this one.
418
418
00:17:52,300 --> 00:17:53,900
Click next again.
419
419
00:17:53,900 --> 00:17:57,060
Now here on emulator performance,
420
420
00:17:57,060 --> 00:18:00,340
you should choose the hardware emulation
421
421
00:18:00,340 --> 00:18:03,420
for a faster emulator.
422
422
00:18:03,420 --> 00:18:05,650
The other settings should be fine.
423
423
00:18:05,650 --> 00:18:07,330
Simply hit finish.
424
424
00:18:07,330 --> 00:18:09,750
And this should create that new emulator.
425
425
00:18:09,750 --> 00:18:10,880
And you can then start it,
426
426
00:18:10,880 --> 00:18:14,590
by clicking on that play button on the very right here.
427
427
00:18:14,590 --> 00:18:17,960
Now this will bring up your Android emulator.
428
428
00:18:17,960 --> 00:18:20,070
Now we can of course use that emulator,
429
429
00:18:20,070 --> 00:18:22,790
to run our Flutter app there too.
430
430
00:18:22,790 --> 00:18:24,640
And to run it, what we need to do,
431
431
00:18:24,640 --> 00:18:26,940
is we need to go back to that command line.
432
432
00:18:26,940 --> 00:18:30,120
Where we previously already ran it on the iPhone.
433
433
00:18:30,120 --> 00:18:33,190
And repeat that Flutter run command.
434
434
00:18:33,190 --> 00:18:35,150
If you still got the old one running,
435
435
00:18:35,150 --> 00:18:36,540
which you probably don't have
436
436
00:18:36,540 --> 00:18:38,520
if you shut down the old simulator.
437
437
00:18:38,520 --> 00:18:42,720
You can always quits the running process with Ctrl + C.
438
438
00:18:42,720 --> 00:18:44,080
So let's hit Flutter run,
439
439
00:18:44,080 --> 00:18:46,420
to run it on our Android emulator,
440
440
00:18:46,420 --> 00:18:49,040
once that emulator did boot up.
441
441
00:18:49,040 --> 00:18:50,870
And it will build the project
442
442
00:18:50,870 --> 00:18:53,020
with the help of the Android SDK,
443
443
00:18:53,020 --> 00:18:56,180
that was installed together with Android Studio.
444
444
00:18:56,180 --> 00:18:58,070
And that first build process,
445
445
00:18:58,070 --> 00:19:00,300
can again take a couple of seconds.
446
446
00:19:00,300 --> 00:19:02,890
Subsequent ones will be faster.
447
447
00:19:02,890 --> 00:19:04,500
And now it should be up and running.
448
448
00:19:04,500 --> 00:19:06,380
Let's view it, and there it is.
449
449
00:19:06,380 --> 00:19:07,650
This is our device,
450
450
00:19:07,650 --> 00:19:09,150
and this is our Flutter app.
451
451
00:19:09,150 --> 00:19:12,440
And we can click the plus button to increment this counter.
452
452
00:19:12,440 --> 00:19:13,520
Awesome.
453
453
00:19:13,520 --> 00:19:16,170
So this is how we install Flutter,
454
454
00:19:16,170 --> 00:19:19,680
and run it on both the iOS and Android emulators.
455
455
00:19:19,680 --> 00:19:21,630
Now if you wanna run it on real devices,
456
456
00:19:21,630 --> 00:19:24,520
you can follow the steps outlined in the documentation.
457
457
00:19:24,520 --> 00:19:25,353
But of course,
458
458
00:19:25,353 --> 00:19:27,660
we'll also run it together on the real device
459
459
00:19:27,660 --> 00:19:29,370
later in this course.
460
460
00:19:29,370 --> 00:19:31,640
For now, let's focus on the editor,
461
461
00:19:31,640 --> 00:19:33,840
with which we're going to work on this code.
39547
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.