Start a shoot from Dart

static const _methodChannel = MethodChannel('com.spyne.spyne_sdk_flutter/spyne');

Future<void> _handleStartShoot() async {
  await _methodChannel.invokeMethod<void>('start', {
    'userId': _userId,
    'vin': _vin,
    'stockNumber': _stockNumber,
    'registrationNumber': _registrationNumber,
    'locale': 'en',
  });
}

The native side turns this into a SpyneAutomobileSDK.Builder(...).build().startShoot() call.

Provide userId and at least one of vin, stockNumber, or registrationNumber. startShoot() automatically resumes a draft, starts a reshoot, or begins a new shoot based on the identifiers — see Initiate a Shoot and Resume a Shoot.

Validation

Validate in Dart before sending:

RuleMessage
userId non-emptyUser ID is required
At least one identifierAt least one of VIN, Stock Number, or Registration Number is required
VIN, if provided, is exactly 17 charactersVIN must be exactly 17 characters long
VIN excludes I, O, QVIN may only contain A–Z and 0–9 (excluding I, O, Q)

Did this page help you?