Projects section usable, Sticky headers added
This commit is contained in:
@@ -72,6 +72,54 @@ class Dialogs{
|
||||
}
|
||||
}
|
||||
|
||||
static showQuestionDialog(String title, String message, {bool hasCancel = false, required Function(bool) onResponse}) async{
|
||||
context=navigatorKey.currentContext;
|
||||
|
||||
if(context!=null) {
|
||||
return showDialog(
|
||||
context: context!,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)),
|
||||
backgroundColor: Color(0xFF1C1C1C),
|
||||
title: Text(title),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(message)
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
if(hasCancel)MaterialButton(
|
||||
onPressed: (){
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text('Cancel', style:TextStyle(color: Colors.grey)),
|
||||
),
|
||||
MaterialButton(
|
||||
onPressed: (){
|
||||
onResponse(false);
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text('No', style:TextStyle(color: Colors.red)),
|
||||
),
|
||||
MaterialButton(
|
||||
onPressed: (){
|
||||
onResponse(true);
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text('Yes', style:TextStyle(color: Colors.green)),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
);
|
||||
}else{
|
||||
print('context is null');
|
||||
}
|
||||
}
|
||||
|
||||
static ongoing() async{
|
||||
List<String>? data= await User.getOngoingData();
|
||||
if(data == null){return;}
|
||||
|
||||
Reference in New Issue
Block a user