GitHub repositorytakuchalle/dot_pagination_swiper

dot_pagination_swiper

A simple swiper with dot pagination

dot_pagination_swiper project cover
Stars
3
Forks
4
Last push (UTC)
Jan 20, 2022
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

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'),
          ),
        ),
      ),
    );
  }
}
takuchalle GitHub avatar
GitHub author

takuchalle ↗

Software Engineer in Japan. I love low-layer programming.

LanguagesDartSwiftKotlinObjective-C

Categories

Dependencies used

Dependency list 3 items

  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}
  • pedanticDevelopment^1.8.0

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