Open yukselao opened 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)
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
import 'package:flutter_dropdown_alert/model/data_alert.dart';
TypeAlert
data_alert.dart
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)