MouseMovementDetector mixin

Superclass Constraints

Properties

assets AssetsCache
finalinherited
buildContext BuildContext?
Currently attached build context. Can be null if not attached.
no setterinherited
canvasSize Vector2
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasLayout bool
Indicates if this game instance is connected to a GameWidget that is live in the flutter widget tree. Once this is true, the game is ready to have its size used or in the case of a FlameGame, to receive components.
no setterinherited
images Images
finalinherited
isAttached bool
Whether the game widget was attached to the Flutter tree.
no setterinherited
mouseCursor ValueNotifier<MouseCursor?>
Used to change the mouse cursor of the GameWidget running this game. Setting the value to null will make the GameWidget defer the choice of the cursor to the closest region available on the tree.
finalinherited
onLoadFuture Future<void>?
This variable ensures that Game's onLoad is called no more than once.
getter/setter pairinherited
overlays ActiveOverlaysNotifier
A property that stores an ActiveOverlaysNotifier
finalinherited
paused bool
Returns is the engine if currently paused or running
getter/setter pairinherited
pauseEngineFn VoidCallback?
getter/setter pairinherited
projector Projector
This is the projector used by all components that respect the camera (respectCamera = true). This can be overridden on your Game implementation.
getter/setter pairinherited
resumeEngineFn VoidCallback?
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Vector2
Current game viewport size, updated every resize via the onGameResize method hook.
no setterinherited
viewportProjector Projector
This is the projector used by components that don't respect the camera (positionType = PositionType.viewport;). This can be overridden on your Game implementation.
getter/setter pairinherited

Methods

assertHasLayout() → void
inherited
attach(PipelineOwner owner, GameRenderBox gameRenderBox) → void
Marks game as attached to any Flutter widget tree.
inherited
backgroundColor() Color
Returns the game background color. By default it will return a black color. It cannot be changed at runtime, because the game widget does not get rebuild when this value changes.
inherited
convertGlobalToLocalCoordinate(Vector2 point) Vector2
Converts a global coordinate (i.e. w.r.t. the app itself) to a local coordinate (i.e. w.r.t. he game widget). If the widget occupies the whole app ("full screen" games), or is not attached to Flutter, this operation is the identity.
inherited
convertLocalToGlobalCoordinate(Vector2 point) Vector2
Converts a local coordinate (i.e. w.r.t. the game widget) to a global coordinate (i.e. w.r.t. the app itself). If the widget occupies the whole app ("full screen" games), or is not attached to Flutter, this operation is the identity.
inherited
detach() → void
Marks game as no longer attached to any Flutter widget tree.
inherited
lifecycleStateChange(AppLifecycleState state) → void
This is the lifecycle state change hook; every time the game is resumed, paused or suspended, this is called.
inherited
loadSprite(String path, {Vector2? srcSize, Vector2? srcPosition}) Future<Sprite>
Utility method to load and cache the image for a sprite based on its options.
inherited
loadSpriteAnimation(String path, SpriteAnimationData data) Future<SpriteAnimation>
Utility method to load and cache the image for a sprite animation based on its options.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAttach() → void
Called when the game has been attached. This can be overridden to add logic that requires the game to already be attached to the widget tree.
inherited
onDetach() → void
Called after the game has left the widget tree. This can be overridden to add logic that requires the game not be on the flutter widget tree anymore.
inherited
onGameResize(Vector2 size) → void
This is the resize hook; every time the game widget is resized, this hook is called.
inherited
onLoad() Future<void>?
Method to perform late initialization of the Game class.
inherited
onMount() → void
inherited
onMouseMove(PointerHoverInfo info) → void
onRemove() → void
Called when the game is about to be removed from the Flutter widget tree, but before it is actually removed.
inherited
onTimingsCallback(List<FrameTiming> timings) → void
Use for calculating the FPS.
inherited
pauseEngine() → void
Pauses the engine game loop execution.
inherited
render(Canvas canvas) → void
This should render the game.
inherited
resumeEngine() → void
Resumes the engine game loop execution.
inherited
toString() String
A string representation of this object.
inherited
update(double dt) → void
This should update the state of the game.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited