Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add account balance widget #11

Merged
merged 6 commits into from
Jan 24, 2024
Merged

Conversation

ethan-tbd
Copy link
Contributor

Implemented account balance widget containing the balance, and buttons to deposit and withdraw. SendPage was moved to its own tab in AppTabs

Simulator Screenshot - iPhone 15 Pro Max - 2024-01-23 at 18 30 54
Simulator Screenshot - iPhone 15 Pro Max - 2024-01-23 at 18 30 41

@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 20.0),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add some constants for these at some point so we don't have to duplicate this 20.0 everywhere in a future PR :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#13

@@ -24,12 +24,13 @@ const lightColorScheme = ColorScheme(
onSurface: Color(0xff000000),
surfaceVariant: Color(0xffFFE8DE),
onSurfaceVariant: Color(0xff212121),
outline: Color(0xff79747E),
outline: Color(0xff333333),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice! Do we need to update these for darkColorScheme too? Or are those ok already?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they looked ok but we may want to do a more thorough pass over this entire file later :)

Comment on lines +18 to +26
testWidgets('should show SendPage when tapped', (WidgetTester tester) async {
await tester.pumpWidget(
WidgetHelpers.testableWidget(child: const AppTabs()),
);

await tester.tap(find.text('Send'));
await tester.pumpAndSettle();
expect(find.byType(SendPage), findsOneWidget);
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could a test for the AccountBalance too if you wanna

This was referenced Jan 24, 2024
@ethan-tbd ethan-tbd merged commit 13a2b3e into main Jan 24, 2024
1 check passed
@ethan-tbd ethan-tbd deleted the add-account-balance-widget branch January 24, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants