flutter_animated_gradient_button 0.0.2+1 copy "flutter_animated_gradient_button: ^0.0.2+1" to clipboard
flutter_animated_gradient_button: ^0.0.2+1 copied to clipboard

Create a Flutter widget for a button with an animated gradient effect

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_animated_gradient_button/flutter_animated_gradient_button.dart';
// import 'pa';

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Flutter Animated Gradient Button"),
      ),
      body: Column(
        children: [
          Expanded(
            child: Container(
              width: double.infinity,
              height: 100,
              child: const Column(
                mainAxisSize: MainAxisSize.max,
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  AnimatedGradientButton(
                    btnText: "FAG_Button",
                    color1: Colors.green,
                    color2: Colors.yellow,
                    color3: Colors.red,
                    color4: Colors.blue,
                  ),
                ],
              ),
            ),
          ),
        ],
      ),
    );
  }
}
1
likes
160
points
18
downloads

Publisher

unverified uploader

Weekly Downloads

Create a Flutter widget for a button with an animated gradient effect

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter, flutter_animate

More

Packages that depend on flutter_animated_gradient_button