bounce_tap 1.0.0 copy "bounce_tap: ^1.0.0" to clipboard
bounce_tap: ^1.0.0 copied to clipboard

retracted

A great and efficacious flutter package to add an on-tap bounce animation on any flutter widget

example/lib/main.dart

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

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

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

  // 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: const MyHomePage(title: 'Flutter Bounce Demo'),
    );
  }
}

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

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) => Scaffold(
      appBar: AppBar(
        centerTitle: true,
        title: Text(widget.title),
      ),
      body: Center(
        child: BounceTap(
          onTap: () {
            ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
                content: Text('Bounce tap button handler called')));
          },
          child: Container(
            decoration: BoxDecoration(
              color: Colors.deepPurpleAccent,
              borderRadius: BorderRadius.circular(12),
              boxShadow: const [
                BoxShadow(offset: Offset(0, 5), blurRadius: 10)
              ],
            ),
            child: const Text(
              'Bounce tap',
              style: TextStyle(
                color: Colors.white,
              ),
            ),
          ),
        ),
      ) // This trailing comma makes auto-formatting nicer for build methods.
      );
}
9
likes
0
pub points
41%
popularity

Publisher

verified publisherethieladiassa.me

A great and efficacious flutter package to add an on-tap bounce animation on any flutter widget

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on bounce_tap