Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 44 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ SuperTooltip(
)
```

### AnimationConfiguration - Animation Timing
Control animation behavior:
### AnimationConfiguration - Animation Timing

Control animation behavior:

```dart
SuperTooltip(
Expand All @@ -235,10 +235,35 @@ SuperTooltip(
exitDuration: Duration(milliseconds: 100), // Hover exit delay
),
// ...
)
```

## 🎯 Common Use Cases
)
```

### Overlay Selection

Control which `Overlay` receives the tooltip entries:

```dart
SuperTooltip(
useRootOverlay: true, // default: insert into the app's root Overlay
content: const Text(
'I use the global overlay by default.',
style: TextStyle(color: Colors.white),
),
child: const Icon(Icons.layers),
)
```

- `useRootOverlay: true` - Insert into the root/global `Overlay` and keep the tooltip above subsequently presented routes
- `useRootOverlay: false` - Insert into the nearest local `Overlay` and follow the local route layering
- Default is `true`, so existing usages may change layering behavior after upgrading

Use `false` when the tooltip must stay scoped to a nested `Overlay`, such as a
custom overlay region, embedded navigator, or other locally managed floating
content. In route-based surfaces like dialogs or bottom sheets, `false` allows
newly presented routes to naturally cover the tooltip instead of forcing the
tooltip to the global top layer.

## 🎯 Common Use Cases

### Auto-Positioning Tooltip

Expand Down Expand Up @@ -455,17 +480,18 @@ SuperTooltip(
)
```

### Touch-Through Areas

Allow touches to pass through specific areas:

```dart
SuperTooltip(
controller: _controller,
touchThroughArea: Rect.fromLTWH(100, 100, 200, 100),
touchThroughAreaShape: ClipAreaShape.rectangle,
touchThroughAreaCornerRadius: 10.0,
barrierConfig: const BarrierConfiguration(show: true),
### Touch-Through Areas

Allow touches to pass through specific areas. The builder receives the target
child's global rect and returns the final pass-through rect:

```dart
SuperTooltip(
controller: _controller,
touchThroughAreaBuilder: (area) => area.inflate(12),
touchThroughAreaShape: ClipAreaShape.rectangle,
touchThroughAreaCornerRadius: 10.0,
barrierConfig: const BarrierConfiguration(show: true),
content: const Text("Tutorial step 1"),
child: const Icon(Icons.lightbulb),
)
Expand Down
Loading