dynamic_button 0.0.7 copy "dynamic_button: ^0.0.7" to clipboard
dynamic_button: ^0.0.7 copied to clipboard

A customizable Flutter widget that simplifies creating dynamic containers with various styles, animations, and behaviors. Ideal for creating interactive UI elements with ease.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'DynamicButton Example',
      home: ExamplePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('DynamicButton Example'),
      ),
      body: Center(
        child: DynamicButton(
          onTap: (String label) {
            // Handle button tap with button label
            print('Tapped button: $label');
          },
          list: const ['Option 1', 'Option 2', 'Option 3'], // Example data
          selectedColor: Colors.red,
          color: Colors.blueAccent,
          borderColor: Colors.black,
          border: 1,
          radius: 18,
          elevation: 15,
          labelStyle: TextStyle(color: Colors.white, fontSize: 15),
        ),
      ),
    );
  }
}
1
likes
160
points
31
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable Flutter widget that simplifies creating dynamic containers with various styles, animations, and behaviors. Ideal for creating interactive UI elements with ease.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on dynamic_button