marianocordoba/fab-circular-menu

Can we have only one button with Text ? Now it is crashing .

Closed this issue · 3 comments

Can we have only one button with Text ? Now it is crashing .

Any update on this ?

Hello @ganeshchenniah, I've changed the children count requirement to 1 from 2. Now you should be able to use a single button with text.

Hi ,

With single button also , it is giving error

          floatingActionButton: FabCircularMenu(
              key: fabKey,
              // Cannot be `Alignment.center`
              alignment: Alignment.bottomCenter,
              ringColor: Colors.orange,
              ringDiameter: 240.0,
              ringWidth: 120.0,
              fabSize: 60.0,
              fabElevation: 8.0,
              fabIconBorder: CircleBorder(),
              // Also can use specific color based on wether
              // the menu is open or not:
              // fabOpenColor: Colors.white
              // fabCloseColor: Colors.white
              // These properties take precedence over fabColor
              fabColor: Colors.white,
              fabOpenIcon: Icon(Icons.menu, color: Colors.grey),
              fabCloseIcon: Icon(Icons.close, color: Colors.green),
              fabMargin: const EdgeInsets.all(4.0),
              animationDuration: const Duration(milliseconds: 800),
              animationCurve: Curves.easeInOutCirc,
              children: <Widget>[
                RawMaterialButton(
                  onPressed: () {
                  },
                  shape: CircleBorder(),
                  padding: const EdgeInsets.all(24.0),
                  child: Icon(Icons.looks_one, color: Colors.white),
                ),
                RawMaterialButton(
                  onPressed: () {
                  },
                  shape: CircleBorder(),
                  padding: const EdgeInsets.all(24.0),
                  child: Icon(Icons.looks_one, color: Colors.white),
                ),

              ])

error

======== Exception caught by rendering library =====================================================
The following assertion was thrown during paint():
'package:flutter/src/rendering/layer.dart': Failed assertion: line 1553 pos 12: 'value!.storage.every((double component) => component.isFinite)': is not true.

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was:
FabCircularMenu-[LabeledGlobalKey#42a7c] file:///D:/Gc/flutter/Applications/community_app_billava/lib/community_home/community_home.dart:436:37
When the exception was thrown, this was the stack:
#2 TransformLayer.transform= (package:flutter/src/rendering/layer.dart:1553:12)
#3 PaintingContext.pushTransform (package:flutter/src/rendering/object.dart:574:13)
#4 RenderTransform.paint (package:flutter/src/rendering/proxy_box.dart:2358:25)
#5 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2317:7)
#6 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:187:13)