easy_actions 1.1.0 copy "easy_actions: ^1.1.0" to clipboard
easy_actions: ^1.1.0 copied to clipboard

A Flutter package for simple and easy to use buttons, checkboxes and switches.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Easy Actions Demo',
      theme: ThemeData(
        primarySwatch: Colors.purple,
      ),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text(
          'Easy Actions',
        ),
      ),
      body: Padding(
        padding: const EdgeInsets.fromLTRB(20, 12, 20, 0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: [
            const Text(
              'Elevated Buttons',
              style: TextStyle(
                fontSize: 20,
                fontWeight: FontWeight.bold,
              ),
            ),
            const SizedBox(
              height: 8,
            ),
            Wrap(
              spacing: 12,
              runSpacing: 12,
              children: [
                EasyElevatedButton(
                  label: 'Simple',
                  onPressed: () {},
                ),
                EasyElevatedButton(
                  label: 'Rounded',
                  isRounded: true,
                  onPressed: () {},
                ),
                EasyElevatedButton(
                  label: 'Elevated',
                  isRounded: true,
                  elevation: 12,
                  onPressed: () {},
                ),
                EasyElevatedButton(
                  label: 'Leading Icon',
                  isRounded: true,
                  icon: const Icon(
                    Icons.add,
                    size: 20,
                  ),
                  onPressed: () {},
                ),
                EasyElevatedButton(
                  label: 'Trailing Icon',
                  isRounded: true,
                  icon: const Icon(
                    Icons.add,
                    size: 20,
                  ),
                  isTrailingIcon: true,
                  onPressed: () {},
                ),
                EasyElevatedButton(
                  label: 'Custom Color',
                  isRounded: true,
                  icon: const Icon(
                    Icons.add,
                    size: 20,
                  ),
                  isTrailingIcon: true,
                  color: Colors.red,
                  onPressed: () {},
                ),
              ],
            ),
            const SizedBox(
              height: 24,
            ),
            const Text(
              'Outlined Buttons',
              style: TextStyle(
                fontSize: 20,
                fontWeight: FontWeight.bold,
              ),
            ),
            const SizedBox(
              height: 8,
            ),
            Wrap(
              spacing: 12,
              runSpacing: 12,
              children: [
                EasyOutlinedButton(
                  label: 'Simple',
                  onPressed: () {},
                ),
                EasyOutlinedButton(
                  label: 'Rounded',
                  isRounded: true,
                  onPressed: () {},
                ),
                EasyOutlinedButton(
                  label: 'Leading Icon',
                  isRounded: true,
                  icon: const Icon(
                    Icons.add,
                    size: 20,
                  ),
                  onPressed: () {},
                ),
                EasyOutlinedButton(
                  label: 'Trailing Icon',
                  isRounded: true,
                  icon: const Icon(
                    Icons.add,
                    size: 20,
                  ),
                  isTrailingIcon: true,
                  onPressed: () {},
                ),
                EasyOutlinedButton(
                  label: 'Custom Color',
                  isRounded: true,
                  icon: const Icon(
                    Icons.add,
                    size: 20,
                    color: Colors.red,
                  ),
                  isTrailingIcon: true,
                  color: Colors.red,
                  labelColor: Colors.red,
                  onPressed: () {},
                ),
              ],
            ),
            const SizedBox(
              height: 24,
            ),
            const Text(
              'Icon Buttons',
              style: TextStyle(
                fontSize: 20,
                fontWeight: FontWeight.bold,
              ),
            ),
            const SizedBox(
              height: 8,
            ),
            Wrap(
              spacing: 12,
              runSpacing: 12,
              children: [
                EasyIconButton(
                  icon: Icons.add,
                  onPressed: () {},
                ),
                EasyIconButton(
                  icon: Icons.add,
                  isRounded: true,
                  onPressed: () {},
                ),
                EasyIconButton(
                  icon: Icons.add,
                  elevation: 0,
                  borderRadius: 2,
                  onPressed: () {},
                ),
                EasyIconButton(
                  icon: Icons.add,
                  isRounded: true,
                  elevation: 12,
                  onPressed: () {},
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
4
likes
90
pub points
63%
popularity

Publisher

verified publisherashishbhakhand.com

A Flutter package for simple and easy to use buttons, checkboxes and switches.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on easy_actions