flutter_toastify 2.0.5
flutter_toastify: ^2.0.5 copied to clipboard
Customizable animated toast notifications for Flutter with success, error, info and custom styles, progress indicator and action support.
FlutterToastify #
EN · Animated toast notifications for Flutter with success, error, info and custom styles, an optional progress bar, action links and custom close buttons. No dependencies.
TR · Flutter için başarı, hata, bilgi ve özel stillerde, ilerleme çubuklu, eylem bağlantılı ve özel kapatma düğmeli animasyonlu toast bildirimleri. Bağımlılığı yoktur.
| Success | Error | Custom | Action |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Features / Özellikler #
- Built-in
success,errorandinfostyles, or your own icon and colors. / Hazır stiller ya da kendi ikonunuz ve renkleriniz. - 9 positions and 4 slide directions. / 9 konum ve 4 kayma yönü.
- Remaining time progress bar, auto dismiss or persistent toasts. / Kalan süre çubuğu, kendiliğinden kapanan ya da kalıcı bildirimler.
- Action link and custom close button. / Eylem bağlantısı ve özel kapatma düğmesi.
- Works in
MaterialAppandCupertinoApp; shown on the root overlay, so it stays visible across route changes. /MaterialAppveCupertinoAppile çalışır; kök overlay'da gösterilir. - Accessible: announced as a live region, 48x48 close button with a localized label, RTL aware. / Erişilebilir: canlı bölge olarak okunur, 48x48 etiketli kapatma düğmesi, RTL desteği.
Installation / Kurulum #
dependencies:
flutter_toastify: ^2.0.5
Requirements / Gereksinim: Dart 3.6+, Flutter 3.27+.
Usage / Kullanım #
import 'package:flutter/material.dart';
import 'package:flutter_toastify/flutter_toastify.dart';
ElevatedButton(
onPressed: () {
FlutterToastify.success(
width: 360,
notificationPosition: NotificationPosition.topLeft,
animation: AnimationType.fromTop,
title: const Text('Update'),
description: const Text('Your data has been updated'),
).show(context);
},
child: const Text('Show'),
);
Built-in styles / Hazır stiller: FlutterToastify.success, FlutterToastify.error,
FlutterToastify.info. With your own icon and colors / Kendi ikonunuz ve renklerinizle:
FlutterToastify(
icon: const Icon(Icons.access_alarm, color: Colors.orange),
description: const Text('A new version is available'),
progressIndicatorColor: Colors.orange,
notificationPosition: NotificationPosition.bottomRight,
animation: AnimationType.fromBottom,
).show(context);
Persistent toast with a custom close button / Kalıcı bildirim ve özel kapatma düğmesi:
final toast = FlutterToastify(
icon: const Icon(Icons.dashboard_customize_outlined),
description: const Text('You can now go to the dashboard'),
autoDismiss: false,
showProgressIndicator: false, // required when autoDismiss is false
closeButton: (dismiss) => IconButton(onPressed: dismiss, icon: const Icon(Icons.logout)),
);
toast.show(context);
// To close it from code / Kodla kapatmak için:
toast.closeOverlay();
The example app shows every scenario in English and Turkish. / Örnek uygulama tüm senaryoları İngilizce ve Türkçe gösterir.
Parameters / Parametreler #
| Parameter | Default / Varsayılan | Description / Açıklama |
|---|---|---|
title |
null |
Title widget / Başlık |
description |
required / zorunlu | Main content / Ana içerik |
icon |
required (custom) | Custom constructor only / Yalnızca FlutterToastify() |
notificationPosition |
topRight |
center, centerLeft, centerRight, topLeft, topCenter, topRight, bottomLeft, bottomCenter, bottomRight |
animation |
fromRight |
fromLeft, fromRight, fromTop, fromBottom (must match the position / konumla uyumlu olmalı) |
animationDuration |
600 ms | Slide in/out duration / Giriş-çıkış süresi |
toastDuration |
3000 ms | Display duration / Ekranda kalma süresi |
autoDismiss |
true |
Close after toastDuration / Süre sonunda kapanır |
showProgressIndicator |
true |
Progress bar, requires autoDismiss / İlerleme çubuğu |
displayCloseButton |
true |
Show the close button / Kapatma düğmesini göster |
closeButton |
null |
(dismiss) => Widget custom close button / Özel kapatma düğmesi |
action, onActionPressed |
null |
Tappable action; onActionPressed required with action / Tıklanabilir eylem |
width, height |
70% / at least 12% of screen | Size; grows with content when height is null / Boyut |
background, progressIndicatorColor, progressIndicatorBackground |
white / style / grey | Colors / Renkler |
onProgressFinished |
null |
Called on auto dismiss / Süre dolunca |
onCloseButtonPressed, onDismiss |
null |
Called when the close button is pressed / Kapatma düğmesine basılınca |
Custom constructor only / Yalnızca özel kurucu: shadowColor, radius, enableShadow.
Migrating to 2.0.0 / 2.0.0'a geçiş #
- Enums are exported from the main library; you can drop
package:flutter_toastify/components/enums.dart. / Enum'lar ana kütüphaneden gelir. - Use
widget/flutter_toastify_content.dartinstead of the misspelledwidget/flutter_toastify_conten.dart. / Düzeltilmiş dosya adını kullanın. - Fields are
final; pass values to the constructor. / Alanlarfinal; değerleri kurucuya verin.
Other packages / Diğer paketler #
By the same publisher / Aynı yayıncıdan: abdurrahmankaraoglu.com
| Package / Paket | Description | Açıklama |
|---|---|---|
| google_maps_polyline | Google Directions routes and polyline encode/decode (pure Dart) | Google Directions rotası ve polyline kodlama/çözme (saf Dart) |
| marker_crafter | Custom Google Maps markers drawn with Canvas | Canvas ile çizilen özel Google Maps işaretçileri |
| animated_route_marker | Smoothly animated map marker along a route or live GPS | Rota ya da canlı GPS üzerinde akıcı hareket eden harita işaretçisi |
| advanced_background_locator | Background location tracking plugin (Android/iOS) | Arka planda konum takibi eklentisi (Android/iOS) |
| advanced_geofence | Pure Dart geofencing engine: enter, exit and dwell events | Saf Dart geofence motoru: giriş, çıkış ve bekleme olayları |
| route_simulator | Realistic fake GPS streams for testing and demos | Test ve demo için gerçekçi sahte GPS akışı |
| background_doctor | Diagnoses why background work stops on Android and why the app was killed | Android'de arka plan işinin neden durduğunu ve uygulamanın neden kapandığını teşhis eder |
| scan_tally | Continuous barcode scanning for stock counts: dedupe, tally, feedback, GS1 | Stok sayımı için sürekli barkod okutma: tekrar ayıklama, sayım, geri bildirim, GS1 |
| scan_tally_mobile_scanner | mobile_scanner camera adapter for scan_tally | scan_tally için mobile_scanner kamera adaptörü |
| turkish_kit | Turkish validators, money in words, casing, provinces, holidays (pure Dart) | Türkçe doğrulayıcılar, tutarı yazıyla yazma, harf dönüşümü, il/ilçe, tatiller (saf Dart) |
| turkish_kit_flutter | Flutter widgets for turkish_kit: Turkish money field and input formatters | turkish_kit için Flutter bileşenleri: Türk biçimli para alanı ve girdi biçimleyicileri |
License / Lisans #
MIT, see / bkz. LICENSE.




