Projects section usable, Sticky headers added

This commit is contained in:
Sewmina
2022-03-29 04:02:10 +05:30
parent 0763820b97
commit cad1b5db5a
8 changed files with 209 additions and 40 deletions

View File

@@ -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;}