reverse static method
void
reverse(
- BuildContext context, {
- required Offset fromCenter,
- required Offset toCenter,
- required double orbSize,
- Uint8List? lottieBytes,
- String? lottieUrl,
- String? imageUrl,
- required List<
Color> brandColors, - VoidCallback? onComplete,
Quick reverse flight (~700ms) — orb leaves the landing position and floats back to the original FAB anchor with a soft fade.
Implementation
static void reverse(
BuildContext context, {
required Offset fromCenter,
required Offset toCenter,
required double orbSize,
Uint8List? lottieBytes,
String? lottieUrl,
String? imageUrl,
required List<Color> brandColors,
VoidCallback? onComplete,
}) {
if (_entry != null) return;
brandColors = ActionGates.instance.awakeningGradient ?? brandColors;
orbSize = ActionGates.instance.effects.awakeningOrbSize ?? orbSize;
final overlay = _resolveOverlay(context);
if (overlay == null) {
onComplete?.call();
return;
}
late OverlayEntry entry;
entry = OverlayEntry(
builder: (_) => _AwakeningLayer(
fromCenter: fromCenter,
toCenter: toCenter,
orbSize: orbSize,
lottieBytes: lottieBytes,
lottieUrl: lottieUrl,
imageUrl: imageUrl,
brandColors: brandColors,
reverse: true,
onLanded: () {},
onStateInit: (_) {},
onDone: () {
if (_entry == entry) {
entry.remove();
_entry = null;
}
onComplete?.call();
},
),
);
_entry = entry;
overlay.insert(entry);
}