control_pad 1.0.0+2

  • Readme
  • Changelog
  • Example
  • Installing
  • 90

control_pad #

A virtual pad with joystick controller and configurable buttons.

Features #

  • [X] Joystick controller
  • [X] Pad's buttons
  • [X] Configurable events interval
  • [X] Configurable colors

Usage #

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Control Pad Example'),
      ),
      body: Container(
        color: Colors.white,
        child: JoystickView(),
      ),
    );
  }
}

Questions or Feedback? #

Feel free to open an issue.

[1.0.0] - Overall Improvements

  • Added a backgroundColor parameters for a joystick's background and an inner circle
  • Added a opacity parameter for a whole joystick
  • Fixed a few warnings reported by static analyze

[0.0.5] - Pad buttons

  • Added pad buttons feature which are customizable

[0.0.4] - Improvements

  • Added a parameter for configuring joystick events interval
  • Added a parameter for joystick's arrows visability

[0.0.3] - Joystick improvements

  • Added a visual effect for dragging joystick's inner wheel inside joystick's circle range

[0.0.2] - Minor fixes

  • Change a color that is used for user touch indicator

[0.0.1] - Initial pre-release

  • Joystick functionality

example/main.dart

import 'package:flutter/material.dart';
import 'package:control_pad/control_pad.dart';

void main() {
  runApp(ExampleApp());
}

class ExampleApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Control Pad Example',
      home: HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Control Pad Example'),
      ),
      body: Container(
        color: Colors.white,
        child: JoystickView(),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  control_pad: ^1.0.0+2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:control_pad/control_pad.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
81
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
90
Learn more about scoring.

We analyzed this package on Dec 13, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.1+4
  • Flutter: 1.12.13+hotfix.4

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.2 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test
pedantic ^1.0.0