Skip to content

Point of Sale (POS) mode#419

Merged
n13 merged 7 commits intomainfrom
n13/pos_mode
Mar 20, 2026
Merged

Point of Sale (POS) mode#419
n13 merged 7 commits intomainfrom
n13/pos_mode

Conversation

@n13
Copy link
Collaborator

@n13 n13 commented Mar 17, 2026

Add POS mode in Settings

Version 1 - MVP

  • Turn on POS mode in Settings
  • Get "New Charge" button on main screen
  • Enter amount
  • Get payment QR code
  • Scan with other device -> Send screen with the amount

TBD:

  • Scan for tx on the Cash register phone - maybe just increase scan frequency as long as there's outstanding, for up to 1 minute.
  • Use the reference number to peek transaction hash
  • NFC mode

POS Payment URL: https://www.quantus.com/pay?to=qzkuQhrEckiP2DQG4We6vwKptMQdm3AAtnH5tJaZeYxHQ1ofr&amount=2.8&ref=MMUDDWB2

Simulator Screenshot - iPhone 17 - 2026-03-18 at 12 04 56 image Simulator Screenshot - iPhone 17 - 2026-03-18 at 11 42 45 Simulator Screenshot - iPhone 17 - 2026-03-18 at 11 42 58 Simulator Screenshot - iPhone 17 - 2026-03-18 at 11 43 07

@n13 n13 changed the title N13/pos mode Point of Sale (POS) mode Mar 18, 2026
@n13
Copy link
Collaborator Author

n13 commented Mar 18, 2026

IMG_1321.MP4
2026-03-18.12.06.58.mp4

}

Widget _buildPosButton(AppColorsV2 colors, AppTextTheme text) {
return GestureDetector(
Copy link
Collaborator

@dewabisma dewabisma Mar 20, 2026

Choose a reason for hiding this comment

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

Please use the standard button component, if need new variant please add there :)

String _input = '0';
final _fmt = NumberFormattingService();

void _onDigit(String digit) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can't we use the number formatting that we use in the usual send input?

);
}

Widget _buildKeypad(AppColorsV2 colors, AppTextTheme text) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not really sure this is the best way to do this, because some locales use comma instead of dot to as decimal notation.


Widget _buildChargeButton(AppColorsV2 colors, AppTextTheme text) {
final disabled = !_isValid;
return GestureDetector(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use the standard button component, add new variant if needed

Copy link
Collaborator

@dewabisma dewabisma left a comment

Choose a reason for hiding this comment

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

I think we should keep button in control, and other concern about the keypad logic

@n13
Copy link
Collaborator Author

n13 commented Mar 20, 2026

I've addressed all the PR review comments by making the following changes:

  1. Standardized Buttons:

    • Added an accent variant to the standard Button component in lib/features/components/button.dart to support the green accent color used in the POS screens.
    • Replaced the custom Container buttons in both home_screen.dart ("New Charge" button) and pos_amount_screen.dart ("Charge" button) with the standard Button component using the new ButtonVariant.accent.
  2. Number Formatting Logic:

    • Updated _onDigit in pos_amount_screen.dart to use the standard DecimalInputFilter from quantus_sdk (which is exactly what the usual send input uses). This ensures that the input formatting logic is consistent across the app and handles edge cases properly.
  3. Locale-Aware Decimal Separator:

    • Replaced the hardcoded . in the custom keypad of pos_amount_screen.dart with NumberFormat().symbols.DECIMAL_SEP from the intl package. This ensures that users in locales that use commas for decimals (e.g., ,) will see and use the correct separator on the keypad.

@n13 n13 requested a review from dewabisma March 20, 2026 03:47
Copy link
Collaborator

@dewabisma dewabisma left a comment

Choose a reason for hiding this comment

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

Wonderful!

@n13 n13 merged commit f6667ba into main Mar 20, 2026
1 check passed
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