konami_detector 1.0.0 copy "konami_detector: ^1.0.0" to clipboard
konami_detector: ^1.0.0 copied to clipboard

A package to detect your konami codes and executes the provided callbacks.

Konami Detector #

Author: Jop Middelkamp #

A package to detect konami codes swipes and provides you with callbacks to handle when one has been triggered.

Usage #

KonamiDetector(
  codes: [
    if (enviroment != Environment.production) TestCrashKonamiCode(),
    ShowDeviceInfoKonamiCode(),
  ],
  child: Container(
    ...
  ),
)
class ShowDeviceInfoKonamiCode extends KonamiCode {
  ShowDeviceInfoKonamiCode()
      : super(
          codes: const [
            KonamiCodeInput.up,
            KonamiCodeInput.up,
            KonamiCodeInput.down,
            KonamiCodeInput.down,
            KonamiCodeInput.left,
            KonamiCodeInput.right,
          ],
          onMatch: showDeviceInfoDialog,
        );
}
8
likes
130
pub points
32%
popularity

Publisher

verified publisherbaseflow.com

A package to detect your konami codes and executes the provided callbacks.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, flutter_swipe_detector

More

Packages that depend on konami_detector