Skip to content

Commit 19f1ae4

Browse files
authored
Merge pull request #353 from Quantus-Network/feat/improve-send-screen-again
Update send screen
2 parents 7e4899b + 9e070d9 commit 19f1ae4

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

mobile-app/lib/features/components/button.dart

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'dart:ui';
22
import 'package:flutter/material.dart';
3+
import 'package:quantus_sdk/quantus_sdk.dart';
34
import 'package:resonance_network_wallet/features/styles/app_colors_theme.dart';
45
import 'package:resonance_network_wallet/features/styles/app_text_theme.dart';
56

@@ -43,6 +44,7 @@ class Button extends StatelessWidget {
4344
final bool disabled = onPressed == null || isLoading || isDisabled;
4445

4546
final effectiveTextStyle = textStyle ?? context.themeText.smallTitle!;
47+
final disabledBtnColor = context.themeColors.buttonDisabled.useOpacity(0.6);
4648

4749
final buttonContent = Center(
4850
child: isLoading
@@ -56,7 +58,7 @@ class Button extends StatelessWidget {
5658
child: Text(
5759
label,
5860
style: disabled
59-
? effectiveTextStyle.copyWith(color: context.themeColors.textMuted)
61+
? effectiveTextStyle.copyWith(color: Colors.black)
6062
: effectiveTextStyle.copyWith(color: _getTitleColor(context, variant)),
6163
),
6264
),
@@ -70,7 +72,7 @@ class Button extends StatelessWidget {
7072
width: width,
7173
padding: padding,
7274
decoration: ShapeDecoration(
73-
color: disabled ? context.themeColors.buttonDisabled : null,
75+
color: disabled ? disabledBtnColor : null,
7476
gradient: !disabled
7577
? LinearGradient(
7678
begin: const Alignment(0.00, -1.00),
@@ -98,7 +100,7 @@ class Button extends StatelessWidget {
98100
width: width,
99101
padding: padding,
100102
decoration: ShapeDecoration(
101-
color: disabled ? context.themeColors.buttonDisabled : context.themeColors.buttonNeutral,
103+
color: disabled ? disabledBtnColor : context.themeColors.buttonNeutral,
102104
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(buttonRadius)),
103105
),
104106
child: buttonContent,
@@ -114,7 +116,7 @@ class Button extends StatelessWidget {
114116
width: width,
115117
padding: padding,
116118
decoration: ShapeDecoration(
117-
color: disabled ? context.themeColors.buttonDisabled : context.themeColors.buttonGlass,
119+
color: disabled ? disabledBtnColor : context.themeColors.buttonGlass,
118120
shape: RoundedRectangleBorder(
119121
side: disabled ? BorderSide.none : BorderSide(color: context.themeColors.buttonNeutral),
120122
borderRadius: BorderRadius.circular(buttonRadius),
@@ -131,7 +133,7 @@ class Button extends StatelessWidget {
131133
width: width,
132134
padding: padding,
133135
decoration: ShapeDecoration(
134-
color: disabled ? context.themeColors.buttonDisabled : context.themeColors.buttonDanger,
136+
color: disabled ? disabledBtnColor : context.themeColors.buttonDanger,
135137
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(buttonRadius)),
136138
),
137139
child: buttonContent,
@@ -143,7 +145,7 @@ class Button extends StatelessWidget {
143145
width: width,
144146
padding: padding,
145147
decoration: ShapeDecoration(
146-
color: disabled ? context.themeColors.buttonDisabled : context.themeColors.buttonSuccess,
148+
color: disabled ? disabledBtnColor : context.themeColors.buttonSuccess,
147149
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(buttonRadius)),
148150
),
149151
child: buttonContent,
@@ -159,7 +161,7 @@ class Button extends StatelessWidget {
159161
width: width,
160162
padding: padding,
161163
decoration: ShapeDecoration(
162-
color: disabled ? context.themeColors.buttonDisabled : context.themeColors.buttonGlass,
164+
color: disabled ? disabledBtnColor : context.themeColors.buttonGlass,
163165
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(buttonRadius)),
164166
),
165167
child: buttonContent,

mobile-app/lib/features/main/screens/send/send_screen.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import 'package:resonance_network_wallet/features/components/custom_text_field.d
1010
import 'package:resonance_network_wallet/features/components/scaffold_base.dart';
1111
import 'package:resonance_network_wallet/features/components/segmented_control.dart';
1212
import 'package:resonance_network_wallet/features/components/snackbar_helper.dart';
13-
import 'package:resonance_network_wallet/features/components/sphere.dart';
1413
import 'package:resonance_network_wallet/features/components/wallet_app_bar.dart';
1514
import 'package:resonance_network_wallet/features/main/screens/send/qr_scanner_screen.dart';
1615
import 'package:resonance_network_wallet/features/main/screens/send/recent_addresses.dart';
@@ -454,10 +453,6 @@ class SendScreenState extends ConsumerState<SendScreen> {
454453
@override
455454
Widget build(BuildContext context) {
456455
return ScaffoldBase(
457-
decorations: [
458-
const Positioned(top: 120, left: -30, child: Sphere(variant: 1, size: 144.23)),
459-
Positioned(top: context.containerHalfHeight, right: -40, child: const Sphere(variant: 2, size: 194)),
460-
],
461456
appBar: WalletAppBar(title: 'Send'),
462457
child: Consumer(
463458
builder: (context, ref, child) {

0 commit comments

Comments
 (0)