Создание коллекций
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// Flutter imports:
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
|
||||
// Package imports:
|
||||
import 'package:get_it/get_it.dart';
|
||||
@@ -16,6 +17,33 @@ AppRouter get globalRouter {
|
||||
return GetIt.I.get<AppRouter>();
|
||||
}
|
||||
|
||||
///
|
||||
/// Показ тоста
|
||||
///
|
||||
void showErrorToast(String text) {
|
||||
Fluttertoast.showToast(
|
||||
msg: text,
|
||||
toastLength: Toast.LENGTH_SHORT,
|
||||
gravity: ToastGravity.TOP,
|
||||
timeInSecForIosWeb: 1,
|
||||
backgroundColor: AppColors.danger,
|
||||
textColor: AppColors.white,
|
||||
fontSize: 16,
|
||||
);
|
||||
}
|
||||
|
||||
void showSuccessToast(String text) {
|
||||
Fluttertoast.showToast(
|
||||
msg: text,
|
||||
toastLength: Toast.LENGTH_SHORT,
|
||||
gravity: ToastGravity.TOP,
|
||||
timeInSecForIosWeb: 1,
|
||||
backgroundColor: AppColors.additional_blue,
|
||||
textColor: AppColors.white,
|
||||
fontSize: 16,
|
||||
);
|
||||
}
|
||||
|
||||
///
|
||||
/// Глобальный показ ошибки
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user