Skip to content

Commit

Permalink
Bumped up dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
akaMrNagar committed Nov 18, 2024
1 parent 71ef004 commit d872928
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static Map<String, String> getDeviceInfoMap(@NonNull Context context) {
PackageInfo packageInfo = packageManager.getPackageInfo(packageName, 0);

appVersion = packageName.contains(".debug")
? "DEBUG " + "v" + packageInfo.versionName + "+" + packageInfo.versionCode
? "v" + packageInfo.versionName + "-debug+" + packageInfo.versionCode
: "v" + packageInfo.versionName + "+" + packageInfo.versionCode;
} catch (PackageManager.NameNotFoundException e) {
Log.e(TAG, "getDeviceInfoMap: Error in fetching app version", e);
Expand Down
9 changes: 5 additions & 4 deletions lib/core/database/tables/mindful_settings_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import 'package:mindful/core/database/app_database.dart';
import 'package:mindful/core/database/converters/list_converters.dart';
import 'package:mindful/core/enums/app_theme_mode.dart';
import 'package:mindful/core/enums/default_home_tab.dart';
import 'package:mindful/core/utils/app_constants.dart';

@DataClassName("MindfulSettings")
class MindfulSettingsTable extends Table {
Expand Down Expand Up @@ -65,10 +66,10 @@ class MindfulSettingsTable extends Table {
static final defaultMindfulSettingsModel = MindfulSettings(
id: 0,
defaultHomeTab: DefaultHomeTab.dashboard,
themeMode: AppThemeMode.system,
accentColor: "Indigo",
username: "Hustler",
localeCode: "en",
themeMode: AppConstants.defaultThemeMode,
accentColor: AppConstants.defaultMaterialColor,
username: AppConstants.defaultUsername,
localeCode: AppConstants.defaultLocale,
dataResetTime: const TimeOfDayAdapter.zero(),
useBottomNavigation: false,
useAmoledDark: false,
Expand Down
5 changes: 2 additions & 3 deletions lib/core/utils/app_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AppConstants {
static const defaultThemeMode = AppThemeMode.system;
static const defaultMaterialColor = "Indigo";
static const defaultLocale = "en";
static const defaultUsername = "Hustler";
static const defaultUsername = "Achiever";
static const defaultCurve = Curves.fastEaseInToSlowEaseOut;
static const defaultAnimDuration = Duration(milliseconds: 350);

Expand All @@ -37,8 +37,7 @@ class AppConstants {
static const githubSuggestionDirectUrl =
"https://github.com/akaMrNagar/Mindful/issues/new?template=feature_request.md";

static const githubDonationSectionUrl =
"https://github.com/akaMrNagar/Mindful/blob/main/README.md#donate-";
static const buyMeCoffeeDonationUrl = "https://buymeacoffee.com/akamrnagar";

static const githubFeedbackSectionUrl =
"https://github.com/akaMrNagar/Mindful/blob/main/README.md#feedback-and-support";
Expand Down
30 changes: 17 additions & 13 deletions lib/ui/common/sliver_flexible_appbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class SliverFlexibleAppBar extends ConsumerWidget {
final useBottomNavigation =
ref.watch(mindfulSettingsProvider.select((v) => v.useBottomNavigation));

final showDevTag =
appVersion.contains('debug') || appVersion.contains('beta');

return SliverAppBar(
expandedHeight: 132,
elevation: 0,
Expand Down Expand Up @@ -91,21 +94,22 @@ class SliverFlexibleAppBar extends ConsumerWidget {
),

/// Beta tag
DefaultHero(
tag: HeroTags.betaWarningTag,
child: RoundedContainer(
width: 56,
height: 24,
circularRadius: 8,
color: Theme.of(context).colorScheme.primary,
onPressed: () => _showBetaDialog(context, appVersion),
child: StyledText(
appVersion.contains('DEBUG') ? "DEBUG" : "BETA",
color: Theme.of(context).colorScheme.onPrimary,
overflow: TextOverflow.fade,
if (showDevTag)
DefaultHero(
tag: HeroTags.betaWarningTag,
child: RoundedContainer(
width: 56,
height: 24,
circularRadius: 8,
color: Theme.of(context).colorScheme.primary,
onPressed: () => _showBetaDialog(context, appVersion),
child: StyledText(
appVersion.contains('debug') ? "DEBUG" : "BETA",
color: Theme.of(context).colorScheme.onPrimary,
overflow: TextOverflow.fade,
),
),
),
),
24.vBox
],
),
Expand Down
3 changes: 2 additions & 1 deletion lib/ui/dialogs/input_field_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
import 'package:flutter/material.dart';
import 'package:mindful/core/extensions/ext_build_context.dart';
import 'package:mindful/core/utils/app_constants.dart';
import 'package:mindful/ui/transitions/default_hero.dart';
import 'package:mindful/ui/transitions/hero_page_route.dart';
import 'package:mindful/ui/common/styled_text.dart';
Expand Down Expand Up @@ -58,7 +59,7 @@ Future<String?> showUsernameInputDialog({
fieldIcon: FluentIcons.person_20_regular,
title: context.locale.username_dialog_title,
fieldLabel: context.locale.username_dialog_title,
hintText: "Hustler",
hintText: AppConstants.defaultUsername,
helperText: context.locale.username_dialog_info,
negativeBtnLabel: context.locale.dialog_button_cancel,
positiveBtnLabel: context.locale.username_dialog_button_apply,
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/screens/settings/about/tab_about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class TabAbout extends ConsumerWidget {
icon: const Icon(FluentIcons.heart_20_filled),
label: Text(context.locale.donation_card_button_donate),
onPressed: () => MethodChannelService.instance
.launchUrl(AppConstants.githubDonationSectionUrl),
.launchUrl(AppConstants.buyMeCoffeeDonationUrl),
),
),

Expand Down

0 comments on commit d872928

Please sign in to comment.