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

outdated

An animated button that expands and changes colour on clicking

example/example.dart

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

class Example extends StatefulWidget {
  @override
  _ExampleState createState() => _ExampleState();
}

class _ExampleState extends State<Example> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Expanding Button Example'),
      ),
      body: Material(
        child: Center(
          // Using the Expanding Button
          child: ExpandingButton(
            child: Text('Finesse', style: TextStyle(color: Colors.white)),
            onTap: () {print('expand');},
            onTapWhenExpanded: () {print('collapse');},
            background: Colors.blue,
            backgroundAfterAnimation: Colors.greenAccent,
          ),
        ),
      ),
    );
  }
}
8
likes
30
pub points
13%
popularity

Publisher

unverified uploader

An animated button that expands and changes colour on clicking

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on expanding_button