stack definition code example
Example 1: stack
typedef struct Nodo{
Elem val;
struct Nodo *next;
} *Stack;
Stack Empty(){return NULL;}
bool IsEmpty(Stack a){return a==NULL;}
Elem Top(Stack a){return a->val;}
Stack Pop(Stack l){return l->next;}
Stack Push(Elem x,Stack res){
Stack nuevo=(Stack)malloc(sizeof(struct Nodo));
nuevo->val=x;
nuevo->next=res;
return nuevo;
}
Example 2: stack
Future<void> _handleNotification(
Map<dynamic, dynamic> message, bool dialog) async {
var data = message['data'] ?? message;
String notificationTitle = data['YOUR_KEY'];
String notificationMessage = data['YOUR_KEY'];
Utils().showMessageDialog(context, notificationTitle,notificationMessage);
}