content: import 'package:flutter/material.dart';
  
  class LoadingWidget extends StatefulWidget {
    final double size;
    const LoadingWidget({super.key, this.size = 20});
  
    @override
    State<LoadingWidget> createState() => _LoadingWidgetState();
  }
  
  class _LoadingWidgetState extends State<LoadingWidget>
      with SingleTickerProviderStateMixin {
    late AnimationController _controller;
    late Animation<double> _animation;
  
    @override
    void initState() {
      super.initState();
      _controller = AnimationController(
        duration: const Duration(seconds: 2),
        vsync: this,
      )..repeat();
  
      _animation = CurvedAnimation(
        parent: _controller,
        curve: Curves.easeInOut,
      );
    }
  
    @override
    void dispose() {
      _controller.dispose();
      super.dispose();
    }
  
    @override
    Widget build(BuildContext context) {
      return Center(
        child: Container(
          width: widget.size * 1.2,
          height: widget.size * 1.2,
          padding: EdgeInsets.all(widget.size * 0.1),
          decoration: BoxDecoration(
            color: Theme.of(context).colorScheme.primary.withAlpha(26),
            borderRadius: BorderRadius.circular(widget.size),
          ),
          child: Stack(
            alignment: Alignment.center,
            children: [
              SizedBox(
                width: widget.size,
                height: widget.size,
                child: RotationTransition(
                  turns: _animation,
                  child: CircularProgressIndicator(
                    strokeWidth: widget.size * 0.12,
                    valueColor: AlwaysStoppedAnimation<Color>(
                      Theme.of(context).colorScheme.primary,
                    ),
                  ),
                ),
              ),
              Container(
                width: widget.size * 0.3,
                height: widget.size * 0.3,
                decoration: BoxDecoration(
                  color: Theme.of(context).colorScheme.primary,
                  shape: BoxShape.circle,
                ),
              ),
            ],
          ),
        ),
      );
    }
  }
  