pockyt_pay 0.5.0 copy "pockyt_pay: ^0.5.0" to clipboard
pockyt_pay: ^0.5.0 copied to clipboard

A flutter payment plugin that supports both WeChat Pay and Alipay

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_sdk_example/pages/alipay_pay_page.dart';
import 'package:flutter_sdk_example/pages/wechat_alipay_page.dart';
import 'pages/wechat_pay_page.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
        home: HomePage()
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Pockyt Payment Example'),
      ),
      body: ListView(
        padding: const EdgeInsets.all(20),
        children: [
          OutlinedButton(onPressed: () {
            Navigator.push(context, MaterialPageRoute(builder: (context) => const WechatPayPage()));
          },
              child: const Text('Wechat Pay')),
          const SizedBox(height: 10),
          OutlinedButton(
            onPressed: () {
              Navigator.push(context, MaterialPageRoute(builder: (context) => const AlipayPage()));
            },
            child: const Text('Alipay'),
          ),
          const SizedBox(height: 10),
          OutlinedButton(
            onPressed: () {
              Navigator.push(context, MaterialPageRoute(builder: (context) => const WechatAliPayPage()));
            },
            child: const Text('Wechat Pay & Alipay'),
          ),
        ],
      ),
    );
  }
}
1
likes
0
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter payment plugin that supports both WeChat Pay and Alipay

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on pockyt_pay

Packages that implement pockyt_pay