dismissible_carousel_viewpager 0.0.7 copy "dismissible_carousel_viewpager: ^0.0.7" to clipboard
dismissible_carousel_viewpager: ^0.0.7 copied to clipboard

This is a view pager provides carousel effect and dismissal animation when page was removed.

example/lib/main.dart

import 'package:dismissible_carousel_viewpager_example/demo/base_usage_page.dart';
import 'package:flutter/material.dart';

import 'demo/base_page.dart';
import 'demo/dismissal_usage_page.dart';

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

final List<BasePage> _allPages = <BasePage>[
  const BaseUsagePage(),
  const DismissalUsagePage(),
];

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: _DemoListPage(),
    );
  }
}

class _DemoListPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) => Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: ListView.separated(
          itemBuilder: (context, index) {
            BasePage page = _allPages[index];
            return ListTile(
              minVerticalPadding: 16,
              title: Text(page.title),
              subtitle: page.desc,
              onTap: () {
                Navigator.push(
                    context,
                    MaterialPageRoute(
                      builder: (context) => page,
                    ));
              },
            );
          },
          itemCount: _allPages.length,
          separatorBuilder: (BuildContext context, int index) => ColoredBox(
              color: Colors.grey.withOpacity(0.2),
              child: const SizedBox(
                width: double.infinity,
                height: 1,
              )),
        ),
      );
}
26
likes
160
points
56
downloads

Publisher

verified publisherzyzdev.dev

Weekly Downloads

This is a view pager provides carousel effect and dismissal animation when page was removed.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on dismissible_carousel_viewpager