show static method
void
show(
- BuildContext context, {
- required Offset fromCenter,
- required Offset toCenter,
- required double orbSize,
- Uint8List? lottieBytes,
- String? lottieUrl,
- String? imageUrl,
- required List<
Color> brandColors, - required VoidCallback onLanded,
- VoidCallback? onComplete,
Mount the awakening overlay.
Implementation
static void show(
BuildContext context, {
required Offset fromCenter,
required Offset toCenter,
required double orbSize,
Uint8List? lottieBytes,
String? lottieUrl,
String? imageUrl,
required List<Color> brandColors,
required VoidCallback onLanded,
VoidCallback? onComplete,
}) {
if (_entry != null) return;
// Backend theming/tuning: `colors.awakeningGradient` replaces the widget
// brand gradient for the orb; `effects.awakening.orbSize` overrides the
// FAB-derived diameter.
brandColors = ActionGates.instance.awakeningGradient ?? brandColors;
orbSize = ActionGates.instance.effects.awakeningOrbSize ?? orbSize;
final overlay = _resolveOverlay(context);
if (overlay == null) {
onLanded();
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: false,
onLanded: onLanded,
onStateInit: (_) {},
onDone: () {
if (_entry == entry) {
entry.remove();
_entry = null;
}
onComplete?.call();
},
),
);
_entry = entry;
overlay.insert(entry);
}