Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

flutter flutter logo styled toast

Rating: 4 out of 5.

a styled toast flutter package. you can highly customize toast ever. beautify toast with a series of animations and make toast more beautiful.

demo

#1 highly customized styled toast
highly customized styled toast

getting started

dependencies:
  flutter_styled_toast: ^1.2.1
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
styledtoast(
  textstyle: textstyle(fontsize: 16.0, color: colors.white),
  backgroundcolor: color(0x99000000),
  borderradius: borderradius.circular(5.0),
  textpadding: edgeinsets.symmetric(horizontal: 17.0, vertical: 10.0),
  toastpositions: styledtoastposition.bottom,
  toastanimation: styledtoastanimation.fade,
  reverseanimation: styledtoastanimation.fade,
  curve: curves.fastoutslowin,
  reversecurve: curves.fastlineartosloweasein,
  duration: duration(seconds: 4),
  animduration: duration(seconds: 1),
  dismissotheronshow: true,
  movingonwindowchange: true,
  child: materialapp(
          title: apptitle,
          showperformanceoverlay: showperformance,
          home: layoutbuilder(
            builder: (buildcontext context, boxconstraints constraints) {
              return myhomepage(
                title: apptitle,
                onsetting: onsettingcallback,
              );
            },
          ),
        ),
);
// general use
showtoast("hello styled toast");

// customize toast content widget
showtoastwidget(text('hello styled toast'));

roadmap

#1 Highly Customized Styled Toast

defaulttoastwidget
#1 Highly Customized Styled Toast

fadeanim
#1 Highly Customized Styled Toast

slidefromtopanim
#1 Highly Customized Styled Toast

slidefrombottomanim
#1 Highly Customized Styled Toast

slidefromleftanim
#1 Highly Customized Styled Toast

slidefromrightanim
#1 Highly Customized Styled Toast

scaleanim
#1 Highly Customized Styled Toast

fadescaleanim
#1 Highly Customized Styled Toast

rotateanim
#1 Highly Customized Styled Toast

faderotateanim
#1 Highly Customized Styled Toast

scalerotateanim
#1 Highly Customized Styled Toast

ondismiss
#1 Highly Customized Styled Toast

customtoastwidget
#1 Highly Customized Styled Toast

customfailtoastwidget
#1 Highly Customized Styled Toast

customsuccesstoastwidget

styledtoast param

propertydescription
childwidget (not null)(required)
textaligntextalign (default textalign.center)
textdirectiontextdirection (default textdirection.ltr)
borderradiusborderradius (borderradius.circular(5.0))
backgroundcolorcolor (default color(0x99000000))
textpaddingedgeinsetsgeometry (default edgeinsets.symmetric(horizontal: 17.0,vertical: 8.0))
toasthorizontalmargindouble (default 50.0)
textstyletextstyle (default textstyle(fontsize: 16.0,fontweight: fontweight.normal,color: colors.white))
shapebordershapeborder (default roundedrectangleborder(borderradius: borderradius))
durationduration (default 2.3s)
animdurationduration (default 400 milliseconds, animduration * 2 <= duration, conditions must be met for toast to display properly)
toastpositionsstyledtoastposition (default styledtoastposition.bottom)
toastanimationstyledtoastanimation (default styledtoastanimation.fade)
reverseanimationstyledtoastanimation
alignmentalignmentgeometry (default alignment.center)
axisaxis (default axis.vertical)
startoffsetoffset
endoffsetoffset
reversestartoffsetoffset
reverseendoffsetoffset
curvecurve (default curves.linear)
reversecurvecurve (default curves.linear)
dismissotheronshowbool (default true)
movingonwindowchangebool (default true)
ondismissvoidcallback (invoked when toast dismiss)

showtoast param

propertydescription
msgstring (not null)(required)
contextbuildcontext (if you don’t wrap app with styledtoast, context is required, otherwise, is not)
durationduration (default 2.3s)
animdurationduration (default 400 milliseconds, animduration * 2 <= duration, conditions must be met for toast to display properly)
positionstyledtoastposition (default styledtoastposition.bottom)
textstyletextstyle (default textstyle(fontsize: 16.0,fontweight: fontweight.normal,color: colors.white))
textpaddingedgeinsetsgeometry (default edgeinsets.symmetric(horizontal: 17.0,vertical: 8.0))
backgroundcolorcolor (default color(0x99000000))
borderradiusborderradius (borderradius.circular(5.0))
shapebordershapeborder (default roundedrectangleborder(borderradius: borderradius))
ondismissvoidcallback (invoked when toast dismiss)
textdirectiontextdirection (default textdirection.ltr)
dismissotheronshowbool (default true)
movingonwindowchangebool (default true)
toastanimationstyledtoastanimation (default styledtoastanimation.fade)
reverseanimationstyledtoastanimation
alignmentalignmentgeometry (default alignment.center)
axisaxis (default axis.vertical)
startoffsetoffset
endoffsetoffset
reversestartoffsetoffset
reverseendoffsetoffset
textaligntextalign (default textalign.center)
curvecurve (default curves.linear)
reversecurvecurve (default curves.linear)

showtoastwidget param

propertydescription
widgetwidget (not null)(required)
contextbuildcontext (if you don’t wrap app with styledtoast, context is required, otherwise, is not)
durationduration (default 2.3s)
animdurationduration (default 400 milliseconds, animduration * 2 <= duration, conditions must be met for toast to display properly)
ondismissvoidcallback (invoked when toast dismiss)
dismissotheronshowbool (default true)
movingonwindowchangebool (default true)
textdirectiontextdirection (default textdirection.ltr)
positionstyledtoastposition (default )
animationstyledtoastanimation (default styledtoastanimation.fade)
reverseanimationstyledtoastanimation
alignmentalignmentgeometry (default alignment.center)
axisaxis (default axis.vertical)
startoffsetoffset
endoffsetoffset
reversestartoffsetoffset
reverseendoffsetoffset
curvecurve (default curves.linear)
reversecurvecurve (default curves.linear)

download the full project for this post from the following button

this source is fully free for all time

download as zip


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Top