dot_pagination_swiper 0.1.1 copy "dot_pagination_swiper: ^0.1.1" to clipboard
dot_pagination_swiper: ^0.1.1 copied to clipboard

A simple swiper with dot pagination for Flutter. Compatible with Android & iOS.

dot_pagination_swiper #

pub package Actions Status codecov

A simple swiper with dot pagination.

Usage #

To use this plugin, add dot_pagination_swiper as a dependency in your pubspec.yaml file.

Example #

Use default constructor

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

void main() => runApp(HomePage());

@immutable
class HomePage extends StatelessWidget {
  const HomePage({Key key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: DotPaginationSwiper(
          children: <Widget>[
            Center(child: Text('Page 1')),
            Center(child: Text('Page 2')),
            Center(child: Text('Page 3')),
            Center(child: Text('Page 4')),
            Center(child: Text('Page 5')),
          ],
        ),
      ),
    );
  }
}

Use builder constructor

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

void main() => runApp(HomePage());

@immutable
class HomePage extends StatelessWidget {
  const HomePage({Key key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: DotPaginationSwiper.builder(
          itemCount: 6,
          itemBuilder: (context, i) => Center(
            child: Text('Page $i'),
          ),
        ),
      ),
    );
  }
}
9
likes
40
pub points
55%
popularity

Publisher

verified publishertakuchalle.dev

A simple swiper with dot pagination for Flutter. Compatible with Android & iOS.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on dot_pagination_swiper