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

error: Undefined name 'TypeAlert'. (undefined_identifier at [test1] lib/quiz_brain.dart:406) #4

Open
yukselao opened this issue Oct 24, 2021 · 1 comment

Comments

@yukselao
Copy link

I just imported package. Trying to use like this:

..other imports
import 'package:flutter_dropdown_alert/alert_controller.dart';
...
onPressed: () {
if (myoption['id'] == currentquestion.answer) {
AlertController.show(
"Title", "message here!", TypeAlert.success);
} else {
AlertController.show(
"Title",
"message here!",
TypeAlert.error,
);
}

But I see an error like TypeAlert is not defined.

error: Undefined name 'TypeAlert'. (undefined_identifier at [test1] lib/quiz_brain.dart:406)

@vantuan88291
Copy link
Owner

Hi, please import one more line like this:
import 'package:flutter_dropdown_alert/model/data_alert.dart';
The TypeAlert place inside data_alert.dart
Thanks

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