KonamiCode class

A KonamiCode which contains a code and a callback.

Constructors

KonamiCode({required List<KonamiCodeInput> codes, required FutureOr<void> onMatch(BuildContext context)})
const

Properties

codes List<KonamiCodeInput>
The code to match.
final
hashCode int
The hash code for this object.
no setterinherited
onMatch FutureOr<void> Function(BuildContext context)
The callback to call when the code is matched.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validate(BuildContext context, {required List<KonamiCodeInput> inputHistory}) Future<bool>
Matches the code and executes the callback if code is a match.

Operators

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