popupWAITING method
Implementation
Object popupWAITING(BuildContext context) {
return showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) => WillPopScope(
onWillPop: () async => false,
child: AlertDialog(
backgroundColor: Theme.of(context).colorScheme.tertiary,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(15)),
),
contentPadding: EdgeInsets.all(defaultWidth * 0.05),
content: SizedBox(
width: defaultWidth * 0.85,
child: Column(mainAxisSize: MainAxisSize.min, children: [
Text(
"Buscando partida...",
style: TextStyle(
fontSize: 19,
color: Theme.of(context).colorScheme.primary,
),
),
SizedBox(height: defaultWidth * 0.05),
SizedBox(
height: defaultWidth * 0.3,
child: Image.asset('images/waiting.gif'),
),
SizedBox(height: defaultWidth * 0.05),
playButton(context, "Cancelar", () => cancelSearch()),
]),
),
),
),
);
}