mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-24 23:32:13 +00:00
28 lines
808 B
Dart
28 lines
808 B
Dart
import 'dart:async';
|
|
|
|
import 'package:camera/camera.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:path_provider/path_provider.dart';
|
|
|
|
class AppEnvironment {
|
|
static late final String cacheDir;
|
|
static late final String supportDir;
|
|
static late final List<CameraDescription> cameras;
|
|
|
|
static Future<void> init() async {
|
|
cacheDir = (await getApplicationCacheDirectory()).path;
|
|
supportDir = (await getApplicationSupportDirectory()).path;
|
|
cameras = await availableCameras();
|
|
}
|
|
}
|
|
|
|
class AppState {
|
|
static bool isAppInBackground = true;
|
|
static bool isInBackgroundTask = false;
|
|
static bool allowErrorTrackingViaSentry = false;
|
|
static bool gotMessageFromServer = false;
|
|
}
|
|
|
|
class AppGlobalKeys {
|
|
static final scaffoldMessengerKey = GlobalKey<ScaffoldMessengerState>();
|
|
}
|