refactor: asset grid
This commit is contained in:
@@ -20,6 +20,12 @@ extension BuildContextHelper on BuildContext {
|
||||
/// Get the [EdgeInsets] of [MediaQuery]
|
||||
EdgeInsets get viewInsets => MediaQuery.viewInsetsOf(this);
|
||||
|
||||
// Returns the current width from MediaQuery
|
||||
double get width => mediaQuerySize.width;
|
||||
|
||||
// Returns the current height from MediaQuery
|
||||
double get height => mediaQuerySize.height;
|
||||
|
||||
/// True if the current device is a Tablet
|
||||
bool get isTablet => (mediaQuerySize.width >= 600);
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
extension DarkenLightenExtension on Color {
|
||||
Color lighten({double amount = 0.1}) {
|
||||
return Color.alphaBlend(Colors.white.withOpacity(amount), this);
|
||||
}
|
||||
|
||||
Color darken({double amount = 0.1}) {
|
||||
return Color.alphaBlend(Colors.black.withOpacity(amount), this);
|
||||
}
|
||||
}
|
||||
@@ -70,10 +70,8 @@ class ImmichApiClient extends ApiClient with LogContext {
|
||||
static dynamic _patchDto(dynamic value, String targetType) {
|
||||
switch (targetType) {
|
||||
case 'UserPreferencesResponseDto':
|
||||
if (value is Map) {
|
||||
if (value['rating'] == null) {
|
||||
value['rating'] = RatingResponse().toJson();
|
||||
}
|
||||
if (value is Map && value['rating'] == null) {
|
||||
value['rating'] = RatingResponse().toJson();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class LogManager {
|
||||
|
||||
List<LogMessage> _msgBuffer = [];
|
||||
Timer? _timer;
|
||||
late StreamSubscription<LogRecord> _subscription;
|
||||
late final StreamSubscription<LogRecord> _subscription;
|
||||
|
||||
void _onLogRecord(LogRecord record) {
|
||||
// Only print in development
|
||||
|
||||
Reference in New Issue
Block a user