cameraState property
Saves the current state of the camera into a binary format.
Can be restored later using cameraState setter. Used for persisting camera state.
Returns
- (Uint8List) The binary representation of the camera's current state.
Implementation
Uint8List get cameraState {
final OperationResult resultString = objectMethod(
_pointerId,
'MapCamera',
'saveCameraState',
);
return base64Decode(resultString['result']);
}
Restores a previously saved camera state.
Parameters
state: (Uint8List) Binary blob previously produced by cameraState.
Implementation
set cameraState(final Uint8List state) {
objectMethod(
_pointerId,
'MapCamera',
'restoreCameraState',
args: base64Encode(state),
);
}