Skip to content

Add in-app expense calculator, recent activity sorting, and refined settled states - #10

Merged
Dr-Usman merged 1 commit into
mainfrom
feature/expense-calculator
Sep 16, 2026
Merged

Dr-Usman merged 1 commit into
mainfrom
feature/expense-calculator

Conversation

@Dr-Usman

Copy link
Copy Markdown
Owner

Summary

  • In-app calculator: Added a calculator icon button in the expense amount textfield that opens an interactive calculator bottom sheet for evaluating bill expressions directly (e.g. 250 + 120 * 2).
  • Recent activity sorting: Home screen group cards are now sorted automatically by most recent activity timestamp (lastActivityAt derived from group creation, latest expense date/created, and settlements).
  • Refined Home group card layout: Simplified to a clean 2-row layout with Group Name and Amount on top, and Activity Date/Time with direction label below.
  • Natural date/time formatting: Subtitles display intuitive timestamps with day name (e.g. Just now, Today, 2:30 PM, Yesterday, 4:15 PM, Mon, 2:30 PM, Thu, Nov 20, 2025).
  • Clean settled states:
    • Home card: shows neutral zero amount with currency symbol (e.g. $0 / Rs 0) on the primary line and completely omits "Settled up" text.
    • Group detail BalanceHeroCard: unified into a single-row layout displaying [✓] All settled with right-aligned neutral zero amount, avoiding mobile width squeezing and text truncation.
  • Developer tools: Resetting database in debug mode immediately resets bottom navigation index back to Home tab.
  • Localization: Added and translated keys across all 9 supported locales (en, es, de, fr, pt, pt_BR, hi, ar, ja).

Test plan

  • [✓] dart format lib test — 0 format drift
  • [✓] flutter analyze — 0 issues found
  • [✓] flutter test — all 104 unit & widget tests pass (including math_evaluator_test.dart, calculator_sheet_test.dart, date_formatters_test.dart, home_screen_test.dart, and balance_hero_card_test.dart)
  • [✓] Manual verification of calculator input, group sorting, home card settled view, and group detail balance hero card

…ttled states

- Add in-app calculator modal for bill amounts with expression evaluation
- Sort home screen group cards by latest activity timestamp
- Refine home group card layout to 2 rows with day/date/time and amount on top
- Display neutral zero amount with symbol and omit 'settled up' text when settled
- Streamline group detail BalanceHeroCard to a clean single row when settled
- Reset bottom navigation tab index to home on developer data reset
- Add test coverage across math evaluator, calculator sheet, date formatters, and cards
@Dr-Usman
Dr-Usman merged commit 18c12c5 into main Sep 16, 2026
1 check passed
@Dr-Usman
Dr-Usman deleted the feature/expense-calculator branch September 16, 2026 10:01
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.

1 participant