createSession method Null safety

  1. @override
  2. @protected
MouseCursorSession createSession(
  1. int device
)
@protected, override

Associate a pointing device to this cursor.

A mouse cursor class usually has a corresponding MouseCursorSession class, and instantiates such class in this method.

This method is called each time a pointing device starts displaying this cursor. A given cursor can be displayed by multiple devices at the same time, in which case this method will be called separately for each device.

Implementation

@override
@protected
MouseCursorSession createSession(int device) => _SystemMouseCursorSession(this, device);