openDialogYesNo function

dynamic openDialogYesNo(
  1. dynamic callback(
    1. String
    ),
  2. String stringText,
  3. String text1,
  4. String text2,
)

Implementation

openDialogYesNo(Function(String) callback,
    String stringText, String text1, String text2){
  EasyDialog(
      colorBackground: aTheme.darkMode ? Colors.black : Colors.white,
      body: Column(
        children: [
          Text(stringText),
          SizedBox(height: 40,),
          Row(
            children: [
              Flexible(child: button2(text1,
                  aTheme.mainColor,
                      (){
                    Navigator.pop(buildContext); // close dialog
                    callback("text1");
                  })),
              SizedBox(width: 10,),
              Flexible(child: button2(text2,
                  aTheme.mainColor, (){
                    Navigator.pop(buildContext); // close dialog
                    callback("text2");
                  })),
            ],
          )
        ],
      )
  ).show(buildContext);
}