passo_mobile_app/lib/screens/unit2/login/components/showAlert.dart

18 lines
525 B
Dart
Raw Permalink Normal View History

import 'package:cool_alert/cool_alert.dart';
import 'package:flutter/material.dart';
import '../../../../theme-data.dart/colors.dart';
showAlert(context,Function confirm) {
CoolAlert.show(
context: context,
type: CoolAlertType.error,
title: 'Download Failed!',
text: 'Make sure you have internet connection. Please try again.',
loopAnimation: false,
confirmBtnText: "Try again",
confirmBtnColor: primary,
onConfirmBtnTap: confirm(),
backgroundColor: Colors.black);
}