flashtoast 0.0.1 copy "flashtoast: ^0.0.1" to clipboard
flashtoast: ^0.0.1 copied to clipboard

outdated

flutter toast pkg.

TODO: for flashBar toast

Features #

TODO: For Flutter Flash Toast

Getting started #

TODO: Call FlashBar.showFlashBarToast()

Usage #

TODO: beautiful toast

class FlashBar{

static showFlashBar({ required BuildContext context, required String title, required String message, required FlashBarType flashBaeType, FlashBarPosition? flashBarPosition, FlashBarBehaviour? flashBarBehaviour, int? duration, double? height, double? width, double? elevation , }){ final customSnackBar = SnackBar( duration: Duration(seconds: duration??1), dismissDirection: DismissDirection.endToStart, elevation: elevation??0.0, behavior: getSnackBarBehavior(flashBarBehaviour:flashBarBehaviour??FlashBarBehaviour.fixed), backgroundColor:Colors.transparent, content:snackbarBodyWidget( title: title, message: message, flashBarType: flashBaeType, flashBarPosition:flashBarPosition??FlashBarPosition.top, flashBarBehaviour:flashBarBehaviour??FlashBarBehaviour.fixed, height:height??100, width:width??double.infinity ) , );

ScaffoldMessenger.of(context)
  ..hideCurrentSnackBar()
  ..showSnackBar(customSnackBar);

}

static showFlashBarToast({ required BuildContext context, required String title, required String message, required FlashBarType flashBaeType, FlashBarPosition? flashBarPosition, FlashBarBehaviour? flashBarBehaviour, int? duration, double? height, double? width, double? elevation , }) { OverlayState overlayState = Overlay.of(context); OverlayEntry overlayEntry = OverlayEntry( builder: (BuildContext context) => Positioned( top: 60, left: 20, right: 20, child: Material( color: Colors.transparent, child: snackbarBodyWidget( title: title, message: message, flashBarType: flashBaeType, flashBarPosition:flashBarPosition??FlashBarPosition.top, flashBarBehaviour:flashBarBehaviour??FlashBarBehaviour.fixed, height:height??100, width:width??double.infinity ), ), ), ); overlayState.insert(overlayEntry);

Future.delayed( Duration(seconds: duration??2), () {
  overlayEntry.remove();
});

}

}

Additional information #

TODO: contact for further info

19
likes
0
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

flutter toast pkg.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flashtoast