added an alert dialog function call in context extension

This commit is contained in:
ashrafzarkanisala
2024-06-12 23:48:39 +03:00
parent 8c8e46f250
commit 4a93bc2892
3 changed files with 22 additions and 2 deletions

View File

@ -43,4 +43,13 @@ extension ContextExtension on BuildContext {
},
);
}
void customAlertDialog({required Widget child, required double height}) {
showDialog(
context: this,
builder: (BuildContext context) {
return Dialog(child: SizedBox(height: height, child: child));
},
);
}
}