|
|
|
|
@ -4,7 +4,6 @@ import 'dart:typed_data';
|
|
|
|
|
|
|
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:mc_common_app/classes/app_state.dart';
|
|
|
|
|
import 'package:mc_common_app/config/routes.dart';
|
|
|
|
|
import 'package:mc_common_app/extensions/int_extensions.dart';
|
|
|
|
|
import 'package:mc_common_app/generated/locale_keys.g.dart';
|
|
|
|
|
@ -17,7 +16,6 @@ import 'package:mc_common_app/widgets/common_widgets/info_bottom_sheet.dart';
|
|
|
|
|
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
|
|
|
|
import 'package:path/path.dart' as p;
|
|
|
|
|
|
|
|
|
|
import 'package:fluttertoast/fluttertoast.dart';
|
|
|
|
|
import 'package:mc_common_app/classes/consts.dart';
|
|
|
|
|
import 'package:mc_common_app/exceptions/api_exception.dart';
|
|
|
|
|
import 'package:mc_common_app/extensions/string_extensions.dart';
|
|
|
|
|
@ -27,6 +25,7 @@ import 'package:mc_common_app/widgets/loading_dialog.dart';
|
|
|
|
|
import 'package:share_plus/share_plus.dart';
|
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
import 'package:url_launcher/url_launcher_string.dart';
|
|
|
|
|
import 'package:toastification/toastification.dart';
|
|
|
|
|
|
|
|
|
|
class Utils {
|
|
|
|
|
static bool _isLoadingVisible = false;
|
|
|
|
|
@ -34,8 +33,14 @@ class Utils {
|
|
|
|
|
static bool get isLoading => _isLoadingVisible;
|
|
|
|
|
|
|
|
|
|
static void showToast(String message) {
|
|
|
|
|
Fluttertoast.showToast(
|
|
|
|
|
msg: message, toastLength: Toast.LENGTH_SHORT, gravity: ToastGravity.BOTTOM, timeInSecForIosWeb: 2, backgroundColor: Colors.black54, textColor: Colors.white, fontSize: 16.0);
|
|
|
|
|
toastification.show(
|
|
|
|
|
type: ToastificationType.info,
|
|
|
|
|
style: ToastificationStyle.minimal,
|
|
|
|
|
title: Text(message),
|
|
|
|
|
autoCloseDuration: const Duration(seconds: 2),
|
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
|
showProgressBar: false,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Future<void> openNumberViaCaller({required String phoneNumber}) async {
|
|
|
|
|
|