nice_carousel 0.1.0 copy "nice_carousel: ^0.1.0" to clipboard
nice_carousel: ^0.1.0 copied to clipboard

A simple yet nice carousel library for your Flutter mobile apps

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:nice_carousel/carousel_slide.dart';
import 'package:nice_carousel/carousel_slides.dart';

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      color: Colors.white,
      title: 'Custom Carousel',
      home: Scaffold(
        body: ListView(
          children: [
            const SizedBox(
              height: 200,
            ),
            CarouselSlides(
              indicatorPosition: SlideIndicatorPosition.right,
              slides: [
                CarouselSlide(
                  title: '80% off',
                  description: 'Free\ndiscount'.toUpperCase(),
                  imageAsset: 'assets/img/1.webp',
                ),
                CarouselSlide(
                  title: '60% off',
                  description: 'Buy\nonline now'.toUpperCase(),
                  imageAsset: 'assets/img/2.webp',
                ),
                CarouselSlide(
                  title: '50% off',
                  description: 'Grab\ndeals now'.toUpperCase(),
                  imageAsset: 'assets/img/3.webp',
                ),
                CarouselSlide(
                  title: '20% off',
                  description: 'Shop\nonline now'.toUpperCase(),
                  imageAsset: 'assets/img/4.webp',
                ),
              ],
              height: 300,
            ),
          ],
        ),
      ),
    );
  }
}
4
likes
120
pub points
25%
popularity

Publisher

verified publisherethieladiassa.me

A simple yet nice carousel library for your Flutter mobile apps

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on nice_carousel