RadarScreen class
A full-screen radar widget with centered content, optional search results displayed in a circle, and a bottom action.
When results is provided and showResults is true, the result
widgets appear around the center icon with a staggered scale + fade
animation. Each result widget is positioned evenly on a circle of
resultsRadius.
{@tool snippet}
// Searching state
RadarScreen(
centerIcon: Icon(Icons.wifi, color: Colors.white, size: 28),
label: 'Searching...',
config: RadarEffectConfig.classic,
)
// Results found
RadarScreen(
centerIcon: Icon(Icons.wifi, color: Colors.white, size: 28),
label: 'Found 3 users',
config: RadarEffectConfig.classic,
showResults: true,
resultsRadius: 130.0,
results: [
CircleAvatar(child: Text('A')),
CircleAvatar(child: Text('B')),
CircleAvatar(child: Text('C')),
],
)
{@end-tool}
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- RadarScreen
Constructors
-
RadarScreen({Key? key, Widget? centerIcon, String? label, TextStyle? labelStyle, Widget? bottomAction, RadarEffectConfig config = RadarEffectConfig.green, GKController? controller, List<
Widget> results = const [], bool showResults = false, double resultsRadius = 130.0, double resultSize = 56.0, Duration resultsAnimationDuration = const Duration(milliseconds: 800), double startAngle = -pi / 2}) -
Creates a RadarScreen.
const
Properties
- bottomAction → Widget?
-
Widget positioned at the bottom (e.g. a cancel button).
final
- centerIcon → Widget?
-
Widget displayed inside the center circle (e.g. an Icon).
final
- config → RadarEffectConfig
-
Visual configuration for the radar.
final
- controller → GKController?
-
Optional external GKController for the radar animation.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String?
-
Text label shown below the center icon.
final
- labelStyle → TextStyle?
-
Style for the label text.
final
-
results
→ List<
Widget> -
Widgets to display around the center when showResults is
true.final - resultsAnimationDuration → Duration
-
Total duration of the staggered results animation.
final
- resultSize → double
-
The width and height allocated for each result widget.
final
- resultsRadius → double
-
Distance from center to each result widget in logical pixels.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showResults → bool
-
Whether to show the results with a staggered animation.
final
- startAngle → double
-
The angle (in radians) where the first result is placed.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< RadarScreen> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited