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

discontinued
outdated

A new button which requires only few changes to get your desired button.

example/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            MBButton(text: "Click Here", onTapFunction: _incrementCounter),
            Text(
              "$_counter",
              style: TextStyle(fontSize: 30),
            ),
          ],
        ),
      ),
    );
  }
}
7
likes
40
points
46
downloads

Publisher

verified publishermoulibheemaneti.com

Weekly Downloads

A new button which requires only few changes to get your desired button.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on mb_button