Hi, I am trying to implement several FABs through the Flow widget.
Context
What defers my case from your example is that I want to have the button that expands/shrinks the Flow – from now on menu button– is at position 0 of the children property, thus keeping it immobile. For this reason, my FlowDelegate paints the children from last to first; so when all buttons are shrunk, my menu button is painted above the others.
My problem starts when using this package. When all widgets are shrunk, the pointer event triggers the last button, not my menu button, thus not working properly.
Expected output
Trigger the menu button (GradientFAB) onPressed property, as its painted last and above the others.
Actual output
Triggers 'Second extra button', while being painted under the menu button.
Hi, I am trying to implement several
FAB
s through theFlow
widget.Context
What defers my case from your example is that I want to have the button that expands/shrinks the
Flow
– from now on menu button– is at position 0 of thechildren
property, thus keeping it immobile. For this reason, myFlowDelegate
paints thechildren
fromlast
tofirst
; so when all buttons are shrunk, my menu button is painted above the others.This video section may clear out my intentions.
Problem
My problem starts when using this package. When all widgets are shrunk, the pointer event triggers the last button, not my menu button, thus not working properly.
Expected output
Trigger the menu button (
GradientFAB
)onPressed
property, as its painted last and above the others.Actual output
Triggers
'Second extra button'
, while being painted under the menu button.Files
Widget file
```dart import 'dart:developer'; import 'dart:math' as math; import 'dart:ui'; import 'package:defer_pointer/defer_pointer.dart'; import 'package:flutter/material.dart'; class AnimatedFloatingActionButton { const AnimatedFloatingActionButton({ required this.text, required this.icon, this.onPressed, }); final String text; final IconData icon; final VoidCallback? onPressed; } const kPadding = 8.0; const fabSize = 56.0; class AnimatedFloatingActionButtons extends StatefulWidget { const AnimatedFloatingActionButtons({ Key? key, required this.buttons, }) : super(key: key); final ListExample of use
```dart AnimatedFloatingActionButtons( buttons: [ AnimatedFloatingActionButton( text: 'First extra button', icon: Icons.add_a_photo, onPressed: () {}, ), AnimatedFloatingActionButton( text: 'Second extra button', icon: Icons.add_alarm, onPressed: () {}, ), ], ), ```