control_button 0.0.2
control_button: ^0.0.2 copied to clipboard

Flutter Android iOS web

Create a custom Control Button with different sections actions and a central button. Perfect for remote controls or directional input.

control_button #

Control button with adjustable sections

About this package #

This widget will allow you to create templates for different kind of controllers.

Variables #

VariableTypeRequired
externalDiameterdoubleyes
internalDiameterdoubleyes
mainActionFunctionyes
sectionsListyes
elevationdoubleoptional
dividerThicknessdoubleoptional
externalColorColoroptional
internalColorColoroptional
dividerColorColoroptional
shadowDirectionOffsetoptional
sectionOffsetFixedAnglesoptional

Images #

BasicMore SectionsCustomizable

Usage #

To use this plugin, add control_button as a dependency in your pubspec.yaml file

dependencies:
  control_button: ^0.0.2

Install it #

$ flutter pub get

Import it #

import 'package:control_button/control_button.dart';

Example #

See example/example.dart

ControlButton(
  sectionOffset: FixedAngles.Zero,
  externalDiameter: 300,
  internalDiameter: 120,
  dividerColor: Colors.blue,
  elevation: 2,
  externalColor: Colors.lightBlue[100],
  internalColor: Colors.grey[300],
  mainAction: () => updateState('Selected Center'),
  sections: [
    () => updateState('Selected 1'),
    () => updateState('Selected 2'),
    () => updateState('Selected 3'),
    () => updateState('Selected 4'),
  ],
)
3
likes
110
pub points
54%
popularity

Publisher

version-one.com

Create a custom Control Button with different sections actions and a central button. Perfect for remote controls or directional input.

Homepage

Documentation

API reference

License

BSD (LICENSE)

Dependencies

flutter

More

Packages that depend on control_button