How do you show a dialog from an already open dialog? Basically, nesting dialogs in Flutter.
When I try to use
showDialog(); in Flutter from inside an already created dialog(for example, by clicking some link inside a dialog, another dialog should open on top of that dialog) I get the following lint error:
Does any one have any idea on how to solve this problem?
Nesting dialogs is VERY possible. You are facing an entirely different issue.
Right now, you have conflicting imports from the
custom_alert_dialog package, and the
To resolve the issue, you have to name one of the imports using the
import 'dart:math' as math;
Then to use it:
// BEFORE final valueOfPi = pi; // AFTER final valueOfPi = math.pi
The syntax of everything remains the same, but whenever you want to use an object or type from the library, just add the keyword as a prefix.
Answered By – Wilson Wilson
Answer Checked By – Candace Johnson (FlutterFixes Volunteer)