unicorndial 1.1.5

  • Readme
  • Changelog
  • Example
  • Installing
  • 91

UnicornDialer #

Easily create your own floating action button list

alt text

alt text

Installing #

Add UnicornDialer to your pubspec.yaml

unicorndial: "^1.1.5"

Options #

UnicornDialer class

int orientation - Vertical or horizontal floating button list

Object parentHeroTag - Main FAB hero tag

Color backgroundColor - Modal background color

Icon parentButton - Starting Icon

Icon finalButtonIcon - Ending Icon (after animation is complete)

bool hasBackground - Background modal is set

Color parentButtonBackground - The main floating button background color

List<UnicornButton> childButtons Floating button list

int animationDuration Rotation and expanding animation duration (in milliseconds)

double childPadding - Right padding on the button label

Function onMainButtonPressed - To be called if set on the UnicornDialer parent widget

bool hasNotch - BottomAppBar support

UnicornButton class

FloatingActionButton currentButton - Floating list button

String labelText

double labelFontSize

Color labelColor

Color labelBackgroundColor

Color labelShadowColor - Label container shadow

bool labelHasShadow

bool hasLabel

Authors #

Tiago Martins

License #

This project is licensed under the MIT License - see the LICENSE.md file for details

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.


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

void main() =>
    runApp(new MaterialApp(debugShowCheckedModeBanner: false, home: Example()));

class Example extends StatefulWidget {
  _Example createState() => _Example();

class _Example extends State<Example> {
  Widget build(BuildContext context) {
    var childButtons = List<UnicornButton>();

        hasLabel: true,
        labelText: "Choo choo",
        currentButton: FloatingActionButton(
          heroTag: "train",
          backgroundColor: Colors.redAccent,
          mini: true,
          child: Icon(Icons.train),
          onPressed: () {},

        currentButton: FloatingActionButton(
            heroTag: "airplane",
            backgroundColor: Colors.greenAccent,
            mini: true,
            child: Icon(Icons.airplanemode_active))));

        currentButton: FloatingActionButton(
            heroTag: "directions",
            backgroundColor: Colors.blueAccent,
            mini: true,
            child: Icon(Icons.directions_car))));

    return Scaffold(
        floatingActionButton: UnicornDialer(
            backgroundColor: Color.fromRGBO(255, 255, 255, 0.6),
            parentButtonBackground: Colors.redAccent,
            orientation: UnicornOrientation.VERTICAL,
            parentButton: Icon(Icons.add),
            childButtons: childButtons),
        appBar: AppBar(),
        body: Center(child: RaisedButton(
          onPressed: () {
            setState(() {});

Use this package as a library

1. Depend on it

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

  unicorndial: ^1.1.5

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:unicorndial/unicorndial.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health suggestions

Format lib/unicorndial.dart.

Run flutter format to format lib/unicorndial.dart.

Maintenance suggestions

Package is getting outdated. (-31.23 points)

The package was last published 68 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <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