RadarEffect class
A shader-based radar / sonar scanning effect.
Renders expanding, fading concentric rings over a radial gradient background with a center pulse and edge vignette — all on the GPU.
{@tool snippet}
// As a GKWidget effect
GKWidget(
effect: RadarEffect(config: RadarEffectConfig.green),
trigger: GKTrigger.auto,
child: Icon(Icons.wifi, color: Colors.white),
)
// With custom colors
GKWidget(
effect: RadarEffect(
config: RadarEffectConfig(
ringColor: Colors.pinkAccent,
bgColor1: Color(0xFF6A1B9A),
bgColor2: Color(0xFF1A0030),
ringCount: 5,
speed: 1.5,
),
),
trigger: GKTrigger.auto,
)
{@end-tool}
Constructors
- RadarEffect({RadarEffectConfig config = RadarEffectConfig.green})
-
Creates a RadarEffect.
const
Properties
- config → RadarEffectConfig
-
Visual configuration for the radar.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context, GKController controller, {Widget? child}) → Widget -
Builds the widget tree for this effect.
override
-
dispose(
) → void -
Override to release resources held by this effect.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited