Linux flutter upgrade (#1054)

* V4.8.1 v1.5.1 (#1038)

* Revert "Cw 397 chatwoot live support (#1011)"

This reverts commit af9b5ff10c.

* Add Version 4.8.1 configs

* Update macos build version [skip ci]

* Re add chatwoot (#1044)

* Revert "Revert "Cw 397 chatwoot live support (#1011)""

This reverts commit ecdc7baa2e.

* Re-add chatwoot
Change chatwoot base url

* Cw 396 additional themes (#962)

* fix: SectionStandardList using BuildContext as param

* refactor: deprecated backgroundColor -> colorScheme.background

* refactor: themeBase and current themes

* refactor: accentTextTheme.titleLarge.color -> dialogTheme.backgroundColor

* refactor: gradient background

* refactor: text themes using the same color as primaryColor

* refactor: accentTextTheme.bodySmall.color -> cardColor

* refactor: text themes using same dialogBackgroundColor

* refactor: scrollbarTheme

* refactor: create SyncIndicatorTheme

* refactor: SectionDivider

* refactor: base_page improvements and simplify

* refactor: collapsible_standart_list improvements

* refactor: accentTextTheme.bodyLarge.backgroundColor -> KeyboardTheme.keyboardBarColor

* refactor: create PinCodeTheme for accentTextTheme.bodyMedium

* refactor: create SupportPageTheme for accentTextTheme.displayLarge.backgroundColor and fix cases that use it

* refactor: accentTextTheme.displayLarge.color -> disabledColor

* refactor: create ExchangePageTheme

* refactor: create DashboardPageTheme and use textColor

* refactor: create NewWalletTheme for accentTextTheme.displayMedium

* refactor: create BalancePageTheme for accentTextTheme.displaySmall.backgroundColor

* refactor: create AddressTheme for accentTextTheme.displaySmall.color

* refactor: create IndicatorDotTheme

* refactor: create CakeMenuTheme

* refactor: create FilterTheme

* refactor: create WalletListTheme

* refactor: accentTextTheme.bodySmall.decorationColor -> InfoTheme.textColor

* refactor: accentTextTheme.titleLarge.backgroundColor -> PickerTheme.dividerColor

* refactor: primaryTextTheme.bodyLarge.backgroundColor -> AlertTheme.leftButtonTextColor

* refactor: primaryTextTheme.displayLarge.backgroundColor -> OrderTheme.iconColor

* refactor: create SendPageTheme

* fix: missing migrated styles

* refactor: primaryTextTheme.labelSmall.decorationColor -> PlaceholderTheme.color

* refactor: create TransactionTradeTheme

* refactor: create CakeTextTheme

* refactor: create AccountListTheme

* refactor: create ReceivePageTheme

* refactor: create QRCodeTheme

* refactor: move remaining items to CakeTextTheme and some missing fixes

* feat(display_settings): add new theme selector

* feat: additional themes

* fix: conflict error

* fix(lag): move colorScheme initialization to constructor

* feat: add backdropColor to alert and picker backdrop filters

* fix: merge fixes

* fix: send template page missing new colors

* fix: anonpay pages title and icon colors

* fix: merge fixes

* fix: unspent coins page

* fix: also fix exchange template

* fix: missing checkbox

* fix: fixes for high contrast theme

* Merge branch 'main' into CW-396-additional-themes

* fix: merge fixes

* fix: .gitignore and rm added files

* Fix review comments

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>

* Flutter update (#1048)

* Update Flutter
Update packages

* Fix localization issues
Fix UI issues
Update old packages
Update workflow
Update how to build guide

* Additional UI fixes for merged conflicts

* Fix Ethereum network for anonpay invoice (#1051)

* build: migrate from wakelock to wakelock_plus

- plus is compatible with package_info_plus ^4.0.0
- plus has implemented Linux support

* fix: theme & support view model merge fixes

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
Rafael Saes 2023-09-07 15:25:36 -03:00
parent 829892bd07
commit 0d7fad3610
17 changed files with 62 additions and 71 deletions

View file

@ -23,7 +23,7 @@ abstract class MoneroSubaddressListBase with Store {
bool _isUpdating;
void update({required int accountIndex}) {
refreshCoins(accountIndex);
// refreshCoins(accountIndex);
if (_isUpdating) {
return;

View file

@ -405,7 +405,7 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
}
Future<void> updateUnspent() async {
refreshCoins(walletAddresses.account!.id);
// refreshCoins(walletAddresses.account!.id);
unspentCoins.clear();

View file

@ -178,7 +178,7 @@ class MoneroWalletService extends WalletService<
final currentWalletInfo = walletInfoSource.values.firstWhere(
(info) => info.id == WalletBase.idFor(currentName, getType()));
final currentWallet =
MoneroWallet(walletInfo: currentWalletInfo, unspentCoinsInfo: unspentCoinsInfoSource);
MoneroWallet(walletInfo: currentWalletInfo, unspentCoinsInfo: unspentCoinsInfoSource, password: password);
await currentWallet.renameWalletFiles(newName);

View file

@ -7,17 +7,15 @@ import 'package:cw_core/wallet_base.dart';
import 'package:cw_core/balance.dart';
import 'package:cw_core/transaction_info.dart';
import 'package:cw_core/sync_status.dart';
import 'package:wakelock/wakelock.dart';
import 'package:wakelock_plus/wakelock_plus.dart';
ReactionDisposer? _onWalletSyncStatusChangeReaction;
void startWalletSyncStatusChangeReaction(
WalletBase<Balance, TransactionHistoryBase<TransactionInfo>,
TransactionInfo> wallet,
WalletBase<Balance, TransactionHistoryBase<TransactionInfo>, TransactionInfo> wallet,
FiatConversionStore fiatConversionStore) {
_onWalletSyncStatusChangeReaction?.reaction.dispose();
_onWalletSyncStatusChangeReaction =
reaction((_) => wallet.syncStatus, (SyncStatus status) async {
_onWalletSyncStatusChangeReaction = reaction((_) => wallet.syncStatus, (SyncStatus status) async {
try {
if (status is ConnectedSyncStatus) {
await wallet.startSync();
@ -27,12 +25,12 @@ void startWalletSyncStatusChangeReaction(
}
}
if (status is SyncingSyncStatus) {
await Wakelock.enable();
await WakelockPlus.enable();
}
if (status is SyncedSyncStatus || status is FailedSyncStatus) {
await Wakelock.disable();
await WakelockPlus.disable();
}
} catch(e) {
} catch (e) {
print(e.toString());
}
});

View file

@ -2,6 +2,9 @@ import 'package:auto_size_text/auto_size_text.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:flutter/material.dart';
class DesktopActionButton extends StatelessWidget {

View file

@ -8,9 +8,12 @@ import 'package:cake_wallet/entities/receive_page_option.dart';
import 'package:cake_wallet/src/screens/dashboard/widgets/present_receive_option_picker.dart';
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
import 'package:cake_wallet/src/widgets/gradient_background.dart';
import 'package:cake_wallet/src/widgets/gradient_background.dart';
import 'package:cake_wallet/src/widgets/keyboard_done_button.dart';
import 'package:cake_wallet/themes/extensions/receive_page_theme.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:cake_wallet/themes/extensions/receive_page_theme.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:cake_wallet/themes/theme_base.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/utils/share_util.dart';

View file

@ -2,6 +2,7 @@ import 'package:cake_wallet/routes.dart';
import 'package:cake_wallet/src/screens/exchange_trade/information_page.dart';
import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
import 'package:cake_wallet/utils/feature_flag.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:flutter/material.dart';
@ -12,6 +13,8 @@ import 'package:cake_wallet/src/widgets/introducing_card.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
class BalancePage extends StatelessWidget {
BalancePage({required this.dashboardViewModel, required this.settingsStore});

View file

@ -180,26 +180,20 @@ class _WalletNameFormState extends State<WalletNameForm> {
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.w600,
color: Theme.of(context).primaryTextTheme!.headline6!.color!),
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
decoration: InputDecoration(
hintStyle: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w500,
color: Theme.of(context).accentTextTheme!.headline2!.color!),
color: Theme.of(context).extension<NewWalletTheme>()!.hintTextColor),
hintText: S.of(context).password,
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.accentTextTheme!
.headline2!
.decorationColor!,
color: Theme.of(context).extension<NewWalletTheme>()!.underlineColor,
width: 1.0)),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.accentTextTheme!
.headline2!
.decorationColor!,
color: Theme.of(context).extension<NewWalletTheme>()!.underlineColor,
width: 1.0),
)
)
@ -212,26 +206,20 @@ class _WalletNameFormState extends State<WalletNameForm> {
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.w600,
color: Theme.of(context).primaryTextTheme!.headline6!.color!),
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
decoration: InputDecoration(
hintStyle: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w500,
color: Theme.of(context).accentTextTheme!.headline2!.color!),
color: Theme.of(context).extension<NewWalletTheme>()!.hintTextColor),
hintText: S.of(context).repeate_wallet_password,
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.accentTextTheme!
.headline2!
.decorationColor!,
color: Theme.of(context).extension<NewWalletTheme>()!.underlineColor,
width: 1.0)),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.accentTextTheme!
.headline2!
.decorationColor!,
color: Theme.of(context).extension<NewWalletTheme>()!.underlineColor,
width: 1.0),
)
)

View file

@ -69,7 +69,6 @@ class WalletRestoreFromKeysFromState extends State<WalletRestoreFromKeysFrom> {
repeatedPasswordListener = () => widget.onRepeatedPasswordChange?.call(repeatedPasswordTextEditingController!.text);
repeatedPasswordTextEditingController?.addListener(repeatedPasswordListener!);
}
super.initState();
privateKeyController.addListener(() {

View file

@ -41,17 +41,18 @@ class SecurityBackupPage extends BasePage {
),
),
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
if (!SettingsStoreBase.walletPasswordDirectInput)
...[SettingsCellWithArrow(
title: S.current.create_backup,
handler: (_) => _authService.authenticateAction(
context,
route: Routes.backup,
conditionToDetermineIfToUse2FA: _securitySettingsViewModel
.shouldRequireTOTP2FAForAllSecurityAndBackupSettings,
if (!SettingsStoreBase.walletPasswordDirectInput) ...[
SettingsCellWithArrow(
title: S.current.create_backup,
handler: (_) => _authService.authenticateAction(
context,
route: Routes.backup,
conditionToDetermineIfToUse2FA:
_securitySettingsViewModel.shouldRequireTOTP2FAForAllSecurityAndBackupSettings,
),
),
),
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24))],
StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
],
SettingsCellWithArrow(
title: S.current.settings_change_pin,
handler: (_) => _authService.authenticateAction(

View file

@ -1,7 +1,7 @@
import 'package:cake_wallet/src/screens/settings/widgets/settings_cell_with_arrow.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_link_provider_cell.dart';
import 'package:cake_wallet/src/widgets/standard_list.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/themes/extensions/support_page_theme.dart';
import 'package:cake_wallet/view_model/settings/link_list_item.dart';
import 'package:cake_wallet/view_model/settings/regular_list_item.dart';
import 'package:cake_wallet/view_model/support_view_model.dart';
@ -19,19 +19,15 @@ class SupportPage extends BasePage {
@override
Widget body(BuildContext context) {
final iconColor = Theme.of(context)
.accentTextTheme!
.displayLarge!
.backgroundColor!;
final iconColor = Theme.of(context).extension<SupportPageTheme>()!.iconColor;
// FIX-ME: Added `context` it was not used here before, maby bug ?
return Center(
child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: 500),
child: SectionStandardList(
context: context,
sectionCount: 1,
itemCounter: (int _) => supportViewModel.items.length,
itemBuilder: (_, __, index) {
itemBuilder: (_, index) {
final item = supportViewModel.items[index];
if (item is RegularListItem) {

View file

@ -1,3 +1,6 @@
import 'package:cake_wallet/src/screens/auth/auth_page.dart';
import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart';
import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/main.dart';
import 'package:cake_wallet/src/screens/auth/auth_page.dart';

View file

@ -2,11 +2,13 @@ import 'package:another_flushbar/flushbar.dart';
import 'package:cake_wallet/core/execution_state.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/auth/auth_page.dart';
import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/new_wallet_theme.dart';
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/utils/show_bar.dart';
import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart';
import 'package:cake_wallet/view_model/wallet_unlock_verifiable_view_model.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:cake_wallet/view_model/wallet_unlock_view_model.dart';
@ -168,7 +170,7 @@ class WalletUnlockPageState extends AuthPageState<WalletUnlockPage> {
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.w500,
color: Theme.of(context).primaryTextTheme.titleLarge!.color!)),
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor)),
SizedBox(height: 24),
Form(
child: TextFormField(
@ -179,26 +181,20 @@ class WalletUnlockPageState extends AuthPageState<WalletUnlockPage> {
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.w600,
color: Theme.of(context).primaryTextTheme.titleLarge!.color!),
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor),
decoration: InputDecoration(
hintStyle: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w500,
color: Theme.of(context).accentTextTheme.displayMedium!.color!),
color: Theme.of(context).extension<NewWalletTheme>()!.hintTextColor),
hintText: S.of(context).enter_wallet_password,
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.accentTextTheme
.displayMedium!
.decorationColor!,
color: Theme.of(context).extension<NewWalletTheme>()!.underlineColor,
width: 1.0)),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.accentTextTheme
.displayMedium!
.decorationColor!,
color: Theme.of(context).extension<NewWalletTheme>()!.underlineColor,
width: 1.0),
)
)))])),

