mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-25 12:06:05 +00:00
redesign | merged with dev branch
This commit is contained in:
parent
cc4a1f1d80
commit
18ccd5de35
6 changed files with 301 additions and 294 deletions
|
@ -257,8 +257,8 @@ Future setup(
|
||||||
getIt.registerFactory(
|
getIt.registerFactory(
|
||||||
() => SendPage(sendViewModel: getIt.get<SendViewModel>()));
|
() => SendPage(sendViewModel: getIt.get<SendViewModel>()));
|
||||||
|
|
||||||
// getIt.registerFactory(
|
getIt.registerFactory(
|
||||||
// () => SendTemplatePage(sendViewModel: getIt.get<SendViewModel>()));
|
() => SendTemplatePage(sendViewModel: getIt.get<SendViewModel>()));
|
||||||
|
|
||||||
getIt.registerFactory(() => WalletListViewModel(
|
getIt.registerFactory(() => WalletListViewModel(
|
||||||
walletInfoSource, getIt.get<AppStore>(), getIt.get<KeyService>()));
|
walletInfoSource, getIt.get<AppStore>(), getIt.get<KeyService>()));
|
||||||
|
|
|
@ -24,8 +24,8 @@ import 'package:cake_wallet/store/dashboard/fiat_convertation_store.dart';
|
||||||
// FIXME: move me
|
// FIXME: move me
|
||||||
Future<void> loadCurrentWallet() async {
|
Future<void> loadCurrentWallet() async {
|
||||||
final appStore = getIt.get<AppStore>();
|
final appStore = getIt.get<AppStore>();
|
||||||
final name = 'test';
|
//final name = 'test';
|
||||||
getIt.get<SharedPreferences>().getString('current_wallet_name');
|
final name = getIt.get<SharedPreferences>().getString('current_wallet_name');
|
||||||
final typeRaw =
|
final typeRaw =
|
||||||
getIt.get<SharedPreferences>().getInt('current_wallet_type') ?? 0;
|
getIt.get<SharedPreferences>().getInt('current_wallet_type') ?? 0;
|
||||||
final type = deserializeFromInt(typeRaw);
|
final type = deserializeFromInt(typeRaw);
|
||||||
|
|
|
@ -104,9 +104,12 @@ class DashboardPage extends BasePage {
|
||||||
)),
|
)),
|
||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
padding: EdgeInsets.only(left: 44, right: 0, bottom: 24),
|
padding: EdgeInsets.only(
|
||||||
|
left: 45,
|
||||||
|
right: 45,
|
||||||
|
bottom: 24
|
||||||
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Flexible(
|
Flexible(
|
||||||
child: ActionButton(
|
child: ActionButton(
|
||||||
|
@ -120,7 +123,16 @@ class DashboardPage extends BasePage {
|
||||||
child: ActionButton(
|
child: ActionButton(
|
||||||
image: exchangeImage,
|
image: exchangeImage,
|
||||||
title: S.of(context).exchange,
|
title: S.of(context).exchange,
|
||||||
route: Routes.exchange),
|
route: Routes.exchange
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Flexible(
|
||||||
|
child: ActionButton(
|
||||||
|
image: receiveImage,
|
||||||
|
title: S.of(context).receive,
|
||||||
|
route: Routes.receive,
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -79,13 +79,13 @@ class WalletMenu {
|
||||||
return AlertWithTwoActions(
|
return AlertWithTwoActions(
|
||||||
alertTitle: S.of(context).reconnection,
|
alertTitle: S.of(context).reconnection,
|
||||||
alertContent: S.of(context).reconnect_alert_text,
|
alertContent: S.of(context).reconnect_alert_text,
|
||||||
leftButtonText: S.of(context).ok,
|
rightButtonText: S.of(context).ok,
|
||||||
rightButtonText: S.of(context).cancel,
|
leftButtonText: S.of(context).cancel,
|
||||||
actionLeftButton: () async {
|
actionRightButton: () async {
|
||||||
await reconnect?.call();
|
await reconnect?.call();
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
actionRightButton: () => Navigator.of(context).pop());
|
actionLeftButton: () => Navigator.of(context).pop());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import 'package:cake_wallet/view_model/send/send_view_model.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
|
import 'package:cake_wallet/palette.dart';
|
||||||
import 'package:cake_wallet/src/widgets/address_text_field.dart';
|
import 'package:cake_wallet/src/widgets/address_text_field.dart';
|
||||||
import 'package:cake_wallet/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
import 'package:cake_wallet/src/widgets/top_panel.dart';
|
import 'package:cake_wallet/src/widgets/top_panel.dart';
|
||||||
|
@ -96,8 +97,9 @@ class BaseSendWidget extends StatelessWidget {
|
||||||
padding: EdgeInsets.only(top: isTemplate ? 20 : 0),
|
padding: EdgeInsets.only(top: isTemplate ? 20 : 0),
|
||||||
child: AddressTextField(
|
child: AddressTextField(
|
||||||
controller: _addressController,
|
controller: _addressController,
|
||||||
placeholder: S.of(context).send_address(
|
// placeholder: S
|
||||||
sendViewModel.cryptoCurrencyTitle),
|
// .of(context)
|
||||||
|
// .send_address(sendViewModel.cryptoCurrencyTitle),
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
onURIScanned: (uri) {
|
onURIScanned: (uri) {
|
||||||
var address = '';
|
var address = '';
|
||||||
|
@ -410,40 +412,40 @@ class BaseSendWidget extends StatelessWidget {
|
||||||
// itemBuilder: (context, index) {
|
// itemBuilder: (context, index) {
|
||||||
// final template = templates[index];
|
// final template = templates[index];
|
||||||
|
|
||||||
return TemplateTile(
|
// return TemplateTile(
|
||||||
key: UniqueKey(),
|
// key: UniqueKey(),
|
||||||
to: template.name,
|
// to: template.name,
|
||||||
amount: template.amount,
|
// amount: template.amount,
|
||||||
from: template.cryptoCurrency,
|
// from: template.cryptoCurrency,
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
_addressController.text = template.address;
|
// _addressController.text = template.address;
|
||||||
_cryptoAmountController.text = template.amount;
|
// _cryptoAmountController.text = template.amount;
|
||||||
getOpenaliasRecord(context);
|
// getOpenaliasRecord(context);
|
||||||
},
|
// },
|
||||||
onRemove: () {
|
// onRemove: () {
|
||||||
showDialog<void>(
|
// showDialog<void>(
|
||||||
context: context,
|
// context: context,
|
||||||
builder: (dialogContext) {
|
// builder: (dialogContext) {
|
||||||
return AlertWithTwoActions(
|
// return AlertWithTwoActions(
|
||||||
alertTitle: S.of(context).template,
|
// alertTitle: S.of(context).template,
|
||||||
alertContent: S.of(context).confirm_delete_template,
|
// alertContent: S.of(context).confirm_delete_template,
|
||||||
rightButtonText: S.of(context).delete,
|
// leftButtonText: S.of(context).delete,
|
||||||
leftButtonText: S.of(context).cancel,
|
// rightButtonText: S.of(context).cancel,
|
||||||
actionRightButton: () {
|
// actionLeftButton: () {
|
||||||
Navigator.of(dialogContext).pop();
|
// Navigator.of(dialogContext).pop();
|
||||||
sendViewModel.sendTemplateStore.remove(template: template);
|
// sendViewModel.sendTemplateStore.remove(template: template);
|
||||||
sendViewModel.sendTemplateStore.update();
|
// sendViewModel.sendTemplateStore.update();
|
||||||
},
|
// },
|
||||||
actionLeftButton: () => Navigator.of(dialogContext).pop()
|
// actionRightButton: () => Navigator.of(dialogContext).pop()
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
)
|
// )
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
31
pubspec.lock
31
pubspec.lock
|
@ -42,7 +42,7 @@ packages:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.2"
|
version: "2.4.1"
|
||||||
auto_size_text:
|
auto_size_text:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -210,7 +210,7 @@ packages:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.14.13"
|
version: "1.14.12"
|
||||||
convert:
|
convert:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -224,7 +224,7 @@ packages:
|
||||||
name: crypto
|
name: crypto
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.5"
|
version: "2.1.4"
|
||||||
csslib:
|
csslib:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -302,13 +302,6 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.2"
|
version: "1.0.2"
|
||||||
fake_async:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: fake_async
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "1.1.0"
|
|
||||||
ffi:
|
ffi:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -475,7 +468,7 @@ packages:
|
||||||
name: image
|
name: image
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.14"
|
version: "2.1.12"
|
||||||
intl:
|
intl:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -524,7 +517,7 @@ packages:
|
||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.8"
|
version: "0.12.6"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -594,7 +587,7 @@ packages:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.7.0"
|
version: "1.6.4"
|
||||||
path_drawing:
|
path_drawing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -650,7 +643,7 @@ packages:
|
||||||
name: petitparser
|
name: petitparser
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.4"
|
version: "2.4.0"
|
||||||
platform:
|
platform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -830,7 +823,7 @@ packages:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.5"
|
version: "1.9.3"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -865,7 +858,7 @@ packages:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.17"
|
version: "0.2.15"
|
||||||
time:
|
time:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -886,7 +879,7 @@ packages:
|
||||||
name: typed_data
|
name: typed_data
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.1.6"
|
||||||
url_launcher:
|
url_launcher:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -963,7 +956,7 @@ packages:
|
||||||
name: xml
|
name: xml
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.2.0"
|
version: "3.6.1"
|
||||||
yaml:
|
yaml:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -972,5 +965,5 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.1"
|
version: "2.2.1"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.9.0-14.0.dev <3.0.0"
|
dart: ">=2.7.0 <3.0.0"
|
||||||
flutter: ">=1.12.13+hotfix.5 <2.0.0"
|
flutter: ">=1.12.13+hotfix.5 <2.0.0"
|
||||||
|
|
Loading…
Reference in a new issue