forked from eatvio/eatvio_app
refactor: remove unused elements
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
class Logger {
|
||||
static LogMode _logMode = LogMode.debug;
|
||||
|
||||
static void init(LogMode mode) {
|
||||
Logger._logMode = mode;
|
||||
}
|
||||
|
||||
static void log(dynamic data, {StackTrace? stackTrace}) {
|
||||
if (_logMode == LogMode.debug) {
|
||||
print("Error: $data$stackTrace");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum LogMode { debug, live }
|
||||
@@ -1,33 +0,0 @@
|
||||
import 'package:eatvio_app/app_router.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ProgressDialogUtils {
|
||||
static bool isProgressVisible = false;
|
||||
|
||||
///common method for showing progress dialog
|
||||
static void showProgressDialog({BuildContext? context, isCancellable = false}) async {
|
||||
if (!isProgressVisible && AppRouter.navigatorKey.currentState?.overlay?.context != null) {
|
||||
showDialog(
|
||||
barrierDismissible: isCancellable,
|
||||
context: AppRouter.navigatorKey.currentState!.overlay!.context,
|
||||
builder: (BuildContext context) {
|
||||
return Center(
|
||||
child: CircularProgressIndicator.adaptive(
|
||||
strokeWidth: 4,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
Colors.white,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
isProgressVisible = true;
|
||||
}
|
||||
}
|
||||
|
||||
///common method for hiding progress dialog
|
||||
static void hideProgressDialog() {
|
||||
if (isProgressVisible) Navigator.pop(AppRouter.navigatorKey.currentState!.overlay!.context);
|
||||
isProgressVisible = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user