Skip to content
Get started
Menu
Get started

Flutter package · rakit_ui 0.9.0 · MIT

Flutter UI for mobile product screens. Payments get the extra rigor money deserves.

Composable widgets and copyable blocks for authentication, collections and product UI, plus a dedicated Payments category for checkout, status, receipts and optional KYC. Your app owns identity, prices and outcomes; Rakit UI shows them clearly, in English or Indonesian, light or dark.

pub.dev (0.9.0)flutter pub add rakit_ui

Source on GitHubrakit_ui on pub.dev

Show the screen for a payment that is
Receipt in Indonesian after host-confirmed success: green band, "Pembayaran berhasil", Rp102.500, item and service fee lines, the total, the masked wallet method and a Selesai button.The same receipt in dark mode: green band, "Pembayaran berhasil", Rp102.500, line items, total and a Selesai button.
A receipt appears only after your host confirms success, with the same reference and total.
Pending virtual-account payment in Indonesian: solid amber band, amount, a monospace account number with a copy button, a countdown, folded steps and a Check status button.The same pending virtual-account payment in dark mode: solid amber band, amount, account number with a copy button, countdown and a Cek status button.
Waiting for a transfer: the account number to copy, the deadline and Check status. No pay-again button.
Payment screen with a hatched amber band, the title "Result not confirmed yet", the amount Rp102,500, the line "Don't pay again." and one action, Check status.The same unknown-outcome screen in dark mode, in Indonesian: hatched amber band, "Hasil belum terkonfirmasi", Rp102.500, "Jangan bayar lagi." and one action, Cek status.
The response was lost after the server accepted the payment. “Don’t pay again” and one action: check status.
Checkout notice in Indonesian saying the total changed from Rp102.500 to Rp103.500, the new line items, and an unchecked box to accept the new total; the pay button is disabled.The same changed-total notice in dark mode: old and new totals, an unchecked box to accept Rp103.500, and a disabled pay button.
The total changed after review. Pay stays disabled until the customer accepts the new total.

Real Flutter output from the example app on Android.

General product UI first, Payments as a dedicated category

Section titled “General product UI first, Payments as a dedicated category”

Start with the screens almost every mobile product needs. The Login and Register blocks are host-owned authentication compositions with validation, pending and failure states, recovery and verification navigation. Collection supplies lazy host-built rows and paging states. They copy as Dart source and use the same primitives, accessibility floor and theming as the payment surfaces.

Payments stays a dedicated category rather than a separate kit: checkout, status, receipts, history, method selection, wallet handoff and optional KYC carry stricter financial and host-ownership rules. General blocks never become a payment runtime, and payment blocks never become an identity or backend service.

One payment, a lost response, no second payment offered

Section titled “One payment, a lost response, no second payment offered”
  1. Pay once

    The customer reviews the item, the visible service fee and the method, then pays. The host starts one payment attempt.

    Checkout review in Indonesian: merchant, item Rp100.000, service fee Rp2.500, wallet method and a pinned pay button.Checkout review in Indonesian: merchant, item Rp100.000, service fee Rp2.500, wallet method and a pinned pay button.
  2. The response is lost

    No receipt and no pay-again button. The screen says “Don’t pay again” and offers one action: check status of the same attempt.

    Unknown result in Indonesian: hatched amber band, "Hasil belum terkonfirmasi", Rp102.500, "Jangan bayar lagi.", reference DEMO-1 and one Cek status button.Unknown result in Indonesian: hatched amber band, "Hasil belum terkonfirmasi", Rp102.500, "Jangan bayar lagi.", reference DEMO-1 and one Cek status button.
  3. Confirmed, then the receipt

    The host confirms that same attempt. Only then does the matching receipt appear, with the same reference and total.

    Receipt in Indonesian after host-confirmed success, with the matching reference, total, service fee and masked wallet method.Receipt in Indonesian after host-confirmed success, with the matching reference, total, service fee and masked wallet method.

This is the example app’s checkout demo. It runs on an Android emulator or an iOS Simulator with synthetic data and a fake host: no money moves and no network calls are made. Walk through the demo or run it yourself.

These cases cost money and support time. Each has a designed answer; switch between them at the top.

The submit timed out after the server accepted it

The screen says “Don’t pay again.” A hatched band never looks like ordinary pending, and the one action is check status with the same attempt reference.

