error: Undefined name 'TypeAlert'. (undefined_identifier at [test1] lib/quiz_brain.dart:406)
Opened this issue · 1 comments
yukselao commented
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 commented
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