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

animated_toast_list 표지
패키지 상세v2.0.0

animated_toast_list

이 패키지를 사용하는 사람은 더 자유로운 느낌을 받을 것입니다. 이 패키지가 일반적이기 때문에 원하는 토스트를 만들 수 있습니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
940
좋아요
30
Pub 점수
160

패키지 설치

flutter pub add animated_toast_list

패키지 개요

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

AnimatedToastList는 개발자가 쉽게 사용할 수 있는 맞춤형 애니메이션 토스트 메시지를 생성할 수 있도록 해주는 Flutter 패키지입니다. 일반적이고 유연한 설계로 사용자가 자신만의 토스트 외관과 동작을 정의할 수 있어, 독특한 알림 스타일이 필요한 애플리케이션에 이상적입니다. Android, iOS, Web, macOS, Windows, Linux 등 다양한 플랫폼을 지원하여 기기 간 일관된 사용자 경험을 보장합니다. 부드러운 애니메이션과 단일 명령어를 통한 간편한 통합으로 복잡성을 추가하지 않고도 앱 피드백을 향상시킵니다.

사용 사례

  • 사용자 지정 앱 내 알림
  • 작업 후 사용자 피드백
  • 인터랙티브 UI 요소
  • 크로스 플랫폼 토스트 표시
  • 실시간 상태 업데이트

주요 기능

  • 매우 사용자 정의 가능한 토스트 디자인
  • 부드러운 애니메이션 효과
  • 다중 플랫폼 지원
  • Flutter와의 간단한 통합
  • 모든 토스트 스타일용 일반 템플릿

적합한 대상

  • 독특한 토스트 디자인을 찾는 개발자
  • 플랫폼에 관계없이 알림이 필요한 앱
  • 사용자 경험에 중점을 둔 프로젝트
  • UI 중심 애플리케이션
  • 재사용 가능한 알림 컴포넌트를 원하는 팀

고려 사항

  • 사용자 정의 스타일링 지식이 필요합니다
  • 복잡한 애니메이션에 대한 성능 튜닝이 필요할 수 있습니다
  • 제한된 내장 테마
  • 자주 사용자 상호작용이 있는 앱에 가장 적합
  • 동적 토스트를 위한 적절한 상태 관리에 의존합니다

원본 README

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

Introduction

When using Flutter, did you ever want to show toast with the design you want? Also, did you want to list the toast and show it with the desired animation? Then you have found what you are looking for! This package is generic, so there will be no problem with your toast. This package supports all platforms.

Usage

To use this package, wrap any widget with ToastListOverlay, as in the example below. For more details, see the example.

Widget build(BuildContext context) {
    return ToastListOverlay<MyToastModel>(
      itemBuilder: (BuildContext context, MyToastModel item, int index,
          Animation<double> animation) {
        return ToastItem(
          animation: animation,
          item: item,
          onTap: () => context.hideToast(
              item,
              (context, animation) =>
                  _buildItem(context, item, index, animation)),
        );
      },
      child: MaterialApp(
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: const MainScreen(),
        debugShowCheckedModeBanner: false,
      ),
    );
  }
Property Default value Description
child Required Widget Wrapped widget
position Alignment.topCenter Specifies where toast to be displayed.
reverse false Reverse the Toast list.
limit 5 Specify how much toast to display.
itemBuilder Required ToastListItemBuilder The Toast widget is defined here.
width 375 Specifies the width of the toast.
timeoutDuration 5 seconds Specifies how long toast will be displayed.

Now you can call the context.showToast method to display your toast. You can see more details in the example.

  context.showToast(MyToastModel(ToastType.success.name, ToastType.success));

Note: MyToastModel is an example model.

To close the Toast, call the context.hideToast method.

context.hideToast(
  item,
  (context, animation) => ToastItem(
    animation: animation,
    item: item,
  ),
);

Live demo

Example

The figure below shows when the toast exceeds the limit.
2022-06-11_01-25-41_AdobeExpress

The figure below shows how to remove the toast by clicking the close button.
2022-06-11_01-25-41_AdobeExpress (1)

In the figure below, you can see the toast without any problems even if you navigate to another screen.
2022-06-11_01-25-41_AdobeExpress (2)

The figure below shows the toast list reversed.
2022-06-11_01-39-18_AdobeExpress

카테고리

소스 저장소

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

아직 데이터가 없습니다.