Migration guide from 2.x to 3.x topic
Migration from 2.x to 3.x
Each manager has been transformed into a dialog itself:
There are no more "Show/Hide" parameters; the dialog contains all the required information internally.
From:
FlutterEasyDialogs.provider.showPositioned(
PositionedShowParams(
hideAfterDuration: Duration(milliseconds: 500)
content: Container(
height: 150.0,
color: Colors.amber[900],
alignment: Alignment.center,
child: Text('Dialog'),
),
position: EasyDialogPosition.top,
),
);
To:
FlutterEasyDialogs.show(
EasyDialog.positioned(
autoHideDuration: Duration(milliseconds: 500),
content: Container(
height: 150.0,
color: Colors.amber[900],
alignment: Alignment.center,
child: Text('Dialog'),
),
position: EasyDialogPosition.top,
),
);
Or:
Container(
height: 150.0,
color: Colors.amber[900],
alignment: Alignment.center,
child: Text('Dialog'),
)
.positioned(
position: EasyDialogPosition.top,
autoHideDuration: Duration(milliseconds: 500),
)
.show();
To hide a dialog, you can now create an identifier for a specific dialog type.
From:
FlutterEasyDialogs.provider.hidePositioned(EasyDialogPosition.top)
To:
FlutterEasyDialogs.hide(
PositionedDialog.identifier(
position: EasyDialogPosition.top,
),
);
Decorators
Decorators and all related objects have changed too:
- Decorator -> Decoration
- Animator -> Animation
- Dismissible -> Dismiss
They all have become more flexible and universal.
Better watch this topic for better a understanding.
Classes
-
EasyDialogAnimation<
D extends EasyDialog> Decorations Migration guide from 2.x to 3.x - Its main purpose is to apply an animation effect to the provided EasyDialog.
- EasyDialogAnimationConfiguration Dialogs Migration guide from 2.x to 3.x
- Configuration of EasyDialogAnimation.
-
EasyDialogDecoration<
D extends EasyDialog> Decorations Migration guide from 2.x to 3.x -
This class is intended to be used by
D
dialog to apply some decorations. -
EasyDialogDismiss<
D extends EasyDialog> Decorations Migration guide from 2.x to 3.x - The main purpose is to make EasyDialog dismissible.
- EasyDialogsController Getting started Dialogs Migration guide from 2.x to 3.x
- Core class for manipulating dialogs.
- FlutterEasyDialogs Getting started Dialogs Migration guide from 2.x to 3.x FAQ
- Wrapper for providing an easy use of different custom dialogs.