打印/下载
配置
案例

支付宝(iOS)

flutter/ios/Runner/Info.plist

    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>alipay</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>tobiasexample</string>
            </array>
        </dict>
    </array>

微信(iOS)

flutter/ios/Runner

    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>weixin</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>微信应用ID[wx0****967]</string>
            </array>
        </dict>
    </array>
    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>weixin</string>
        <string>weixinULAPI</string>
        <string>iosamap</string>
    </array>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>
import 'package:flutter/material.dart';
import 'package:webmis/library/plus/pay.dart';

class Demo extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => DemoState();
}
class DemoState extends State<Demo> {

  Map<String,dynamic> _location;
  var _mapController;

  /* 构造函数 */
  @override
  void initState() {
    super.initState();
  }

  /* 销毁 */
  @override
  void dispose(){
    super.dispose();
    MapGeolocation.dispose();
  }

  /* Widget */
  @override
  // ignore: must_call_super
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          GestureDetector(
            child: Container(
              height: 30,
              child: Center(
                child: Text('支付宝'),
              ),
            ),
            onTap: (){
              Pay.alipay('https://webmis.vip/api',{}).then((res){
                setState(()=>_payRes=res.toString());
              }).catchError((e){
                setState(()=>_payRes=e.toString());
              });
            },
          ),
          GestureDetector(
            child: Container(
              height: 30,
              child: Center(
                child: Text('微信'),
              ),
            ),
            onTap: (){
              Pay.wxapy('https://webmis.vip/api',{}).then((res){
                setState(()=>_payRes=res.toString());
              }).catchError((e){
                setState(()=>_payRes=e.toString());
              });
            },
          ),
          Text(_payRes),
        ],
      ),
    );
  }

}
{{copy}}