Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: EventComponentMixins missing @mustCallSuper added #2036

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:flame/src/events/messages/drag_cancel_event.dart';
import 'package:flame/src/events/messages/drag_end_event.dart';
import 'package:flame/src/events/messages/drag_start_event.dart';
import 'package:flame/src/events/messages/drag_update_event.dart';
import 'package:meta/meta.dart';

/// This mixin can be added to a [Component] allowing it to receive drag events.
///
Expand Down Expand Up @@ -53,6 +54,7 @@ mixin DragCallbacks on Component {
void onDragCancel(DragCancelEvent event) => onDragEnd(event.toDragEnd());

@override
@mustCallSuper
void onMount() {
super.onMount();
assert(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flame/src/events/flame_game_mixins/has_tappable_components.dart'
import 'package:flame/src/events/messages/tap_cancel_event.dart';
import 'package:flame/src/events/messages/tap_down_event.dart';
import 'package:flame/src/events/messages/tap_up_event.dart';
import 'package:meta/meta.dart';

/// This mixin can be added to a [Component] allowing it to receive tap events.
///
Expand All @@ -22,6 +23,7 @@ mixin TapCallbacks on Component {
void onTapCancel(TapCancelEvent event) {}

@override
@mustCallSuper
void onMount() {
super.onMount();
assert(
Expand Down