Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A AlertProvider must be supplied #1

Open
rahulmahadik opened this issue Nov 21, 2018 · 1 comment
Open

A AlertProvider must be supplied #1

rahulmahadik opened this issue Nov 21, 2018 · 1 comment

Comments

@rahulmahadik
Copy link

I'm trying add in my flutter project
My Code:

@override
 Widget build(BuildContext context) {

....

Alert.toast(context, "My msg",position: ToastPosition.bottom, duration: ToastDuration.long);
...
}

Error:

A AlertProvider must be supplied
I/flutter ( 9175): 'package:easy_alert/easy_alert.dart': Failed assertion: line 90 pos 12: 'manager != null'

image

@jzoom
Copy link
Member

jzoom commented Nov 27, 2018

void main() => runApp(new AlertProvider(
child: new YourApp(),
config: new AlertConfig(
ok: "OK text for ok button in AlertDialog",
cancel: "CANCEL text for cancel button in AlertDialog"),
));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants