JulyWitch / animated_snack_bar

Easily show beautiful snack bars directly using overlays. Create custom snack bars and show them with awesome animations.
https://pub.dev/packages/animated_snack_bar
GNU General Public License v3.0
16 stars 12 forks source link

How to add margin? #4

Closed bonsoirelliot closed 1 year ago

bonsoirelliot commented 2 years ago

Hello! I'm using your package to show custom snackbar, but I can't set margin of snackbar. Is there any way to add it? Thanks

JulyWitch commented 1 year ago

What is the use case of adding margin?

JulyWitch commented 1 year ago

Update it to 0.3.1 then you can use the mobilePositionSettings property:

AnimatedSnackBar.material(
    'This a snackbar with info type',
    type: AnimatedSnackBarType.info,
    mobilePositionSettings: const MobilePositionSettings(
      topOnAppearance: 100,
      // topOnDissapear: 50,
      // bottomOnAppearance: 100,
      // bottomOnDissapear: 50,
      // left: 20,
      // right: 70,
    ),
).show(context);