質問編集履歴

1

Superクラスのコンストラクタ名と、SubClassが継承するクラス名に誤記があったため修正。

2022/10/12 20:37

投稿

SNG
SNG

score7

test CHANGED
File without changes
test CHANGED
@@ -4,18 +4,18 @@
4
4
  ```dart
5
5
  class SuperClass {
6
6
  String name;
7
- MainClass([this.name = 'taro']);
7
+ SuperClass([this.name = 'taro']);
8
8
  }
9
9
 
10
- class SubClass1 extends MainClass {
10
+ class SubClass1 extends SuperClass {
11
11
  SubClass1([name = 'taro']) : super(name); //1つめ
12
12
  }
13
13
 
14
- class SubClass2 extends MainClass {
14
+ class SubClass2 extends SuperClass {
15
15
  SubClass2([super.name = 'taro']) : super(); //2つめ
16
16
  }
17
17
 
18
- class SubClass3 extends MainClass {
18
+ class SubClass3 extends SuperClass {
19
19
  SubClass3([super.name = 'taro']) //3つめ
20
20
  }
21
21
  ```