react-native-firebase/lib/modules/links/NavigationParameters.js

32 lines
704 B
JavaScript
Raw Normal View History

/**
* @flow
* NavigationParameters representation wrapper
*/
import type DynamicLink from './DynamicLink';
import type { NativeNavigationParameters } from './types';
export default class NavigationParameters {
2018-03-23 14:36:16 +00:00
_forcedRedirectEnabled: boolean | void;
_link: DynamicLink;
constructor(link: DynamicLink) {
this._link = link;
}
/**
*
* @param forcedRedirectEnabled
* @returns {DynamicLink}
*/
2018-03-23 14:36:16 +00:00
setForcedRedirectEnabled(forcedRedirectEnabled: boolean): DynamicLink {
this._forcedRedirectEnabled = forcedRedirectEnabled;
return this._link;
}
build(): NativeNavigationParameters {
return {
forcedRedirectEnabled: this._forcedRedirectEnabled,
};
}
}