cash_gl_plugin 1.0.0 cash_gl_plugin: ^1.0.0 copied to clipboard
A Flutter plugin for cash_gl, created by Chongyu Yuan.
import 'dart:async';
import 'package:cash_gl_plugin/cash_gl_plugin.dart';
import 'package:flutter/material.dart';
Future<void> main() async {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
RaisedButton(
child: Text("打开payWithMpurse"),
onPressed: () {
_payWithMpurse("25", "656565656565", "59128959686",
"mp12769", "1578361012213", "158166@mpause");
}),
],
)),
);
}
_payWithMpurse(String amount, String txnId, String mpQueryId,
String partnerId, String createTime, String payerVa) async {
String result = await new CashGlPlugin().payWithMpurse(
amount, txnId, mpQueryId, partnerId, createTime, payerVa);
// setState
}
}