Buscar pacotes, repositórios e categorias de apps

Capa de animated_rating_stars
Detalhes do pacotev1.0.1

animated_rating_stars

Um widget de barra de classificação do Flutter altamente personalizável para classificações baseadas em estrelas interativas.

AndroidiOSWebmacOSWindowsLinux
Downloads em 30 dias
2 mil
Curtidas
54
Pontos Pub
140

Instalar pacote

flutter pub add animated_rating_stars

Visão geral do pacote

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

Um widget personalizável do Flutter para classificações baseadas em estrelas interativas com animações suaves. Permite que os usuários selecionem classificações visualmente usando estrelas animadas, suportando modos de classificação únicos e contínuos. O widget é altamente configurável, permitindo personalização do tamanho da estrela, cor, espaçamento e efeitos de animação. Ideal para formulários de feedback, avaliações e avaliações de usuários em múltiplas plataformas.

Casos de uso

  • sistemas de avaliações de usuários
  • Interfaces de classificação de produtos
  • Formulários de coleta de feedback
  • Pesquisas interativas
  • Seções de revisão do aplicativo

Principais recursos

  • Transições animadas suaves de estrelas
  • Aparência personalizável da estrela
  • Suporte para classificações contínuas e discretas
  • Compatibilidade multiplataforma
  • Integração fácil com o Flutter
  • Comportamento de toque configurável

Indicado para

  • Widgets de classificação em aplicativos
  • Componentes de feedback interativo
  • Aplicações móveis e web
  • Designers procurando apelo visual
  • Desenvolvedores que precisam de soluções leves

Considerações

  • Validação embutida limitada
  • Sem estilo padrão fora da caixa
  • Requer manuseio manual do estado de classificação
  • O desempenho da animação pode variar em dispositivos de baixa gama
  • Não adequado para tipos de classificação não estrela

README original

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

Animated Rating Stars for Flutter

Package Version Package Downloads GitHub Stars GitHub Forks License

AnimatedRatingStars is a highly customizable animated rating bar widget for Flutter. It allows users to interactively provide ratings by tapping on stars. The package offers a wide range of customization options and is designed to be easy to integrate into your Flutter applications.

Demo

DEMO1 DEMO2 DEMO3

Features

  • Create animated rating bars with filled, half-filled, and empty stars.
  • Customize star colors, icons, sizes, and animation parameters.
  • Display the rating value and enable interactive tooltips for half-filled stars.
  • Supports both read-only and interactive modes.

Installation

To use this package, add animated_rating_stars as a dependency in your pubspec.yaml file:

dependencies:
  animated_rating_stars: ^1.0.1

Then, run flutter pub get to fetch the package.

Usage

Import the package in your Dart code:

import 'package:animated_rating_stars/animated_rating_stars.dart';

Now, you can use the AnimatedRatingStars widget in your Flutter app:

AnimatedRatingStars(
  initialRating: 3.5,
  minRating: 0.0,
  maxRating: 5.0,
  filledColor: Colors.amber,
  emptyColor: Colors.grey,
  filledIcon: Icons.star,
  halfFilledIcon: Icons.star_half,
  emptyIcon: Icons.star_border,
  onChanged: (double rating) {
    // Handle the rating change here
    print('Rating: $rating');
  },
  displayRatingValue: true,
  interactiveTooltips: true,
  customFilledIcon: Icons.star,
  customHalfFilledIcon: Icons.star_half,
  customEmptyIcon: Icons.star_border,
  starSize: 30.0,
  animationDuration: Duration(milliseconds: 300),
  animationCurve: Curves.easeInOut,
  readOnly: false,
)

Customize the properties according to your requirements. The onChanged callback is called when the rating changes.

For more examples and usage details, refer to the examples directory included with this package.

Customization

You can customize the appearance and behavior of the rating bar using the following properties:

  • initialRating: The initial rating value.
  • minRating: The minimum rating value.
  • maxRating: The maximum rating value.
  • filledColor: The color for filled stars.
  • emptyColor: The color for empty stars.
  • filledIcon: The icon used for filled stars.
  • halfFilledIcon: The icon used for half-filled stars.
  • emptyIcon: The icon used for empty stars.
  • displayRatingValue: Show or hide the rating value.
  • interactiveTooltips: Enable interactive tooltips for half-filled stars.
  • customFilledIcon: Use a custom icon for filled stars.
  • customHalfFilledIcon: Use a custom icon for half-filled stars.
  • customEmptyIcon: Use a custom icon for empty stars.
  • starSize: Set the size of each star.
  • animationDuration: Adjust the duration of the animation when the rating changes.
  • animationCurve: Define the animation curve for the rating change.
  • readOnly: Make the widget read-only.

Customization

Contributions and feedback are welcome! If you encounter any issues or have feature requests, please open an issue on GitHub.

License

This package is distributed under the MIT License. See LICENSE for details.

For more Flutter packages and development resources, visit pub.dev.

Categorias

Dependências

Lista de dependências 1 itens

  • plugin_platform_interface^2.0.2

Repositório-fonte

Projetos que usam este pacote