isProduction property

bool isProduction

Indicates whether the application is running in a production environment.

The criteria for this is the ANGEL_ENV environment variable being set to 'production'.

This value is memoized the first time you call it, so do not change environment configuration at runtime!

Implementation

bool get isProduction {
  return _isProduction ??=
      (Platform.environment['ANGEL_ENV'] == 'production');
}