Updated for flutter 1.20.x

This commit is contained in:
M 2020-08-31 11:44:58 +03:00
parent 24d139e540
commit fec2ec2845
9 changed files with 155 additions and 128 deletions

View file

@ -0,0 +1 @@
a2dce69f54a78f5b00e19850e4b2d402

View file

@ -44,6 +44,8 @@ PODS:
- Flutter
- shared_preferences (0.0.1):
- Flutter
- shared_preferences_linux (0.0.1):
- Flutter
- shared_preferences_macos (0.0.1):
- Flutter
- shared_preferences_web (0.0.1):
@ -51,6 +53,8 @@ PODS:
- SwiftProtobuf (1.8.0)
- url_launcher (0.0.1):
- Flutter
- url_launcher_linux (0.0.1):
- Flutter
- url_launcher_macos (0.0.1):
- Flutter
- url_launcher_web (0.0.1):
@ -61,7 +65,7 @@ DEPENDENCIES:
- cw_monero (from `.symlinks/plugins/cw_monero/ios`)
- devicelocale (from `.symlinks/plugins/devicelocale/ios`)
- esys_flutter_share (from `.symlinks/plugins/esys_flutter_share/ios`)
- Flutter (from `.symlinks/flutter/ios-release`)
- Flutter (from `.symlinks/flutter/ios`)
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- local_auth (from `.symlinks/plugins/local_auth/ios`)
@ -71,9 +75,11 @@ DEPENDENCIES:
- path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`)
- share (from `.symlinks/plugins/share/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`)
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
- shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
- url_launcher_linux (from `.symlinks/plugins/url_launcher_linux/ios`)
- url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`)
- url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`)
@ -92,7 +98,7 @@ EXTERNAL SOURCES:
esys_flutter_share:
:path: ".symlinks/plugins/esys_flutter_share/ios"
Flutter:
:path: ".symlinks/flutter/ios-release"
:path: ".symlinks/flutter/ios"
flutter_plugin_android_lifecycle:
:path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios"
flutter_secure_storage:
@ -111,12 +117,16 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/share/ios"
shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios"
shared_preferences_linux:
:path: ".symlinks/plugins/shared_preferences_linux/ios"
shared_preferences_macos:
:path: ".symlinks/plugins/shared_preferences_macos/ios"
shared_preferences_web:
:path: ".symlinks/plugins/shared_preferences_web/ios"
url_launcher:
:path: ".symlinks/plugins/url_launcher/ios"
url_launcher_linux:
:path: ".symlinks/plugins/url_launcher_linux/ios"
url_launcher_macos:
:path: ".symlinks/plugins/url_launcher_macos/ios"
url_launcher_web:
@ -138,10 +148,12 @@ SPEC CHECKSUMS:
path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0
share: 0b2c3e82132f5888bccca3351c504d0003b3b410
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
SwiftProtobuf: 2cbd9409689b7df170d82a92a33443c8e3e14a70
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0
url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c

View file

@ -319,7 +319,6 @@
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@ -399,7 +398,6 @@
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@ -455,7 +453,6 @@
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;

View file

@ -70,7 +70,7 @@ class ElectrumClient {
print(e);
}
},
onError: (_) => _setIsConnected(false),
onError: (Error _) => _setIsConnected(false),
onDone: () => _setIsConnected(false));
keepAlive();
}

View file

@ -80,7 +80,7 @@ Future<void> bootstrap(
_reconnectionTimer?.cancel();
_onWalletSyncStatusChangeReaction = reaction(
(_) => wallet.syncStatus is ConnectedSyncStatus,
(_) async => await wallet.startSync());
(Object _) async => await wallet.startSync());
_reconnectionTimer = Timer.periodic(Duration(seconds: 5), (_) async {
if (wallet.syncStatus is LostConnectionSyncStatus ||

View file

@ -1,45 +1,46 @@
import 'package:mobx/mobx.dart';
Dispose connectDifferent<T, Y>(ObservableList<T> source, ObservableList<Y> dest,
Y Function(T) transform, {bool Function(T) filter}) {
return source.observe((change) {
switch (change.type) {
case OperationType.add:
final _values = change.added;
Iterable<T> values;
void connectDifferent<T, Y>(
ObservableList<T> source, ObservableList<Y> dest, Y Function(T) transform,
{bool Function(T) filter}) {
source.observe((ListChange<T> change) {
// switch (change.type) {
// case OperationType.add:
// final _values = change.added;
// Iterable<T> values;
if (filter != null) {
values = _values.where(filter);
// if (filter != null) {
// values = _values.where(filter);
// }
// dest.addAll(values.map((e) => transform(e)));
// break;
// case OperationType.remove:
// change.removed.forEach((element) {
// dest.remove(element);
// });
// // dest.removeAt(change.index);
// break;
// case OperationType.update:
// // change.index
// break;
// }
});
}
dest.addAll(values.map((e) => transform(e)));
break;
case OperationType.remove:
print(change.index);
print(change.removed);
change.removed.forEach((element) { dest.remove(element); });
void connect<T>(ObservableList<T> source, ObservableList<T> dest) {
source.observe((ListChange<T> change) {
// switch (change.type) {
// case OperationType.add:
// dest.addAll(change.added);
// break;
// case OperationType.remove:
// dest.removeAt(change.index);
break;
case OperationType.update:
// change.index
break;
}
});
}
Dispose connect<T>(ObservableList<T> source, ObservableList<T> dest) {
return source.observe((change) {
switch (change.type) {
case OperationType.add:
dest.addAll(change.added);
break;
case OperationType.remove:
dest.removeAt(change.index);
break;
case OperationType.update:
// change.index
break;
}
// break;
// case OperationType.update:
// // change.index
// break;
// }
});
}

View file

@ -44,7 +44,7 @@ abstract class SettingsViewModelBase with Store {
SwitcherListItem(
title: S.current.settings_save_recipient_address,
value: () => shouldSaveRecipientAddress,
onValueChange: (bool value) => shouldSaveRecipientAddress = value)
onValueChange: (bool value) => setShouldSaveRecipientAddress(value))
],
[
RegularListItem(
@ -70,7 +70,7 @@ abstract class SettingsViewModelBase with Store {
title: S.current.settings_allow_biometrical_authentication,
value: () => allowBiometricalAuthentication,
onValueChange: (bool value) =>
allowBiometricalAuthentication = value),
setAllowBiometricalAuthentication(value)),
SwitcherListItem(
title: S.current.settings_dark_mode,
value: () => _settingsStore.isDarkTheme,
@ -139,23 +139,23 @@ abstract class SettingsViewModelBase with Store {
bool get shouldSaveRecipientAddress =>
_settingsStore.shouldSaveRecipientAddress;
@action
set shouldSaveRecipientAddress(bool value) =>
_settingsStore.shouldSaveRecipientAddress = value;
@computed
bool get allowBiometricalAuthentication =>
_settingsStore.allowBiometricalAuthentication;
@action
set allowBiometricalAuthentication(bool value) =>
_settingsStore.allowBiometricalAuthentication = value;
final Map<String, String> itemHeaders;
final SettingsStore _settingsStore;
final WalletType _walletType;
List<List<SettingsListItem>> sections;
@action
void setShouldSaveRecipientAddress(bool value) =>
_settingsStore.shouldSaveRecipientAddress = value;
@action
void setAllowBiometricalAuthentication(bool value) =>
_settingsStore.allowBiometricalAuthentication = value;
@action
void toggleTransactionsDisplay() =>
actionlistDisplayMode.contains(ActionListDisplayMode.transactions)

View file

@ -1,13 +1,20 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
analyzer:
_fe_analyzer_shared:
dependency: transitive
description:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.0"
analyzer:
dependency: "direct overridden"
description:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "0.36.4"
version: "0.39.14"
archive:
dependency: transitive
description:
@ -28,14 +35,14 @@ packages:
name: asn1lib
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.4"
version: "0.6.5"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.1"
version: "2.4.2"
auto_size_text:
dependency: "direct main"
description:
@ -105,7 +112,7 @@ packages:
name: build
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.2"
version: "1.3.0"
build_config:
dependency: transitive
description:
@ -121,26 +128,26 @@ packages:
source: hosted
version: "2.1.4"
build_resolvers:
dependency: transitive
dependency: "direct dev"
description:
name: build_resolvers
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.1"
version: "1.3.11"
build_runner:
dependency: "direct dev"
description:
name: build_runner
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.0"
version: "1.10.1"
build_runner_core:
dependency: transitive
description:
name: build_runner_core
url: "https://pub.dartlang.org"
source: hosted
version: "5.1.0"
version: "6.0.1"
built_collection:
dependency: transitive
description:
@ -161,7 +168,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.1"
version: "1.0.0"
charcode:
dependency: transitive
description:
@ -176,6 +183,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
cli_util:
dependency: transitive
description:
name: cli_util
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
clock:
dependency: transitive
description:
@ -189,14 +203,14 @@ packages:
name: code_builder
url: "https://pub.dartlang.org"
source: hosted
version: "3.3.0"
version: "3.4.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.12"
version: "1.14.13"
convert:
dependency: transitive
description:
@ -210,14 +224,14 @@ packages:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
version: "2.1.5"
csslib:
dependency: transitive
description:
name: csslib
url: "https://pub.dartlang.org"
source: hosted
version: "0.16.1"
version: "0.16.2"
cupertino_icons:
dependency: "direct main"
description:
@ -245,7 +259,7 @@ packages:
name: dartx
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
version: "0.5.0"
date_range_picker:
dependency: "direct main"
description:
@ -280,7 +294,7 @@ packages:
name: dotted_border
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
version: "1.0.6"
encrypt:
dependency: "direct main"
description:
@ -295,6 +309,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
ffi:
dependency: transitive
description:
@ -308,7 +329,7 @@ packages:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "5.2.0"
version: "5.2.1"
fixnum:
dependency: transitive
description:
@ -346,7 +367,7 @@ packages:
name: flutter_mobx
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0+1"
version: "1.1.0+2"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
@ -367,7 +388,7 @@ packages:
name: flutter_slidable
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.4"
version: "0.5.7"
flutter_test:
dependency: "direct dev"
description: flutter
@ -378,20 +399,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
front_end:
dependency: transitive
description:
name: front_end
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.19"
get_it:
dependency: "direct main"
description:
name: get_it
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.2"
version: "4.0.4"
glob:
dependency: transitive
description:
@ -419,21 +433,21 @@ packages:
name: hive
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.1+1"
version: "1.4.4"
hive_flutter:
dependency: "direct main"
description:
name: hive_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0+2"
version: "0.3.1"
hive_generator:
dependency: "direct dev"
description:
name: hive_generator
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.0+2"
version: "0.7.1"
html:
dependency: transitive
description:
@ -447,7 +461,7 @@ packages:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.1"
version: "0.12.2"
http_multi_server:
dependency: transitive
description:
@ -468,7 +482,7 @@ packages:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.12"
version: "2.1.14"
intl:
dependency: "direct main"
description:
@ -497,20 +511,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
kernel:
dependency: transitive
description:
name: kernel
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.19"
local_auth:
dependency: "direct main"
description:
name: local_auth
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.2+3"
version: "0.6.3+1"
logging:
dependency: transitive
description:
@ -524,7 +531,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.6"
version: "0.12.8"
meta:
dependency: transitive
description:
@ -538,21 +545,21 @@ packages:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.6+3"
version: "0.9.7"
mobx:
dependency: "direct main"
description:
name: mobx
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.10"
version: "1.2.1+2"
mobx_codegen:
dependency: "direct dev"
description:
name: mobx_codegen
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.3+1"
version: "1.1.0+1"
node_interop:
dependency: transitive
description:
@ -580,14 +587,7 @@ packages:
name: package_info
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1"
package_resolver:
dependency: transitive
description:
name: package_resolver
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.10"
version: "0.4.3"
password:
dependency: "direct main"
description:
@ -601,14 +601,14 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.4"
version: "1.7.0"
path_drawing:
dependency: transitive
description:
name: path_drawing
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1"
version: "0.4.1+1"
path_parsing:
dependency: transitive
description:
@ -622,14 +622,14 @@ packages:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.11"
version: "1.6.14"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+1"
version: "0.0.1+2"
path_provider_macos:
dependency: transitive
description:
@ -643,7 +643,7 @@ packages:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
version: "1.0.3"
pedantic:
dependency: "direct dev"
description:
@ -657,7 +657,7 @@ packages:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
version: "3.0.4"
platform:
dependency: transitive
description:
@ -755,14 +755,21 @@ packages:
name: share
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.4+3"
version: "0.6.5"
shared_preferences:
dependency: "direct main"
description:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.7+3"
version: "0.5.10"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.2+2"
shared_preferences_macos:
dependency: transitive
description:
@ -790,7 +797,7 @@ packages:
name: shelf
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.7"
version: "0.7.9"
shelf_web_socket:
dependency: transitive
description:
@ -823,7 +830,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.3"
version: "1.9.5"
stream_channel:
dependency: transitive
description:
@ -858,7 +865,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.15"
version: "0.2.17"
time:
dependency: transitive
description:
@ -879,14 +886,21 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
version: "1.2.0"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "5.4.11"
version: "5.5.1"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+1"
url_launcher_macos:
dependency: transitive
description:
@ -900,14 +914,14 @@ packages:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.7"
version: "1.0.8"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.1+6"
version: "0.1.3"
uuid:
dependency: "direct main"
description:
@ -949,7 +963,7 @@ packages:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.6.1"
version: "4.2.0"
yaml:
dependency: "direct main"
description:
@ -958,5 +972,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.7.0 <3.0.0"
dart: ">=2.9.0-14.0.dev <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"

View file

@ -34,8 +34,8 @@ dependencies:
barcode_scan: any
http: ^0.12.0+2
path_provider: ^1.3.0
mobx: ^0.3.7
flutter_mobx: 0.3.0+1
mobx: ^1.2.1+2
flutter_mobx: ^1.1.0+2
flutter_slidable: ^0.5.3
share: ^0.6.2+1
esys_flutter_share: ^1.0.2
@ -43,8 +43,8 @@ dependencies:
dio: 3.0.7
cw_monero:
path: ./cw_monero
hive: ^1.4.1+1
hive_flutter: ^0.3.0+2
hive: ^1.4.2
hive_flutter: ^0.3.1
local_auth: ^0.6.1
package_info: ^0.4.0+13
devicelocale: ^0.2.1
@ -64,15 +64,17 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^1.3.1
mobx_codegen: 0.3.3+1
build_runner: 1.10.1
build_resolvers: ^1.3.10
mobx_codegen: ^1.1.0+1
hive_generator: ^0.7.0+2
flutter_launcher_icons: ^0.7.4
pedantic: ^1.8.0
# Fix for hive https://github.com/hivedb/hive/issues/247#issuecomment-606838497
dependency_overrides:
dartx: ^0.3.0
dartx: ^0.5.0
analyzer: 0.39.14
flutter_icons:
image_path: "assets/images/app_logo.png"