mirror of https://github.com/flutter/pinball.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
310 B
13 lines
310 B
import 'package:flame/components.dart';
|
|
|
|
/// A mixin that ensures a parent is of the given type [T].
|
|
mixin ParentIsA<T extends Component> on Component {
|
|
@override
|
|
T get parent => super.parent! as T;
|
|
|
|
@override
|
|
Future<void>? addToParent(covariant T parent) {
|
|
return super.addToParent(parent);
|
|
}
|
|
}
|