Skip to content

Commit

Permalink
add trend and country setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ksh-b committed Mar 10, 2024
1 parent 535a75b commit 0050edd
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/utils/store.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import 'package:hive/hive.dart';
import 'package:whapp/model/trends.dart';
import 'package:whapp/model/user_subscription.dart';
import 'package:whapp/utils/theme_provider.dart';

class Store {
Expand Down Expand Up @@ -57,6 +59,22 @@ class Store {
settings.put("loadImages", load);
}

static String get trendsProviderSetting {
return settings.get("trendsProvider", defaultValue: trends.keys.first);
}

static set trendsProviderSetting(String provider) {
settings.put("trendsProvider", provider);
}

static String get countrySetting {
return settings.get("country", defaultValue: "United States of America");
}

static set countrySetting(String country) {
settings.put("country", country);
}

static bool get darkThemeSetting {
return settings.get("darkMode", defaultValue: false);
}
Expand Down

0 comments on commit 0050edd

Please sign in to comment.