Buttons Swiper

Buttons Swiper package lets you add a beautiful Buttons Swiper to your Flutter app.

Installation

  1. Add the latest version of package to your pubspec.yaml (and runflutter pub get):
dependencies:
  buttons_swiper: ^0.1.0
  1. Import the package and use it in your Flutter App.
import 'package:buttons_swiper/buttons_swiper.dart';

Example

There are a number of properties that you can modify:

  • alignement
  • height
  • circleBorderWidth
  • circleBorderColor
  • onTap
  • firstIconsList
  • secondIconsList
  • loop
  • fade
  • startIndex
  • viewportFraction
  • scale

class SwiperTest extends StatelessWidget {
  const SwiperTest({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.orange,
      body: Container(
        child: swiper(
          onTap: (index) {
            print(index);
          },
          onSwip: (index) {
            print(index);
          },
          pages: [
            Container(color: Colors.blueAccent,),
            Container(color: Colors.redAccent,),
            Container(color: Colors.yellow,),
          ],
          height: 100,
          alignement: Alignment.bottomCenter,
          circleBorderColor: Colors.white,
          secondIconsList: [
            Text(
              "BUY",
              style: TextStyle(
                color: Colors.red,
                fontWeight: FontWeight.w900,
              ),
              textScaleFactor: 2.0,
            ),
            Text(
              "SETUP",
              style: TextStyle(
                color: Colors.red,
                fontWeight: FontWeight.w900,
              ),
              textScaleFactor: 1.7,
            ),
            Text(
              "CALL",
              style: TextStyle(
                color: Colors.red,
                fontWeight: FontWeight.w900,
              ),
              textScaleFactor: 2.0,
            ),
          ],
          firstIconsList: [
            Icon(
              Icons.monetization_on,
              color: Colors.white,
              size: 50,
            ),
            Icon(
              Icons.settings,
              color: Colors.white,
              size: 50,
            ),
            Icon(
              Icons.phone_enabled,
              color: Colors.white,
              size: 50,
            )
          ],
        ),
      ),
    );
  }
}

Next Goals

  • Add More Animations.
  • Add More Controlls.

Libraries

buttons_swiper