glowing_avatar 1.0.1 copy "glowing_avatar: ^1.0.1" to clipboard
glowing_avatar: ^1.0.1 copied to clipboard

A Flutter package that provides glowing avatar widgets with customizable effects and animations.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:glowing_avatar/glowing_avatar.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Glowing Avatar Showcase',
      theme: ThemeData(
        brightness: Brightness.light,
        scaffoldBackgroundColor: Colors.white,
      ),
      home: const ShowcasePage(),
    );
  }
}

class ShowcasePage extends StatelessWidget {
  const ShowcasePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Glowing Avatar'),
        backgroundColor: Colors.white,
        foregroundColor: Colors.black,
        elevation: 0,
      ),
      body: Center(
        child: Padding(
          padding: const EdgeInsets.all(40),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              // First Row - All Shapes
              Row(
                mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                children: [
                  GlowingAvatar(
                    size: 60,
                    shape: AvatarShape.circle,
                    content: const AvatarContent.icon(
                      Icons.person,
                      color: Colors.white,
                    ),
                    glowConfig: GlowPresets.vibrantPurple,
                  ),
                  GlowingAvatar(
                    size: 60,
                    shape: AvatarShape.square,
                    content: const AvatarContent.icon(
                      Icons.apps,
                      color: Colors.white,
                    ),
                    glowConfig: GlowPresets.brightRed,
                  ),
                  GlowingAvatar(
                    size: 60,
                    shape: AvatarShape.star,
                    content: const AvatarContent.text(
                      'AB',
                      color: Colors.white,
                    ),
                    glowConfig: GlowPresets.sunset,
                  ),
                  GlowingAvatar(
                    size: 60,
                    shape: AvatarShape.triangle,
                    content: const AvatarContent.icon(
                      Icons.favorite,
                      color: Colors.white,
                    ),
                    glowConfig: GlowPresets.ocean,
                  ),
                  GlowingAvatar(
                    size: 60,
                    shape: AvatarShape.diamond,
                    content: const AvatarContent.icon(
                      Icons.star,
                      color: Colors.white,
                    ),
                    glowConfig: GlowPresets.alertRed,
                  ),
                  GlowingAvatar(
                    size: 60,
                    shape: AvatarShape.hexagon,
                    content: const AvatarContent.icon(
                      Icons.hexagon,
                      color: Colors.white,
                    ),
                    glowConfig: GlowPresets.rainbow,
                  ),
                  GlowingAvatar(
                    size: 60,
                    shape: AvatarShape.octagon,
                    content: const AvatarContent.icon(
                      Icons.stop,
                      color: Colors.white,
                    ),
                    glowConfig: GlowPresets.zen,
                  ),
                ],
              ),

              const SizedBox(height: 60),

              // Second Row - All Animations
              Row(
                mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                children: [
                  GlowingAvatar(
                    size: 60,
                    content: const AvatarContent.icon(
                      Icons.mic,
                      color: Colors.white,
                    ),
                    glowConfig: GlowPresets.vibrantPurple,
                    animationConfig: AnimationPresets.rippleWaves,
                  ),
                  GlowingAvatar(
                    size: 60,
                    content: const AvatarContent.icon(
                      Icons.notifications,
                      color: Colors.white,
                    ),
                    glowConfig: GlowPresets.brightRed,
                    animationConfig: AnimationPresets.alert,
                  ),
                  GlowingAvatar(
                    size: 60,
                    content: const AvatarContent.icon(
                      Icons.spa,
                      color: Colors.white,
                    ),
                    glowConfig: GlowPresets.ocean,
                    animationConfig: AnimationPresets.zen,
                  ),
                  GlowingAvatar(
                    size: 60,
                    content: const AvatarContent.icon(
                      Icons.autorenew,
                      color: Colors.white,
                    ),
                    glowConfig: GlowPresets.rainbow,
                    animationConfig: AnimationPresets.spinning,
                  ),
                  GlowingAvatar(
                    size: 60,
                    content: const AvatarContent.icon(
                      Icons.bolt,
                      color: Colors.white,
                    ),
                    glowConfig: GlowPresets.sunset,
                    animationConfig: AnimationPresets.energetic,
                  ),
                  GlowingAvatar(
                    size: 60,
                    content: const AvatarContent.icon(
                      Icons.cloud,
                      color: Colors.white,
                    ),
                    glowConfig: GlowPresets.alertRed,
                    animationConfig: AnimationPresets.floating,
                  ),
                  GlowingAvatar(
                    size: 60,
                    content: const AvatarContent.icon(
                      Icons.favorite,
                      color: Colors.white,
                    ),
                    glowConfig: GlowPresets.warmOrange,
                    animationConfig: AnimationPresets.pulsing,
                  ),
                ],
              ),
            ],
          ),
        ),
      ),
    );
  }
}
7
likes
160
points
31
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides glowing avatar widgets with customizable effects and animations.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on glowing_avatar