flashModes.is('on');   is producing error as TypeError: settings.flashModes.is is not a function.
So we can't use this.