Buscar categorias, pacotes e repositórios

Capa de flutter_image_slideshow
Detalhes do pacotev0.1.6

flutter_image_slideshow

Um widget de apresentação de imagens simples. Principalmente destinado a widgets de imagem, mas outros widgets também podem ser usados.

AndroidiOSWebmacOSWindowsLinux
Downloads em 30 dias
7,1 mil
Curtidas
202
Pontos Pub
160

Instalar pacote

flutter pub add flutter_image_slideshow

Visão geral do pacote

Orientação gerada a partir de informações públicas. Apenas para referência.

Um widget leve do Flutter para criar apresentações de imagens com transições suaves. Projetado principalmente para exibir imagens, também oferece suporte a widgets personalizados dentro da apresentação. Ideal para galerias, demonstrações de produtos ou telas de introdução. O pacote é multiplataforma, funcionando perfeitamente em Android, iOS, Web, macOS, Windows e Linux. Oferece integração simples por meio de uma única dependência e fornece uma API limpa para gerenciar slides e animações.

Casos de uso

  • Galerias de imagens
  • Carrosséis de produtos
  • Telas de onboarding
  • Sinalização digital
  • Interfaces de apresentação

Principais recursos

  • Transições suaves de deslizamento
  • Suporte para widgets personalizados
  • Compatibilidade multiplataforma
  • Configuração simples com pub add
  • Reprodução automática e duração configuráveis

Indicado para

  • Desenvolvedores construindo exibições de conteúdo visual
  • Aplicativos que precisam de apresentações interativas de imagens
  • Projetos que exigem configuração mínima para apresentações de slides

Considerações

  • Pode exigir otimização para grandes conjuntos de imagens
  • Personalização limitada para animações complexas
  • Não ideal para apresentações de vídeo de alto desempenho

README original

Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.

flutter_image_slideshow

A simple image slideshow widget. Mainly intended for image widget, but other widgets can also be used.

Getting Started

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  flutter:
    sdk:
  flutter_image_slideshow: any

In your library add the following import:

  import 'package:flutter_image_slideshow/flutter_image_slideshow.dart';

Usage

These are The ImageSlideshow properties.

/// The widgets to display in the [ImageSlideshow].
///
/// Mainly intended for image widget, but other widgets can also be used.
List<Widget> children

/// Width of the [ImageSlideshow].
double width

/// Height of the [ImageSlideshow].
double height

/// The page to show when first creating the [ImageSlideshow].
int initialPage

/// The color to paint the indicator.
Color indicatorColor

/// The color to paint behind th indicator.
Color indicatorBackgroundColor

/// Called whenever the page in the center of the viewport changes.
ValueChanged<int> onPageChanged

/// Auto scroll interval.
///
/// Do not auto scroll with null or 0.
int autoPlayInterval

/// Loops back to first slide.
bool isLoop

/// Radius of circle indicator.
double indicatorRadius

/// Disable page changes by the user.
bool disableUserScrolling

Example

Create the ImageSlideshow widget. And pass the parameters.

import 'package:flutter/material.dart';
import 'package:flutter_image_slideshow_test/flutter_image_slideshow.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Demo'),
        ),
        body: ImageSlideshow(

          /// Width of the [ImageSlideshow].
          width: double.infinity,

          /// Height of the [ImageSlideshow].
          height: 200,

          /// The page to show when first creating the [ImageSlideshow].
          initialPage: 0,

          /// The color to paint the indicator.
          indicatorColor: Colors.blue,

          /// The color to paint behind th indicator.
          indicatorBackgroundColor: Colors.grey,

          /// The widgets to display in the [ImageSlideshow].
          /// Add the sample image file into the images folder
          children: [
            Image.asset(
              'images/sample_image_1.jpg',
              fit: BoxFit.cover,
            ),
            Image.asset(
              'images/sample_image_2.jpg',
              fit: BoxFit.cover,
            ),
            Image.asset(
              'images/sample_image_3.jpg',
              fit: BoxFit.cover,
            ),
          ],

          /// Called whenever the page in the center of the viewport changes.
          onPageChanged: (value) {
            print('Page changed: $value');
          },

          /// Auto scroll interval.
          /// Do not auto scroll with null or 0.
          autoPlayInterval: 3000,

          /// Loops back to first slide.
          isLoop: true,
        ),
      ),
    );
  }
}

Categorias

Repositório-fonte

Projetos que usam este pacote

Ainda não há dados.