getFlag<T> method

Flag getFlag<T>(
  1. String key,
  2. T defaultValue
)

Get Flag object

key : the name of the key relative to modification defaultValue: the returned value if the key is not found return Flag object. See Flag class

Implementation

Flag getFlag<T>(String key, T defaultValue) {
  if (_flagSyncStatus != FlagSyncStatus.FLAGS_FETCHED) {
    Flagship.logger(
        Level.ALL, _flagSyncStatus.warningMessage(visitorId, key));
  }
  return Flag<T>(key, defaultValue, this._visitorDelegate);
}