custom_button 0.0.1 copy "custom_button: ^0.0.1" to clipboard
custom_button: ^0.0.1 copied to clipboard

Customizable button package

example/main.dart

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

void main() {
  runApp(
    MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Home(),
    ),
  );
}

class Home extends StatefulWidget {
  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.black.withAlpha(180),
      body: Container(
        child: Center(
          child: Button(
            borderRadius: BorderRadius.circular(20),
            child: Icon(Icons.person),
            onTap: () {
              ScaffoldMessenger.of(context).showSnackBar(
                SnackBar(
                  backgroundColor: Colors.blueGrey,
                  duration: Duration(seconds: 1),
                  content: Text(
                    'Button is tapped ',
                    textAlign: TextAlign.center,
                  ),
                ),
              );
            },
          ),
        ),
      ),
    );
  }
}
1
likes
100
pub points
44%
popularity

Publisher

unverified uploader

Customizable button package

Homepage

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on custom_button