follow_the_leader
0.5.3, released 8 months ago by flutterbountyhunters.com
Widgets that follow other widgets using Leader and Follower links.
What it does
Provides Leader and Follower widgets allowing designated widgets to follow the position, movement, and sizing of another widget on screen. Includes support for offsets, aligners, boundaries, and ordering containers.
AI-written summary of version 0.5.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a widget to track and follow the position of another widget independently of standard layouts.
- You are implementing floating elements like tooltips, popovers, or floating toolbars that need precise positioning relative to a leader.
Skip it when
- Standard layout widgets like Row, Column, or Stack can achieve your desired arrangement.
- You do not have a leader-follower relationship between widgets.
Strengths
- Allows follower widgets to bypass ancestor layout rules.
- Supports custom aligners, boundaries, scaling, and keyboard-aware positioning.
Weaknesses
- Requires careful ordering where Leader widgets must be built before their Followers.
- Unusual mental model compared to standard Flutter tree-based layouts.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Leader(
link: _leaderLink,
child: YourLeaderWidget(),
);
Follower.withOffset(
link: _leaderLink,
offset: const Offset(0, -20),
leaderAnchor: Alignment.topCenter,
followerAnchor: Alignment.bottomCenter,
child: YourFollowerWidget(),
);Alternatives
Packages that do the same job and could replace follow_the_leader.
- styled_divider
Drop-in replacements for Flutter's Divider and VerticalDivider supporting multiple line styles.
80Compare - google_nav_bar
A modern Google-style animated bottom navigation bar widget.
50Compare
Works with
Packages commonly used together with follow_the_leader: ones it builds on, ones built on it, and its own family.
- vector_mathfollow_the_leader depends on itVector math library for 2D/3D/4D vectors, matrices, quaternions, and geometry.
- loggingfollow_the_leader depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- super_keyboardfollow_the_leader depends on itA plugin that reports software keyboard visibility and size on Android and iOS.
- overlordBuilt on follow_the_leaderAn assortment of widgets that loom over your content.