setup method
The SDK will setup and authenticate a user.
moveAuth
contains authentication data and tokens prepared by the app backend..
moveConfig
indicates the configuration of the services which will be running.
Services in moveConfig
must be enabled in the MOVE dashboard.
Implementation
@override
Future<void> setup(
MoveAuth moveAuth, MoveConfig moveConfig, MoveOptions? options) async {
await methodChannel.invokeMethod(
'setup',
<String, dynamic>{
'projectId': moveAuth.projectId,
'accessToken': moveAuth.accessToken,
'userId': moveAuth.userId,
'refreshToken': moveAuth.refreshToken,
'config': moveConfig.buildConfigParameter(),
'options': <String, dynamic>{
'motionPermissionMandatory': options?.motionPermissionMandatory,
'backgroundLocationPermissionMandatory':
options?.backgroundLocationPermissionMandatory,
'deviceDiscovery': <String, dynamic>{
'startDelay': options?.deviceDiscovery?.startDelay,
'duration': options?.deviceDiscovery?.duration,
'interval': options?.deviceDiscovery?.interval,
'stopScanOnFirstDiscovered':
options?.deviceDiscovery?.stopScanOnFirstDiscovered,
},
'useBackendConfig': options?.useBackendConfig,
},
},
);
}