Files
umbrix/lib/domain/profiles/profile_enums.dart
problematicconsumer ef1846e553 Refactor preferences
2023-09-06 12:56:30 +03:30

20 lines
417 B
Dart

import 'package:flutter/material.dart';
import 'package:hiddify/core/prefs/prefs.dart';
enum ProfilesSort {
lastUpdate,
name;
String present(TranslationsEn t) {
return switch (this) {
lastUpdate => t.profile.sortBy.lastUpdate,
name => t.profile.sortBy.name,
};
}
IconData get icon => switch (this) {
lastUpdate => Icons.update,
name => Icons.sort_by_alpha,
};
}