error method

Future<void> error(
  1. BuildContext context,
  2. String errorMessage,
  3. Exception error
)

Implementation

Future<void> error(
  BuildContext context,
  String errorMessage,
  Exception error,
) async {
  try {
    return showDialog<void>(
      context: context,
      barrierDismissible: false,
      builder: (BuildContext context) {
        return OmegaErrorDialogWidget(
          description: errorMessage,
          longMessage: error.toString(),
          textColor: OmegaLibConfig.dialogFieldStyle.textColor,
          bgColor: OmegaLibConfig.dialogFieldStyle.bgColor,
        );
      },
    );
  } catch (error) {
    print(error);
  }
}