flutter_custom_buttons 0.0.3 copy "flutter_custom_buttons: ^0.0.3" to clipboard
flutter_custom_buttons: ^0.0.3 copied to clipboard

Flutter Custom Buttons provide user to customize button to their need. User can manipulate width, height, radius, color, text, text color, and action.

example/lib/main.dart

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

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(primarySwatch: Colors.blue),
      home: const MyHomePage(),
    );
  }
}

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

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        alignment: Alignment.center,
        child: Buttons(
          width: 100.0,
          height: 60.0,
          radius: 12.0,
          elevation: 2.0,
          txt: "Button",
          textColor: Colors.white,
          fontSize: 20.0,
          onTap: () {
            ScaffoldMessenger.of(context).showSnackBar(
              const SnackBar(
                content: Text("Button pressed"),
              ),
            );
          },
          background: Theme.of(context).primaryColor,
        ),
      ),
    );
  }
}
0
likes
150
points
38
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter Custom Buttons provide user to customize button to their need. User can manipulate width, height, radius, color, text, text color, and action.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on flutter_custom_buttons