2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Flutter でSimulator かどうか判定する

Posted at

今までは、 device_info_plus を使って、判定していたんだけど、非同期なのが気に食わなかった。

解決策

Simulator 判定には、kReleaseMode という定数を使うと良い。

kReleaseMode == false なら Simulator です。

詳しくは、

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?