flutter_bounce 1.0.8
flutter_bounce: ^1.0.8 copied to clipboard

Flutter Android iOS Linux macOS web Windows

An effiecient flutter package for an on-tap bounce animation to the wrapped around widget. It targets on both the mobile platforms, i.e., iOS and Android.

example/lib/main.dart

import 'package:flutter/material.dart';
import './bounce_demo.dart';
import './bounce_scroll.dart';

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Bounce',
      theme: ThemeData(
        //primarySwatch: Colors.indigo[400],
        primaryColor: Colors.indigo[400],
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Bounce Demo'),
    );
  }
}

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

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

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {
    
    return Scaffold(
      appBar: AppBar(
        centerTitle: true,
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            RaisedButton(
              onPressed: (){ Navigator.push(context, new MaterialPageRoute(
                builder: (context) => SimpleBounceDemo())
              ); },
              elevation: 5.0,
              color: Theme.of(context).primaryColor,
              textColor: Colors.white,
              child: Text('Simple Bounce Demo')
            ),
            SizedBox(height: 20.0),
            RaisedButton(
              elevation: 5.0,
              onPressed: (){ Navigator.push(context, new MaterialPageRoute(
                builder: (context) => BounceScroll())); },
              textColor: Colors.white,
              color: Theme.of(context).primaryColor,
              child: Text('Bounce with Scroll')
            )
          ]
        )
       ) // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
29
likes
110
pub points
80%
popularity

An effiecient flutter package for an on-tap bounce animation to the wrapped around widget. It targets on both the mobile platforms, i.e., iOS and Android.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

alokk830@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_bounce