Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,680 --> 00:00:04,820
In the last section, we pulled up dart pad inside of our code editor, we're going to use dart pad
2
00:00:04,820 --> 00:00:08,990
throughout this course to test out very small snippets of dart code in the section.
3
00:00:08,990 --> 00:00:11,590
We're going to start off by writing a tiny bit of code.
4
00:00:11,630 --> 00:00:14,830
We'll take a break and we'll come back and talk about exactly what it's doing.
5
00:00:15,500 --> 00:00:20,270
I'm going to first get started by highlighting all of this regenerated code that I have in here already
6
00:00:20,450 --> 00:00:21,350
and deleting it.
7
00:00:21,500 --> 00:00:23,480
So we're going to start totally from scratch.
8
00:00:24,290 --> 00:00:26,990
Then we're going to write out a little bit of code together.
9
00:00:27,320 --> 00:00:29,750
We're not going to immediately talk about what this code does.
10
00:00:29,750 --> 00:00:34,130
We're going to first write out the entire program and then we'll come back and talk about every single
11
00:00:34,130 --> 00:00:35,620
line in great, great detail.
12
00:00:35,840 --> 00:00:36,770
So let's get to it.
13
00:00:36,770 --> 00:00:38,930
We're going to first get started by writing out the program.
14
00:00:39,530 --> 00:00:46,070
I'll get started by writing Void Main, a set of parentheses and then a set of curly braces.
15
00:00:47,130 --> 00:00:52,080
Then underneath that, so that entire block, I'm going to go to a new line underneath it and I'll write
16
00:00:52,080 --> 00:00:54,320
out String with a capital s.
17
00:00:54,330 --> 00:00:55,620
Notice how it's capital right there.
18
00:00:56,340 --> 00:01:01,440
I'll put down my name, another set of parentheses and then a set of curly braces.
19
00:01:02,360 --> 00:01:09,140
Then inside of here, all right, out return my name, which is Steven, and I'll make sure I get a
20
00:01:09,140 --> 00:01:11,030
semicolon at the end of this line.
21
00:01:12,070 --> 00:01:16,870
Then back inside of this main thing at the top, right here inside of these curly braces, I will write
22
00:01:16,870 --> 00:01:23,350
out var name equals my name, a set of parentheses and then a semicolon.
23
00:01:24,010 --> 00:01:26,200
And then underneath that, I'll do print.
24
00:01:27,220 --> 00:01:34,180
Another set of parentheses, a set of single quotes, and inside of here, I'll write out my name is
25
00:01:34,660 --> 00:01:40,180
and then Dollar Sign name like so and then I'll end that line with a semicolon.
26
00:01:41,050 --> 00:01:46,810
Now, if I run this code by clicking the run button up here at the top, I should see my name is Steven
27
00:01:46,810 --> 00:01:48,280
appear on the top right hand side.
28
00:01:48,940 --> 00:01:53,050
If you see any error messages down here towards the bottom right hand side, that means that you very
29
00:01:53,050 --> 00:01:55,630
likely have a very small typo inside of your code.
30
00:01:55,930 --> 00:02:00,100
And so compare your code against mine and you should be able to figure out exactly what's going wrong.
31
00:02:00,980 --> 00:02:05,840
OK, so we wrote out a very tiny program here, and then we ran it and saw some output up here on the
32
00:02:05,840 --> 00:02:06,540
right hand side.
33
00:02:07,010 --> 00:02:11,360
Now, this is obviously a very straightforward and simple program, and it might be a little bit boring.
34
00:02:11,420 --> 00:02:13,310
I can almost guarantee you that.
35
00:02:13,310 --> 00:02:17,300
Yeah, you're thinking it's kind of boring right here, but this program is going to teach us quite
36
00:02:17,300 --> 00:02:20,030
a bit about some of the basics of the dart language.
37
00:02:20,580 --> 00:02:21,760
So let's take a quick pause.
38
00:02:21,860 --> 00:02:26,210
We're going to come back to the next section and we're going to tear apart this program line by line
39
00:02:26,210 --> 00:02:28,700
and figure out exactly what's going on inside of it.
40
00:02:28,970 --> 00:02:31,120
So quick break and I'll see you in just a second.
4068
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.