Skip to main content

avatar_glow_plus 3.1.0 copy "avatar_glow_plus: ^3.1.0" to clipboard
avatar_glow_plus: ^3.1.0 copied to clipboard

Pulsing glow rings around any widget, such as an avatar or a call button. A maintained successor of avatar_glow for current Flutter.

example/lib/main.dart

import 'package:avatar_glow_plus/avatar_glow_plus.dart';
import 'package:flutter/widgets.dart';

void main() => runApp(const ExampleApp());

/// A green call button with a pulsing glow. Tap it to stop or start the glow.
class ExampleApp extends StatefulWidget {
  const ExampleApp({super.key});

  @override
  State<ExampleApp> createState() => _ExampleAppState();
}

class _ExampleAppState extends State<ExampleApp> {
  bool _isGlowing = true;

  @override
  Widget build(BuildContext context) {
    return Directionality(
      textDirection: TextDirection.ltr,
      child: ColoredBox(
        color: const Color(0xFF101010),
        child: Center(
          child: GestureDetector(
            onTap: () => setState(() => _isGlowing = !_isGlowing),
            child: AvatarGlow(
              animate: _isGlowing,
              glowColor: const Color(0xFF4CAF50),
              child: Container(
                width: 72,
                height: 72,
                decoration: const BoxDecoration(
                  shape: BoxShape.circle,
                  color: Color(0xFF4CAF50),
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}
0
likes
160
points
--
downloads

Documentation

API reference

Publisher

verified publisherbadalabs.com

Pulsing glow rings around any widget, such as an avatar or a call button. A maintained successor of avatar_glow for current Flutter.

Repository (GitHub)
View/report issues

Topics

#animation #avatar #widget

License

MIT (license)

Dependencies

flutter

More

Packages that depend on avatar_glow_plus