restoreToCount method Null safety

  1. @FfiNative<Void Function(Pointer<Void>, Int32)>(Pointer<Void>, Int32)>('Canvas::restoreToCount', isLeaf: true)
void restoreToCount(
  1. int count
)

Restores the save stack to a previous level as might be obtained from getSaveCount. If count is less than 1, the stack is restored to its initial state. If count is greater than the current getSaveCount then nothing happens.

Use save and saveLayer to push state onto the stack.

If any of the state stack levels restored by this call were pushed with saveLayer, then this call will also cause those layers to be composited into their previous layers.

Implementation

@FfiNative<Void Function(Pointer<Void>, Int32)>('Canvas::restoreToCount', isLeaf: true)
external void restoreToCount(int count);