Context constructor Null safety

Context(
  1. Synthizer synthizer,
  2. {bool events = false,
  3. int? pointer}
)

Create a context.

Implementation

Context(
  final Synthizer synthizer, {
  final bool events = false,
  final int? pointer,
}) : super(synthizer, pointer: pointer) {
  if (pointer == null) {
    synthizer.check(
      synthizer.synthizer.syz_createContext(
        handle,
        nullptr,
        synthizer.userdataFreeCallbackPointer,
      ),
    );
    if (events) {
      enableEvents();
    }
  }
}