Skip to content

Commit

Permalink
Hide democracy behind developer options (#1678)
Browse files Browse the repository at this point in the history
* [profile] hide democracy behind dev mode

* fix doc for the cupertino button
  • Loading branch information
clangenb authored Jun 3, 2024
1 parent 350b078 commit dcb92ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 0 additions & 2 deletions app/lib/common/components/submit_button_cupertino.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import 'package:flutter/cupertino.dart';
/// Button that shows a `CupertinoActivityIndicator` within while `onPressed` is executed.
///
/// Useful for sending transactions because it takes a while until we know the result.
///
/// Same as `SubmitButton` but with the style of the secondary button.
class SubmitButtonCupertino extends StatefulWidget {
const SubmitButtonCupertino({super.key, required this.child, this.onPressed});

Expand Down
20 changes: 11 additions & 9 deletions app/lib/page/profile/index.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:encointer_wallet/page-encointer/democracy/democracy_page.dart';
import 'package:ew_test_keys/ew_test_keys.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
Expand All @@ -11,6 +10,7 @@ import 'package:encointer_wallet/common/components/submit_button.dart';
import 'package:encointer_wallet/common/components/launch/send_to_trello_list_tile.dart';
import 'package:encointer_wallet/theme/theme.dart';
import 'package:encointer_wallet/config/biometric_auth_state.dart';
import 'package:encointer_wallet/page-encointer/democracy/democracy_page.dart';
import 'package:encointer_wallet/modules/modules.dart';
import 'package:encointer_wallet/page/network_select_page.dart';
import 'package:encointer_wallet/page/profile/about_page.dart';
Expand Down Expand Up @@ -88,7 +88,8 @@ class _ProfileState extends State<Profile> {
return Scaffold(
appBar: AppBar(
title: Text(l10n.title),
iconTheme: const IconThemeData(color: AppColors.encointerGrey), //change your color here,
iconTheme: const IconThemeData(color: AppColors.encointerGrey),
//change your color here,
centerTitle: true,
backgroundColor: Colors.transparent,
shadowColor: Colors.transparent,
Expand Down Expand Up @@ -137,14 +138,15 @@ class _ProfileState extends State<Profile> {
),
),
),
ListTile(
title: Text(
l10n.democracy,
style: context.titleLarge.copyWith(color: context.colorScheme.secondary, fontSize: 19),
if (appSettingsStore.developerMode)
ListTile(
title: Text(
l10n.democracy,
style: context.titleLarge.copyWith(color: context.colorScheme.secondary, fontSize: 19),
),
trailing: const Icon(Icons.arrow_forward_ios, size: 18),
onTap: () => Navigator.pushNamed(context, DemocracyPage.route),
),
trailing: const Icon(Icons.arrow_forward_ios, size: 18),
onTap: () => Navigator.pushNamed(context, DemocracyPage.route),
),
ListTile(
title: Text(
l10n.changeYourPin,
Expand Down

0 comments on commit dcb92ea

Please sign in to comment.