View file

@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
import 'package:mobx/mobx.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:cake_wallet/wallet_type_utils.dart';
import 'package:cake_wallet/.secrets.g.dart' as secrets;
part 'support_view_model.g.dart';
@ -19,7 +20,7 @@ abstract class SupportViewModelBase with Store {
title: S.current.faq,
handler: (BuildContext context) async {
try {
await launch(url);
await launchUrl(url);
} catch (e) {}
},
),
@ -87,6 +88,8 @@ abstract class SupportViewModelBase with Store {
final guidesUrl = 'https://guides.cakewallet.com';
static final url = Uri(scheme: "https", host: "guides.cakewallet.com");
String fetchUrl({String locale = "en", String authToken = ""}) {
var supportUrl =
"https://app.chatwoot.com/widget?website_token=${secrets.chatwootWebsiteToken}&locale=${locale}";

View file

@ -29,7 +29,7 @@ dependencies:
hive_flutter: ^1.1.0
local_auth: ^2.1.0
local_auth_android: 1.0.21
package_info_plus: ^3.1.0
package_info_plus: ^4.1.0
devicelocale:
git:
url: https://github.com/cake-tech/flutter-devicelocale
@ -60,7 +60,7 @@ dependencies:
device_display_brightness: ^0.0.6
workmanager: ^0.5.1
platform_device_id: ^1.0.1
wakelock: ^0.6.2
wakelock_plus: ^1.1.1
flutter_mailer: ^2.0.2
device_info_plus: 8.1.0
base32: 2.1.3

View file

@ -497,8 +497,7 @@ import 'package:cw_ethereum/ethereum_transaction_priority.dart';
abstract class Ethereum {
List<String> getEthereumWordList(String language);
WalletService createEthereumWalletService(Box<WalletInfo> walletInfoSource, bool isDirect);
WalletCredentials createEthereumNewWalletCredentials({
required String name, WalletInfo? walletInfo, String? password});
WalletCredentials createEthereumNewWalletCredentials({required String name, WalletInfo? walletInfo, String? password});
WalletCredentials createEthereumRestoreWalletFromSeedCredentials({required String name, required String mnemonic, required String password});
WalletCredentials createEthereumRestoreWalletFromPrivateKey({required String name, required String privateKey, required String password});
String getAddress(WalletBase wallet);
@ -554,7 +553,6 @@ Future<void> generatePubspec({
required bool hasBitcoin,
required bool hasHaven,
required bool hasEthereum,
required bool hasFlutterSecureStorage,
required bool hasFlutterSecureStorage}) async {
const cwCore = """
cw_core: