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?

flutter pub run build_runner build に --delete-conflicting-outputs を付けると競合発生した時に自動的にファイル削除してファイルを作成してくれるらしい

Posted at

手順

  • 構造体をfreezedにした後にflutter pub run build_runner buildコマンドを叩くことで.freeze.dartファイルを生成してくれる。
  • この時既存のfreezeファイルとのコンフリクトを検知した際に自動的にファイルを削除し、新しいファイルを作ってくれるオプションがあるらしい。
  • やりかたとしては、flutter pub run build_runner buildコマンドのあとに--delete-conflicting-outputsオプションを付けるだけ。
>  flutter pub run build_runner build --delete-conflicting-outputs

  • 個人的には手動でファイルを確実に消してから削除するほうが好みだが、こういう方法もあるという学び。
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?