2018-03-23 13:24:31 +00:00
|
|
|
/**
|
|
|
|
* @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;
|
2018-03-23 13:24:31 +00:00
|
|
|
_link: DynamicLink;
|
|
|
|
|
|
|
|
constructor(link: DynamicLink) {
|
|
|
|
this._link = link;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param forcedRedirectEnabled
|
|
|
|
* @returns {DynamicLink}
|
|
|
|
*/
|
2018-03-23 14:36:16 +00:00
|
|
|
setForcedRedirectEnabled(forcedRedirectEnabled: boolean): DynamicLink {
|
2018-03-23 13:24:31 +00:00
|
|
|
this._forcedRedirectEnabled = forcedRedirectEnabled;
|
|
|
|
return this._link;
|
|
|
|
}
|
|
|
|
|
|
|
|
build(): NativeNavigationParameters {
|
|
|
|
return {
|
|
|
|
forcedRedirectEnabled: this._forcedRedirectEnabled,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|