You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ERROR:flutter/lib/ui/ui_dart_state.cc(171)] Unhandled Exception: NoSuchMethodError: The getter 'modalBarrierDismissLabel' was called on null. #210
Activity
siddheshjungade commentedon Aug 7, 2020
this is code
void checkAnswer(bool userPickedAns){
setState(() {
if(quizBrain.isFinish() == true){
print('allert');
Alert(
context: context,
type: AlertType.warning,
title: "RFLUTTER ALERT",
desc: "Flutter is more awesome with RFlutter Alert.",
buttons: [
DialogButton(
child: Text(
"FLAT",
style: TextStyle(color: Colors.white, fontSize: 20),
),
onPressed: () => Navigator.pop(context),
color: Color.fromRGBO(0, 179, 134, 1.0),
),
DialogButton(
child: Text(
"GRADIENT",
style: TextStyle(color: Colors.white, fontSize: 20),
),
onPressed: () => Navigator.pop(context),
gradient: LinearGradient(colors: [
Color.fromRGBO(116, 116, 191, 1.0),
Color.fromRGBO(52, 138, 199, 1.0)
]),
)
],
).show();
}
renefloor commentedon Oct 30, 2020
Sorry for the late response, but this has nothing to do with flutter_cache_manager. For generic Flutter questions it is better to use StackOverflow.
But I also don't understand how
Alert.show()would work within setState. You can have a look at the AlertDialog example to show dialogs: https://api.flutter.dev/flutter/material/AlertDialog-class.html