Home

Awesome

pub package

flutter_radial_menu

A radial menu widget for Flutter.

.

Installation

Install the latest version from pub.

Quick Start

Import the package, create a RadialMenu and pass it your RadialMenuItems.

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

void main() {
  runApp(
    new MaterialApp(
      home: new Scaffold(
        body: new Center(
          child: new RadialMenu(
            items: <RadialMenuItem<int>>[
              const RadialMenuItem<int>(
                value: 1,
                child: const Icon(Icons.add),
              ),
              const RadialMenuItem<int>(
                value: -1,
                child: const Icon(Icons.remove),
              )
            ],
            radius: 100.0,
            onSelected: print,
          ),
        ),
      ),
    ),
  );
}


Take a look at the demo for a more elaborate example.


Customization

RadialMenuItem

ParameterDefaultDescription
childnullUsually an Icon widget, gets placed in the center of the button.
valuenullValue that gets returned when this item is selected.
tooltipnullTooltip displayed when the button is long-pressed.
size48.0Size of the button.
backgroundColorTheme.of(context).primaryColorBackground fill color of the button.
iconColorTheme.of(context).primaryIconTheme.colorThe color of the child icon.

RadialMenu

ParameterDefaultDescription
itemsnullThe list of possible items to select from.
onSelectednullCalled when the user selects an item.
radius100.0The radius of the arc used to lay out the items and draw the progress bar.
menuAnimationDuration1000 millisecondsDuration of the menu opening/closing animation.
progressAnimationDuration1000 millisecondsDuration of the action activation progress arc animation.