mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-05 10:29:23 +00:00
Merge branch 'CW-301-desktop-side-bar-ui' of https://github.com/cake-tech/cake_wallet into CW-318-desktop-marketplace
Conflicts: lib/src/screens/dashboard/desktop_widgets/desktop_dashboard_actions.dart
This commit is contained in:
commit
3fb8be0053
3 changed files with 201 additions and 177 deletions
|
@ -3,6 +3,7 @@ import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_action
|
||||||
import 'package:cake_wallet/src/screens/dashboard/widgets/market_place_page.dart';
|
import 'package:cake_wallet/src/screens/dashboard/widgets/market_place_page.dart';
|
||||||
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
|
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||||
|
|
||||||
class DesktopDashboardActions extends StatelessWidget {
|
class DesktopDashboardActions extends StatelessWidget {
|
||||||
final DashboardViewModel dashboardViewModel;
|
final DashboardViewModel dashboardViewModel;
|
||||||
|
@ -11,6 +12,8 @@ class DesktopDashboardActions extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
return Observer(
|
||||||
|
builder: (_) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
@ -72,4 +75,6 @@ class DesktopDashboardActions extends StatelessWidget {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'package:cake_wallet/utils/show_bar.dart';
|
||||||
import 'package:another_flushbar/flushbar.dart';
|
import 'package:another_flushbar/flushbar.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:cake_wallet/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
class PinCodeWidget extends StatefulWidget {
|
class PinCodeWidget extends StatefulWidget {
|
||||||
PinCodeWidget(
|
PinCodeWidget(
|
||||||
|
@ -117,7 +118,22 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
|
||||||
color: Theme.of(context).primaryTextTheme!.headline6!.color!,
|
color: Theme.of(context).primaryTextTheme!.headline6!.color!,
|
||||||
);
|
);
|
||||||
|
|
||||||
return Container(
|
return RawKeyboardListener(
|
||||||
|
focusNode: FocusNode(),
|
||||||
|
autofocus: true,
|
||||||
|
onKey: (keyEvent) {
|
||||||
|
if (keyEvent is RawKeyDownEvent) {
|
||||||
|
if (keyEvent.logicalKey.keyLabel == "Backspace") {
|
||||||
|
_pop();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int? number = int.tryParse(keyEvent.character ?? '');
|
||||||
|
if (number != null) {
|
||||||
|
_push(number);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
color: Theme.of(context).backgroundColor,
|
color: Theme.of(context).backgroundColor,
|
||||||
padding: EdgeInsets.only(left: 40.0, right: 40.0, bottom: 40.0),
|
padding: EdgeInsets.only(left: 40.0, right: 40.0, bottom: 40.0),
|
||||||
child: Column(children: <Widget>[
|
child: Column(children: <Widget>[
|
||||||
|
@ -236,9 +252,10 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
|
||||||
left: marginLeft, right: marginRight),
|
left: marginLeft, right: marginRight),
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: () => _pop(),
|
onPressed: () => _pop(),
|
||||||
// FIX-ME: Style
|
style: TextButton.styleFrom(
|
||||||
//color: Theme.of(context).backgroundColor,
|
backgroundColor: Theme.of(context).backgroundColor,
|
||||||
//shape: CircleBorder(),
|
shape: CircleBorder(),
|
||||||
|
),
|
||||||
child: deleteIconImage,
|
child: deleteIconImage,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -251,9 +268,10 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
|
||||||
left: marginLeft, right: marginRight),
|
left: marginLeft, right: marginRight),
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: () => _push(index),
|
onPressed: () => _push(index),
|
||||||
// FIX-ME: Style
|
style: TextButton.styleFrom(
|
||||||
//color: Theme.of(context).backgroundColor,
|
backgroundColor: Theme.of(context).backgroundColor,
|
||||||
//shape: CircleBorder(),
|
shape: CircleBorder(),
|
||||||
|
),
|
||||||
child: Text('$index',
|
child: Text('$index',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 30.0,
|
fontSize: 30.0,
|
||||||
|
@ -268,6 +286,7 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
|
||||||
)
|
)
|
||||||
: null))
|
: null))
|
||||||
]),
|
]),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ class NavBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
|
||||||
children: [
|
children: [
|
||||||
if (leading != null) Flexible(child: leading!),
|
if (leading != null) Flexible(child: leading!),
|
||||||
if (middle != null) middle!,
|
if (middle != null) middle!,
|
||||||
if (trailing != null) trailing!,
|
trailing ?? const SizedBox(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue