fledge_input 0.2.3 copy "fledge_input: ^0.2.3" to clipboard
fledge_input: ^0.2.3 copied to clipboard

Input handling plugin for the Fledge ECS game framework. Provides action-based input mapping with keyboard, mouse, and gamepad support.

fledge_input #

Action-based input system for Fledge games. Maps keyboard, mouse, and gamepad inputs to named actions.

pub package

Installation #

dependencies:
  fledge_input: ^0.2.1

Quick Start #

import 'package:flutter/services.dart';
import 'package:fledge_ecs/fledge_ecs.dart';
import 'package:fledge_input/fledge_input.dart';

enum Actions { jump, move, attack }

final inputMap = InputMap.builder()
  .bindKey(LogicalKeyboardKey.space, ActionId.fromEnum(Actions.jump))
  .bindWasd(ActionId.fromEnum(Actions.move))
  .bindGamepadButton('a', ActionId.fromEnum(Actions.jump))
  .bindLeftStick(ActionId.fromEnum(Actions.move))
  .build();

final app = App()
  ..addPlugin(InputPlugin.simple(
    context: InputContext(name: 'default', map: inputMap),
  ));

// Wrap your Flutter game widget with InputWidget.
InputWidget(
  world: app.world,
  child: GameWidget(app: app),
);

Documentation #

See the Fledge documentation site for guides, API reference, and advanced usage.

License #

Apache 2.0 - See LICENSE for details.

0
likes
160
points
153
downloads

Documentation

API reference

Publisher

verified publisherfledge-framework.dev

Weekly Downloads

Input handling plugin for the Fledge ECS game framework. Provides action-based input mapping with keyboard, mouse, and gamepad support.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#ecs #game-engine #input #gamepad #flutter-games

License

Apache-2.0 (license)

Dependencies

fledge_ecs, flutter, gamepads, meta

More

Packages that depend on fledge_input