simple_joystick 0.0.1 copy "simple_joystick: ^0.0.1" to clipboard
simple_joystick: ^0.0.1 copied to clipboard

A simple joystick package project.

simple joystick #

Japanese READEME

simple joystick plugin for Flutter. Supports iOS, Android. (Other environments unconfirmed)

App Demo #

https://github.com/NaokiNishizawa/simple_joystick/assets/60878237/4399367d-ca9f-4c0d-96e7-8732f77f9759

Getting Started #

In your flutter project add the dependency:

dependencies:
  ...
  simple_joystick:

Usage example #

import 'package:simple_joystick/simple_joystick.dart';

Usage #

 Column(
    mainAxisAlignment: MainAxisAlignment.center,
    children: <Widget>[
        JoyStick(
            150, // JoyStickAreaSize
            50, // JoyStickStickSize
            (details) {
                // Please describe what you want to do after the stick move.
            },
        ),
    ],
),

CallBack Detail #

typedef StickDragCallback = void Function(StickDragDetails details);

class StickDragDetails {
  StickDragDetails(
    this.x, // Global X coordinate after moving
    this.y, // Global Y coordinate after moving
    this.alignment,
    this.currentOffset, 
  );

  final double x;
  final double y;
  final Alignment alignment;
  final Offset currentOffset;
}
1
likes
140
pub points
13%
popularity

Publisher

verified publisherminomushi.xyz

A simple joystick package project.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on simple_joystick