패키지, 저장소 및 앱 카테고리 검색

flutter_rating_stars 표지
패키지 상세v1.1.0

flutter_rating_stars

평가 별 바를 생성하기 위한 플러터 패키지입니다. 멋진 앱에 유용할 것입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
7천
좋아요
108
Pub 점수
150

패키지 설치

flutter pub add flutter_rating_stars

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

스타 기반 평가를 표시하고 상호작용할 수 있도록 해주는 사용자 정의 가능한 별점 위젯을 제공하는 플러터 패키지입니다. 부드러운 사용자 입력과 시각적 피드백을 지원하며 리뷰, 제품 평가 또는 앱 평가에 적합합니다. 가볍고 통합이 쉬우며 안드로이드, iOS, 웹, 맥OS, 윈도우, 리눅스 등 모든 주요 플랫폼에서 작동합니다.

사용 사례

  • 제품 리뷰 표시
  • 사용자 피드백 수집
  • 앱 평가 인터페이스
  • 콘텐츠 평가 시스템
  • 인터랙티브 평가 위젯

주요 기능

  • 사용자 정의 가능한 별 크기 및 색상
  • 반성급 평가 지원
  • 콜백과의 탭 상호작용
  • 다양한 플랫폼 간 반응형 디자인
  • 최소 설정으로 간편한 통합

적합한 대상

  • 사용자 평가 기능이 필요한 앱
  • 전자상거래 또는 리뷰 플랫폼
  • 모바일 및 웹 애플리케이션
  • 경량 UI 컴포넌트를 찾는 개발자
  • 크로스 플랫폼 일관성이 필요한 프로젝트

고려 사항

  • 별 기반 평가만 가능
  • 내장 애니메이션 효과 없음
  • 등급 상태 관리를 수동으로 처리해야 합니다
  • 접근성 향상용으로 설계되지 않음
  • 동적 별 개수 사용자 정의에 대한 지원 없음

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Flutter Rating Stars

A Flutter package to create Rating Stars bar. It will be useful for your awesome app.

Demo

Example
import 'package:flutter/material.dart';
import 'package:flutter_rating_stars/flutter_rating_stars.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  double value = 3.5;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: Text('Example'),
        ),
        body: Container(
          alignment: Alignment.center,
          color: Colors.blueGrey,
          padding: EdgeInsets.all(36),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Text('Horizontal example'),
              RatingStars(
                value: value,
                onValueChanged: (v) {
                  //
                  setState(() {
                    value = v;
                  });
                },
                starBuilder: (index, color) => Icon(
                  Icons.accessibility_new,
                  color: color,
                ),
                starCount: 5,
                starSize: 20,
                valueLabelColor: const Color(0xff9b9b9b),
                valueLabelTextStyle: const TextStyle(
                    color: Colors.white,
                    fontWeight: FontWeight.w400,
                    fontStyle: FontStyle.normal,
                    fontSize: 12.0),
                valueLabelRadius: 10,
                maxValue: 5,
                starSpacing: 2,
                maxValueVisibility: true,
                valueLabelVisibility: true,
                animationDuration: Duration(milliseconds: 1000),
                valueLabelPadding:
                const EdgeInsets.symmetric(vertical: 1, horizontal: 8),
                valueLabelMargin: const EdgeInsets.only(right: 8),
                starOffColor: const Color(0xffe7e8ea),
                starColor: Colors.yellow,
              ),
              const Divider(height: 10),
              Text('Vertical example'),
              Row(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  RatingStars(
                    axis: Axis.vertical,
                    value: value,
                    onValueChanged: (v) {
                      //
                      setState(() {
                        value = v;
                      });
                    },
                    starCount: 5,
                    starSize: 20,
                    valueLabelColor: const Color(0xff9b9b9b),
                    valueLabelTextStyle: const TextStyle(
                        color: Colors.white,
                        fontWeight: FontWeight.w400,
                        fontStyle: FontStyle.normal,
                        fontSize: 12.0),
                    valueLabelRadius: 10,
                    maxValue: 5,
                    starSpacing: 2,
                    maxValueVisibility: true,
                    valueLabelVisibility: true,
                    animationDuration: Duration(milliseconds: 1000),
                    valueLabelPadding:
                    const EdgeInsets.symmetric(vertical: 1, horizontal: 8),
                    valueLabelMargin: const EdgeInsets.only(right: 8),
                    starOffColor: const Color(0xffe7e8ea),
                    starColor: Colors.yellow,
                  ),
                ],
              ),
              const Divider(height: 10),
              Text('Rotate example'),
              RatingStars(
                axis: Axis.horizontal,
                value: value,
                onValueChanged: (v) {
                  //
                  setState(() {
                    value = v;
                  });
                },
                starCount: 5,
                starSize: 20,
                valueLabelColor: const Color(0xff9b9b9b),
                valueLabelTextStyle: const TextStyle(
                    color: Colors.white,
                    fontWeight: FontWeight.w400,
                    fontStyle: FontStyle.normal,
                    fontSize: 12.0),
                valueLabelRadius: 10,
                maxValue: 5,
                starSpacing: 2,
                maxValueVisibility: true,
                valueLabelVisibility: true,
                animationDuration: Duration(milliseconds: 1000),
                valueLabelPadding:
                const EdgeInsets.symmetric(vertical: 1, horizontal: 8),
                valueLabelMargin: const EdgeInsets.only(right: 8),
                starOffColor: const Color(0xffe7e8ea),
                starColor: Colors.yellow,
                angle: 12,
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Development environment
[√] Flutter (Channel stable, 3.19.6, on Microsoft Windows [Version 10.0.19045.4291], locale en-US)
    • Flutter version 3.19.6 on channel stable at C:\Users\admin\fvm\default
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (2 days ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.