Skip to content

Commit

Permalink
fix price not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco committed Oct 27, 2022
1 parent 3623dad commit a736c9a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lib/pages/stack_privacy_calls.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
Expand All @@ -6,12 +8,17 @@ import 'package:stackwallet/pages_desktop_specific/create_password/create_passwo
import 'package:stackwallet/providers/global/prefs_provider.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/constants.dart';
import 'package:stackwallet/utilities/prefs.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';

import '../hive/db.dart';
import '../providers/global/price_provider.dart';
import '../services/exchange/exchange_data_loading_service.dart';

class StackPrivacyCalls extends ConsumerStatefulWidget {
const StackPrivacyCalls({
Key? key,
Expand Down Expand Up @@ -160,6 +167,21 @@ class _StackPrivacyCalls extends ConsumerState<StackPrivacyCalls> {
onPressed: () {
ref.read(prefsChangeNotifierProvider).externalCalls =
isEasy;

DB.instance
.put<dynamic>(
boxName: DB.boxNamePrefs,
key: "externalCalls",
value: isEasy)
.then((_) {
if (isEasy) {
unawaited(
ExchangeDataLoadingService().loadAll(ref));
ref
.read(priceAnd24hChangeNotifierProvider)
.start(true);
}
});
if (!widget.isSettings) {
if (isDesktop) {
Navigator.of(context).pushNamed(
Expand Down

0 comments on commit a736c9a

Please sign in to comment.