pdavenue_ads_moentize

A Flutter plugin for displaying fully dynamic and customizable native Toast messages on Android.

Features

  • Standard & Long Durations: Supports both Toast.LENGTH_SHORT and Toast.LENGTH_LONG.
  • Custom Background Color: Set any background color using hex colors (e.g. #FF4B4B).
  • Custom Text Color: Customize the color of the message text.
  • Out-of-the-Box Main Thread execution: Native toast calls are safely executed on the Android Main Looper thread to prevent runtime background exceptions.

Getting Started

Installation

Add pdavenue_ads_moentize to your pubspec.yaml dependencies:

dependencies:
  pdavenue_ads_moentize:
    path: ../pdavenue_ads_moentize # if local, or use pub version once published

Usage

Import the package:

import 'package:pdavenue_ads_moentize/pdavenue_ads_moentize.dart';

Simple Toast

Show a default native Android Toast:

await PdavenueAdsMoentize.showToast(
  message: "Hello from pdavenue!",
);

Long Toast

Show a toast with a longer duration:

await PdavenueAdsMoentize.showToast(
  message: "This is a long toast message.",
  isLong: true,
);

Customized Styled Toast

Show a toast with a custom background and text color:

await PdavenueAdsMoentize.showToast(
  message: "Customized Toast Style!",
  backgroundColor: "#FF6200EE", // Hex format: #AARRGGBB or #RRGGBB
  textColor: "#FFFFFFFF",
);

Platform Support

  • Android: API Level 21+ supported.