paysheet 2.0.0+4 copy "paysheet: ^2.0.0+4" to clipboard
paysheet: ^2.0.0+4 copied to clipboard

A lightweight, styling-only paysheet UI for Flutter.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:paysheet/paysheet.dart';

void main() => runApp(ExampleApp());

class ExampleApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Paysheet Example',
      home: Scaffold(
        appBar: AppBar(title: Text('Paysheet Example')),
        body: Center(
          child: ElevatedButton(
            child: Text('Open Paysheet'),
            onPressed: () async {
              await Paysheet.instance.present(
                context,
                method: 'card',
                amount: '9.99',
                onPay: () async {
                  // Example: app builders should call their server or SDK here.
                  // This example simply waits for a short duration then returns.
                  await Future.delayed(Duration(seconds: 1));
                },
                uiAdjust: UIAdjust(u: [
                  Padding(
                    padding: const EdgeInsets.symmetric(vertical: 8.0),
                    child: Container(
                      padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 6.0),
                      decoration: BoxDecoration(
                        color: Colors.white,
                        borderRadius: BorderRadius.circular(8.0),
                        boxShadow: const [],
                      ),
                      child: Row(
                        children: [
                          Expanded(
                            child: TextField(
                              decoration: const InputDecoration(
                                isDense: true,
                                border: InputBorder.none,
                                hintText: 'Card number',
                              ),
                              keyboardType: TextInputType.number,
                            ),
                          ),
                          const SizedBox(width: 8),
                          SizedBox(
                            width: 80,
                            child: TextField(
                              decoration: const InputDecoration(
                                isDense: true,
                                border: InputBorder.none,
                                hintText: 'MM/YY',
                              ),
                              keyboardType: TextInputType.datetime,
                            ),
                          ),
                          const SizedBox(width: 8),
                          SizedBox(
                            width: 70,
                            child: TextField(
                              decoration: const InputDecoration(
                                isDense: true,
                                border: InputBorder.none,
                                hintText: 'CVV',
                              ),
                              keyboardType: TextInputType.number,
                              obscureText: true,
                            ),
                          ),
                        ],
                      ),
                    ),
                  ),
                ]),
              );
            },
          ),
        ),
      ),
    );
  }
}
0
likes
160
points
98
downloads

Publisher

verified publisherthelearmondcorporation.com

Weekly Downloads

A lightweight, styling-only paysheet UI for Flutter.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

cupertino_icons, flutter

More

Packages that depend on paysheet