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

flutter_polls 표지
패키지 상세v0.1.6

flutter_polls

Flutter용 사용자 정의 가능한 설문조사. 간단하고 사용하기 쉬우며 매우 사용자 정의 가능합니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
1.1천
좋아요
170
Pub 점수
150

패키지 설치

flutter pub add flutter_polls

패키지 개요

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

Flutter Polls는 Flutter 애플리케이션에 인터랙티브한 설문 조사를 통합하기 위한 사용자 정의가 가능하고 사용하기 쉬운 패키지입니다. 소셜 미디어 및 커뮤니티 중심 앱을 위해 설계되었으며, 최소한의 설정으로 설문 조사 생성 및 표시를 가능하게 합니다. Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원하여 광범위한 호환성을 보장합니다. 간단함과 유연성에 중점을 두어 설문 조사의 외관, 응답 및 상호작용을 사용자 정의할 수 있습니다. 사용자 피드백이나 투표를 통해 참여를 유도하는 앱에 적합합니다.

사용 사례

  • 사용자 피드백 수집
  • 커뮤니티 참여 기능
  • 인터랙티브 앱 콘텐츠
  • 실시간 투표 시스템
  • 소셜 미디어 통합
  • 게임화된 사용자 상호작용

주요 기능

  • 높은 사용자 정의 가능한 UI
  • 크로스 플랫폼 지원
  • 간단한 API 통합
  • 실시간 응답 추적
  • 다중 선택 및 평가 설문지 지원
  • 가볍고 빠른 성능

적합한 대상

  • 소셜 미디어 앱
  • 교육 플랫폼
  • 설문 도구
  • 이벤트 기획 앱
  • 커뮤니티 포럼
  • 사용자 참여 기능

고려 사항

  • 고급 디자인을 위해 사용자 정의 스타일이 필요합니다
  • 제한된 내장 분석
  • 기본적으로 서버 측 지속성 없음
  • 데이터 동기화를 위한 외부 상태 관리에 의존
  • 대규모 폴링 시스템에 최적화되지 않음

원본 README

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

Flutter Polls

Customizable Polls for Flutter. Simple, easy to use and highly customizable.

flutter_polls

Flutter Polls on pub.dev

Getting Started

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

dependencies:
  ...
  flutter_polls: ^0.1.6

Import it:

import 'package:flutter_polls/flutter_polls.dart';

Example

Check out the example project in the example directory here: example on github

flutter_polls
FlutterPolls(
    pollId: '1',
    onVoted: (PollOption pollOption, int newTotalVotes) {
      print('Voted: ${pollOption.id}');
    },
    pollOptionsSplashColor: Colors.white(),
    votedProgressColor: Colors.greyDark().withOpacity(0.3),
    votedBackgroundColor: Colors.grey().withOpacity(0.2),
    votesTextStyle: themeData.textTheme.subtitle1,
    votedPercentageTextStyle:
        themeData.textTheme.headline4?.copyWith(
    color: Colors.black(),
    ),
    votedCheckmark: Icon(
        Icons.circle_check,
        color: AppColors.black(),
        height: 18,
        width: 18,
    ),
    pollTitle: Align(
    alignment: Alignment.centerLeft,
    child: AutoSizeText(
        poll['title'],
        style: TextStyle(
            fontSize: 20,
        ),
    ),
    pollOptions: poll['options'].map(
    (option) {
        return PollOption(
        id: option['id'],
        title: AutoSizeText(
            option['title'],
            style: tTextStyle(
            fontSize: 20,
        ),
        ),
        votes: option['votes'],
        );
    },
    ).toList(),
    metaWidget: Row(
    children: [
        const SizedBox(width: 6),
        AutoSizeText(
        '•',
        style: TextStyle(
            fontSize: 20,
        ),
        ),
        const SizedBox(
        width: 6,
        ),
        AutoSizeText(
        '2 weeks left',
        style: TextStyle(
            fontSize: 20,
        ),
        ),
    ],
    ),
),

Parameters

Parameter Type Description
pollId String The poll id.
hasVoted bool Whether the user has voted.
userVotedOptionId String The user voted option id. If the user hasn't voted, this will be null.
onVoted void Function(PollOption pollOption, int newTotalVotes) The callback when the user voted.
pollTitle Widget The poll title. Can be any widget.
pollOptions List The poll options. Each item is a map with the following keys: id, title, votes.
heightBetweenTitleAndOptions double The height between the poll title and the poll options.
heightBetweenOptions double The height between the poll options.
votesText String Votes text. Can be "Votes", "Votos", "Ibo" or whatever language. If not specified, "Votes" is used.
votesTextStyle TextStyle The style of the votes text.
metaWidget Widget The meta widget. Can be any widget.
createdBy String The poll creator.
userToVote String The user to vote.
pollStartDate DateTime The poll start date.
pollEnded bool If the poll is closed.
pollOptionsHeight double The poll options height.
pollOptionsWidth double The poll options width.
pollOptionsBorderRadius BorderRadius The poll options border radius.
pollOptionsBorder BoxBorder The poll options border.
pollOptionsFillColor Color The poll options fill color.
pollOptionsSplashColor Color The poll options splash color.
votedPollOptionsRadius Radius The voted poll options border radius.
votedBackgroundColor Color The voted poll options background color.
votedProgressColor Color The voted poll options progress color.
voteInProgressColor Color The voted poll options background color when user has voted and its still in progress.
votedCheckmark Widget The voted poll options checkmark.
votedPercentageTextStyle TextStyle The voted poll options percentage text style.
votedAnimationDuration int The voted poll options animation duration.
loadingWidget Widget The loading widget when a user votes. Can be any widget.

카테고리

의존성

의존성 목록 2 개

소스 저장소

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

아직 데이터가 없습니다.