nc-photos/app/lib/session_storage.dart

29 lines
761 B
Dart
Raw Normal View History

import 'package:clock/clock.dart';
import 'package:flutter/material.dart';
2021-04-21 16:17:18 +02:00
/// Hold non-persisted global variables
class SessionStorage {
factory SessionStorage() {
return _inst;
}
SessionStorage._();
/// Whether the range select notification has been shown to user
bool hasShowRangeSelectNotification = false;
2021-07-08 10:57:20 +02:00
/// Whether the drag to rearrange notification has been shown
bool hasShowDragRearrangeNotification = false;
/// Whether the dynamic_color library is supported in this platform
bool isSupportDynamicColor = false;
ColorScheme? lightDynamicColorScheme;
ColorScheme? darkDynamicColorScheme;
DateTime lastSuspendTime = clock.now();
bool hasShownVideoPreviewHint = false;
2021-09-15 08:58:06 +02:00
static final _inst = SessionStorage._();
2021-04-21 16:17:18 +02:00
}