An older status arrives after a newer one

PaymentAttempt.reconcile rejects stale revisions, another attempt’s data, a mismatched server reference, and a success that turns into anything else without an official provider correction.

The total changed after the customer chose a method

PaymentConfirmation shows the old and new total and keeps confirm unreachable until the customer accepts.

The payment is still pending or unknown

No pay-again action. A new attempt appears only when the host allows it and the previous attempt is final and not a success.

// Every status response goes through reconcile. Rejected snapshots leave the
// attempt as it was and tell you why.
final result = attempt.reconcile(snapshotFromYourAdapter);
if (!result.applied) debugPrint('ignored: ${result.rejection}');
attempt = result.attempt;
PaymentStatusView(
attempt: attempt,
amount: quote.total,
onAction: (action) => host.handle(action), // only attempt.availableActions
);

How the payment attempt works

Components and blocks, captured on Android

Section titled “Components and blocks, captured on Android”

Use single components, follow the patterns, or copy a whole block and wire your own callbacks. Every image is a real capture from the example app.

PaymentTheme is a ThemeExtension. Without it the kit follows your ColorScheme; with it you set colors, radius and amount style for light and dark. Same block, two looks, one package. Theming

Hairline

The default look: one surface, 1 px rules, ink actions.

Merchant Overview block in the default Hairline look: available balance, an unknown-payment notice and a revenue chart on one flat surface separated by thin rules.Merchant Overview block in the default Hairline look: available balance, an unknown-payment notice and a revenue chart on one flat surface separated by thin rules.

Soft

A preset in the example app: tinted page, inset panel, rounder corners, indigo accent.

The same Merchant Overview block in the Soft host preset: an inset panel with rounder corners on a tinted page, an indigo accent and a lighter balance.The same Merchant Overview block in the Soft host preset: an inset panel with rounder corners on a tinted page, an indigo accent and a lighter balance.

The kit never decides a price, a payment result or an identity check. Widgets render the data your backend passes and report what the customer did through callbacks. No network calls, no payment SDK, no router or state manager required.

ConcernRakit UI doesYour backend does
Price, fees, limits and quote expiryRenders the quote you pass. Asks the customer to approve again when the total changes.Calculates prices, fees and limits, and decides when a quote expires.
PIN, OTP or biometric challengeShows the challenge state. Never receives the secret.Runs the challenge through your auth SDK.
Payment status, idempotency and refundsRenders the snapshots you pass and rejects stale ones. Never infers success.Creates and settles payments with your provider, and enforces idempotency.
Polling and recoveryReports what the customer tapped through callbacks. Widgets never poll.Decides when to check status, retry or recover.
KYC decision and document checksShows capture, progress, structured errors and the result.Validates documents and makes the decision.

The full list, including input and consent, is on Host-owned decisions. Optional KYC capture, review and onboarding screens follow the same split: KYC capture.

Accessibility is documented, not implied. Status never relies on color alone, focus is visible, and the captured checkout and status screens reflow at 200% text with the key action still reachable. Accessibility

Rakit UI is new and has no verified production testimonials yet. Each fact below links to where you can check it.

The flow test passed earlier on an iPhone 16 simulator; there are no iOS performance numbers. What was run

Be one of the first teams to try it. Build a checkout in a fresh Flutter app, then tell us what blocked you or what was missing. Try it and send feedback

Does Rakit UI process payments?

No. It is UI only. Your backend and payment provider create, authorize and settle payments, and enforce idempotency. The kit displays the snapshots they return.

Which payment provider or backend does it need?

Any. You map your provider’s responses to the kit’s models, such as PaymentAttempt snapshots, in your own adapter. Host-owned decisions

Which platforms are supported?

iOS (iPhone, iPad) and Android (phones, tablets). Flutter web is used only to preview the docs; desktop is out of scope. Compatibility

What does it cost?

Nothing. The package is MIT licensed and free to use in commercial apps. See the licence.

Is it ready for production?

It is an early 0.9.0 release with no known production users yet. Under Dart’s versioning convention, a 0.x minor release can include breaking changes. Review the code, test it with your backend, and report what you find.

Build your first mobile screen

Install rakit_ui, add the theme and localization, copy a block, then connect its callbacks to your own host.

Questions or stuck setting up?

Write to the maintainer, or open an issue so the answer helps the next team too.