app config features

This commit is contained in:
julian 2024-06-05 12:05:22 -06:00
parent 6292ea2434
commit b60ac53050
4 changed files with 22 additions and 0 deletions

View file

@ -3,6 +3,12 @@ import 'wallets/crypto_currency/intermediate/frost_currency.dart';
part 'app_config.g.dart';
enum AppFeature {
themeSelection,
buy,
swap;
}
abstract class AppConfig {
static const appName = _prefix + _separator + suffix;
@ -12,6 +18,8 @@ abstract class AppConfig {
static String get appDefaultDataDirName => _appDataDirName;
static String get commitHash => _commitHash;
static bool hasFeature(AppFeature feature) => _features.contains(feature);
static ({String light, String dark})? get appIconAsset => _appIconAsset;
static List<CryptoCurrency> get coins => _supportedCoins;

View file

@ -46,6 +46,8 @@ const _suffix = "";
const _appDataDirName = "campfire";
const _commitHash = "$BUILT_COMMIT_HASH";
const Set<AppFeature> _features = {};
const ({String light, String dark})? _appIconAsset = (
light: "assets/in_app_logo_icons/stack-duo-icon_light.svg",
dark: "assets/in_app_logo_icons/stack-duo-icon_dark.svg",

View file

@ -40,6 +40,12 @@ const _suffix = "Duo";
const _appDataDirName = "stackduo";
const _commitHash = "$BUILT_COMMIT_HASH";
const Set<AppFeature> _features = {
AppFeature.themeSelection,
AppFeature.buy,
AppFeature.swap
};
const ({String light, String dark})? _appIconAsset = (
light: "assets/in_app_logo_icons/stack-duo-icon_light.svg",
dark: "assets/in_app_logo_icons/stack-duo-icon_dark.svg",

View file

@ -40,6 +40,12 @@ const _suffix = "Wallet";
const _appDataDirName = "stackwallet";
const _commitHash = "$BUILT_COMMIT_HASH";
const Set<AppFeature> _features = {
AppFeature.themeSelection,
AppFeature.buy,
AppFeature.swap
};
const ({String light, String dark})? _appIconAsset = null;
final List<CryptoCurrency> _supportedCoins = List.unmodifiable([