0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Non-nullable instance field 'XXXX' must be initialized.

Posted at

発生したエラー

class Cover {
  String author,

  Cover(this.author);
}
  • クラス宣言したところでauthorは初期化されなければならないと怒られていた。

解決策

class Cover {
  String author;  //「,」が間違い。「;」でフィールドを締める。

  Cover(this.author);
}
  • typo. 文末が「;」ではなく「,」になっていたことが原因。

  • これはこれとしてflutter_lintが正常に動作していない気がする。
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?