Flutter Floating Action Button with Speed Dial

Overview

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

Comments
  • Match the style with the regular Floating Action Button

    Match the style with the regular Floating Action Button

    Hi, thank you for the initiative of developing this package. Currently I'm including you FAB in an app with a bottom navigation. When I switch the item/tab, the FAB is replaced by a new one. I have the following issues:

    • The default margin of a regular FAB is smaller than the margin in this package; when switching FABs they jump to different places; is there a way to change the margins to the default from the regular FAB?
    • the regular FABs, when switching between views, fade out and fade in; using the FAB from this package I'm not achieving the same effect.

    To better illustrate my use case, please check this similar example from Flutter Gallery.

    enhancement missing feature 
    opened by oneplusseven 8
  • Couple of new issues

    Couple of new issues

    Thanks for the updates, looking really good, the popup animation is much nicer and the collapse on press was working nicely. However, after the 1.0.5 update there were a few quirky problems that I ran into. First error I was getting was: Another exception was thrown: There are multiple heroes that share the same tag within a subtree. So what I had to do to get rid of that was inside the UnicornButton FloatingActionButton component, to set heroTag: null, and that went away. It was mostly working but then I realized I wasn't able to press the sub buttons anymore. The onPressed in the mini FloatingActionButton was no longer getting called... I don't know what that's about, it was working at first and after playing with it a while I couldn't find a fix. I've checked it against the example and it all looks right... only difference is I'm using it on a few different pages in the route and adding the list of UnicornButton children directly instead of a variable list. Any suggestions? Thanks.

    opened by Skquark 4
  • Docking in bottomNavigationBar issue. [v1.1.4]

    Docking in bottomNavigationBar issue. [v1.1.4]

    I am docking the unicornspeeddial into a bottom app bar, with

    hasNotch: true.
    floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked
    

    In version 1.1.3 this didn't exists, but not it is showing:

    screen shot 2018-08-22 at 5 40 17 pm

    bug 
    opened by jeprojects 3
  • Incorrectly positioned when docked in a BottomAppBar

    Incorrectly positioned when docked in a BottomAppBar

    When using UnicornDialler in a BottomAppBar with a docked position specified, the FAB is incorrectly positioned (requires a padding of 20.0 at the bottom).

    Scaffold(
      appBar: …,
      body: …,
      floatingActionButton: UnicornDialler(…),
      floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
      bottomNavigationBar: BottomAppBar(
        child: …,
        shape: CircularNotchedRectangle(),
      )
    

    screenshot_1533825013 2

    bug 
    opened by dereklakin 2
  • Incompatible with BottomAppBar with shape specified for Notch

    Incompatible with BottomAppBar with shape specified for Notch

    Specifying a NotchShape when using UnicornDialler in a BottomAppBar breaks the rendering of the notch shape:

    Scaffold(
      appBar: …,
      body: …,
      floatingActionButton: UnicornDialler(…),
      floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
      bottomNavigationBar: BottomAppBar(
        child: …,
        shape: CircularNotchedRectangle(),
      )
    

    screenshot_1533824564 2

    bug 
    opened by dereklakin 2
  • Animate to

    Animate to "cancel"

    I have one last suggestion: if the main FAB has an "add" icon (+), it rotates to a "cancel" (x) when opening, which is what is intended. But when using other icons, the same effect is not possible. Wouldn't be better to always animate to a cross when opening instead of rotating the original icon?

    enhancement 
    opened by oneplusseven 2
  • Collapsing child buttons after press

    Collapsing child buttons after press

    This was just what I was looking for, got it integrated in no time and fairly pleased. Just ran into one little snag I was hoping you could help with.. The child buttons pop out fine, but when I press the sub button I expected the icons to collapse down after pressing it. I figure there's something to add to the onPressed of the UnicornButton to tell UnicornDialer to close, or an option in UnicornDialer to tell it to auto collapse, but I couldn't figure out any solution after tinkering with it a bit. Thanks.

    missing feature 
    opened by Skquark 2
  • FAB not animating

    FAB not animating

    Hello again, still regarding issue #6, I'm stuck in a small detail: when switching tabs, if there is a FAB with no children, it is not being animated (fade out, fade in). Could you check this, please?

    enhancement 
    opened by oneplusseven 1
  • New errors that showed up

    New errors that showed up

    Getting closer to perfect, but with this new update there are different errors that arose. I'm using this in a TabView where I'm changing the active fab dynamically, which is different from the example where you have only one simple one. Anyways, here's one of the new errors when pressing the main dialer:

    I/flutter ( 2908): The following NoSuchMethodError was thrown while handling a gesture:
    I/flutter ( 2908): The method 'call' was called on null.
    I/flutter ( 2908): Receiver: null
    I/flutter ( 2908): Tried calling: call()
    I/flutter ( 2908): When the exception was thrown, this was the stack:
    I/flutter ( 2908): #0      Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:46:5)
    I/flutter ( 2908): #1      _UnicornDialer.build.<anonymous closure> (package:unicorndial/unicorndial.dart:108:18)
    

    Looks like that's on the onMainButtonPressed of the parent fab, which was an optional parameter. That one should be an easy fix. The other error I'm getting that breaks it a bit is this: I/flutter ( 2908): Another exception was thrown: There are multiple heroes that share the same tag within a subtree. I do have a unique heroTag on each one of the child UnicornButton fabs, and there's no way I found to set a hero on the main UnicornDialer. Spent some time trying to debug that one but couldn't find a fix.

    Also saw the change from the + to the x changing the opened icon, but I personally liked it before just rotating the icon. I'm using the + from FontAwsomeIcons.plus which looked better being thicker, but now it looks weird going to a thin x... That should be an option so set the close icon, or setting a rotation angle manually that defaults to 45 degrees, Anyways, sorry to be making more work for you, but trying to be helpful to get this polished up. Thanks for the good work.

    bug 
    opened by Skquark 1
  • Use flutter_speed_dial if this is dead

    Use flutter_speed_dial if this is dead

    Hey guys, I came to know about this package from flutterawesome but it looks like this package is not maintained from straight 2018 and doesn't keep up to current flutter standards like Null safety and other stuff.

    You can use flutter_speed_dial it also have a Direction parameter and is far superior than this cause it uses Overlays instead of old Stack implementation.

    You can test it in your app by using below code snippet, I hope you will like it.

     flutter_speed_dial: ^4.0.0-dev
    

    You can checkout full release here.

    opened by prateekmedia 0
  • Able to use Widget instead Icon types

    Able to use Widget instead Icon types

    Task: Able to use IconImage instead Icon types. Flexibile change of color and size of parentButton and FinalButton. Decision:

    1. Minor changes of parameters declaration with change Icon to WIdget class type

    2. Change of animation for parent button when called FloatingActionButton for rendering of parent button Result:

    3. Able use ani Icon images for FAB

    4. Possibilities change of color, size and other setting for icons which used for parent button Example:

      return UnicornDialer( parentButtonBackground: Colors.white, orientation: UnicornOrientation.VERTICAL, parentButton: ImageIcon( AssetImage("images/icons/creaz nuovi contenuti.png"), size: 40, color: Colors.black, ), finalButtonIcon: ImageIcon( AssetImage("images/icons/x cancella.png"), size: 40, color: Colors.black, ), childButtons: childButtons);

    opened by ra-develop 0
Owner
Tiago Martins
Tiago Martins
The projects and the materials that accompany the Flutter Apprentice book

The projects and the materials that accompany the Flutter Apprentice book

raywenderlich 2.3k Jan 7, 2023
Floating Action Button Widget For Flutter

Flutter Tutorial - FloatingActionButton Widget (FAB) Embed the FloatingActionBut

Behruz Hurramov 0 Dec 27, 2021
A Flutter package to create a nice circular menu using a Floating Action Button.

FAB Circular Menu A Flutter package to create a nice circular menu using a Floating Action Button. Inspired by Mayur Kshirsagar's great FAB Microinter

Mariano Cordoba 198 Jan 5, 2023
Master Channel cannot use Glass Floating Action Button

Problem Master Channel cannot use GlassFloatingActionButton. About This package

null 7 Oct 2, 2022
AdvFAB - An Advanced floating action button that expands itself to reveal its hidden widget

AdvFAB (More Than Just A Floating Action Button) AdvFAB is An Advanced floating action button that expands itself to reveal its hidden widget. It can

null 19 Nov 4, 2022
This package will animate a floating action button at the center and icons at the bottomNavigationBar using AnimatedContainer and SlideTransition respectively.

floating_bottom_bar This package will animate a floating action button at the center and icons at the bottomNavigationBar using AnimatedContainer and

MindInventory 11 Oct 10, 2022
Flutter plugin to implement a Material Design Speed Dial

Flutter Speed Dial Flutter package to render a Material Design Speed Dial. Usage The SpeedDial widget is built to be placed in the Scaffold.floatingAc

Dario Ielardi 349 Jan 2, 2023
Flutter package to render a Material Design Speed Dial.

Flutter Speed Dial Flutter package to render a Material Design Speed Dial. Usage The SpeedDial widget is built to be placed in the Scaffold.floatingAc

null 0 May 20, 2022
Floating panel let's you create quick Floating menu for the screen.

Flutter Float Box Float Box - v1.0 Overview Float box is a true floating panel for your app, which can be docked to either edges of the screen (horizo

Akshaye JH 25 Nov 25, 2022
Flutter Duration Button - Create auto-click button likes Netflix's Skip Intro button in Flutter

Flutter Duration Button - Create auto-click button likes Netflix's Skip Intro button in Flutter

Kim Seung Hwan 7 Dec 7, 2022
Show a draggable floating chat icon button and show messages on screens

Show a draggable floating chat icon button and show messages on screens Features A widget for displaying a chat icon (or custom widget) on top of a ba

CU Apps 4 May 5, 2022
Rotate Dial Lock

Rotary dial Locker Dependencies : How it works Most magic handle by GuesterDetector. onPanEnd onPanDown onPanUpdate SpringHouse, 1st we locate where u

Md. Yeasin Sheikh 10 Dec 21, 2022
An android app that can automatically dial a phone number.

AutoCallScheduler An android app that can automatically dial a phone number within a given scheduled of time. Basically it's a test base app of google

Rezwan 24 Dec 4, 2022
Flutter Triple Status Button can use toggle button but in three statuses.

triple_status_button Triple Status Button. Flutter Triple Status Button can use toggle button but in three statuses. Property Description height heigh

MahdiBagjani 2 Nov 13, 2021
Like Button is a flutter library that allows you to create a button with animation effects similar to Twitter's heart when you like something and animation effects to increase like count.

like_button Language: English | 中文简体 Like Button is a flutter library that allows you to create a button with animation effects similar to Twitter's h

FlutterCandies 357 Dec 27, 2022
Flutter reaction button plugin it is fully customizable widget such as Facebook reaction button

Flutter Reaction Button Flutter button reaction it is fully customizable widget such as Facebook reaction button. Preview Demo Usage Include 'flutter_

Abdelouahed Medjoudja 174 Dec 19, 2022
Progress State Button - A customizable progress button for Flutter

Progress State Button - A customizable progress button for Flutter

Selim 108 Dec 12, 2022
A button that looks like a Cupertino text button

Cupertino Text Button A button that looks like a Cupertino text button! Text Button A simple text button can be created like this: CupertinoTextButton

Nick Sirovsky 0 Nov 24, 2022
Swipeable button view - Create Ripple Animated Pages With Swipeable Button View

swipeable_button_view You can create ripple animated pages with swipeable_button

cemreonur 3 Apr 22, 2022
A flutter UI package provides a cell widget that has leading and trailing swipe action menu.

Language: English |中文简体 flutter_swipe_action_cell A package that can give you a cell that can be swiped ,effect is like iOS native If you like this pa

WenJingRui 261 Jan 7, 2023