vantuan88291 / flutter_dropdown_alert

Flutter Dropdown Alert help to notify to user when success, warning or error like in app push notification
MIT License
15 stars 10 forks source link

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

Open yukselao opened 3 years ago

yukselao commented 3 years ago

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 3 years ago

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