flutter_h5pay 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 57

Flutter H5Pay #

pub package

A Flutter plugin for h5pay(Support WeChat and Alipay) #

Usage #

Add flutter_h5pay as a dependency in your pubspec.yaml file.

    flutter_h5pay: ^0.1.0
import 'package:flutter_h5pay/h5pay.dart';

//wrap you widget with H5PayWidget
//call the pay method to invoke the payment app

          refererScheme: "www.xx.com://",
          builder: (ctx, controller) {
            return FlatButton(
                onPressed: () {
                  controller.pay(getPayUrl(), jumpPayResultCallback: (p) {
                    print("jump pay app result ->$p");
                child: Text("pay"));

iOS #

Opt-in to the embedded views preview by adding a boolean property to the app's Info.plist file with the key io.flutter.embedded_views_preview and the value YES.

Notice #

When payment completed or cancelled,on IOS, if need to return to the App,you must add target URL Types into the Info.plist file。

For Exmalpe. If you referer(申请H5支付时的授权域名) is http://www.xx.com In Android you can set this referer. In iOS you should set like this www.xx.com:\\,and add a URL Schemes of www.xx.com into the Info.plist file.Please refer to this article for more details.

0.1.0 #

  • A flutter plugin for h5pay(support WeChat and Alipay)


flutter_h5pay_example #

Demonstrates how to use the flutter_h5pay plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_h5pay: ^0.1.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_h5pay/flutter_h5pay.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 25, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Maintenance suggestions

The package description is too short. (-6 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
url_launcher ^5.0.3 5.4.1
webview_flutter ^0.3.15+1 0.3.19+5
Transitive dependencies
collection 1.14.11 1.14.12
flutter_web_plugins 0.0.0
meta 1.1.8
plugin_platform_interface 1.0.1
sky_engine 0.0.99
typed_data 1.1.6
url_launcher_macos 0.0.1+2
url_launcher_platform_interface 1.0.5
url_launcher_web 0.1.0+2
vector_math 2.0.8
Dev dependencies