tobias 0.1.5

  • Example
  • Installing
  • Versions
  • 88

logo pub package


QQ Group:892398530。

What's Tobias #

Tobias is a flutter plugin for AliPaySDK.

Getting Started #

I highly recommend that you read this article before using tobias. Tobias helps you to do something but not all. For example, you have to configure your URL Scheme on iOS.

Payment #

It's simple,pass Tobias your order info from server :

import 'package:tobias/tobias.dart' as tobias;;

The result is map contains results from AliPay.The result also contains an external filed named platform which means the result is from iOS or android. Result sample:

result: partner="2088411752388544"&seller_id=""&out_trade_no="180926084213001"&subject="test pay"&total_fee="0.01"&notify_url=""&service=""&payment_type="1"&_input_charset="utf-8"&it_b_pay="30m"&return_url=""&success="true"&sign_type="RSA"&sign="nCZ8MDhsNvYNAbrLZJZ2VUy6vydgAp+JCq1aQo6ORDYtI9zwtnja3qNGQNiDJCuktoIj7fSTM487XhjPDqnOreZjIA1GJpxu9D1I3nMXIn1M7DfZ0noDwXcYZ438/jbYac7g8mhpwdKGweLCAni9mO3Y6q3iBFkox8i9PcsGxJY=",
resultStatus: 9000,
 memo: ,

Auth #

    tobias.auth("your auth str");

Check AliPay Installation #

    var result = await tobias.isAliPayInstalled();

In order to handle the result of payment, you have to add the following code in your AppDelegate.m file:

#import <tobias/TobiasPlugin.h>

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{

    return  [TobiasPlugin handleOpenURL:url];

// NOTE: 9.0以后使用新API接口
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options{

    return  [TobiasPlugin handleOpenURL:url];

NOTE:Tobias use pay_V2.

For iOS,yout have to add url schema named alipay. On Xcode GUI: url_schema

in your info.plist:


You can also call tobias.version() which returns a map contains version and platform.

Buy the writer a cup of coffee。

Subscribe Us On WeChat #



Copyright 2018 OpenFlutter Project

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements.  See the NOTICE file distributed with this work for
additional information regarding copyright ownership.  The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License.  You may obtain a copy of
the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
License for the specific language governing permissions and limitations under
the License.

0.1.5 #

  • 支持检查客户端是否安装了支付宝App。

0.1.4 #

  • Fix #18

0.1.3 #

  • Android支持沙箱了

0.1.2 #

  • 修复在ios上调用登录报错的问题

0.1.1 #

  • 修复ios上通过webview登录无回调的问题

0.1.0 #

  • 支持支付宝登录了。

0.0.8 #

  • kotlin升级至1.3.21
  • kotlinx-coroutines升级至1.1.1
  • AliPaySDK升级至15.6.0

0.0.7 #

  • android构建工具升级
  • AliPaySDK升级至15.5.9

0.0.6 #

  • android构建工具升级
  • AliPaySDK升级至15.5.7

0.0.5 #

  • build.gradle升级到了3.2.0
  • kotlin升级到了1.2.71

0.0.4 #

  • 修复iOS无回调问题

0.0.3 #

  • 删除AliPayModel

0.0.2 #

  • 修复iOS支付bug

0.0.1 #

  • first released.


tobias_example #

Demonstrates how to use the tobias plugin.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

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

  tobias: ^0.1.5

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:tobias/tobias.dart';
Version Uploaded Documentation Archive
0.1.5 Jun 4, 2019 Go to the documentation of tobias 0.1.5 Download tobias 0.1.5 archive
0.1.4 May 28, 2019 Go to the documentation of tobias 0.1.4 Download tobias 0.1.4 archive
0.1.3 May 23, 2019 Go to the documentation of tobias 0.1.3 Download tobias 0.1.3 archive
0.1.2 Apr 29, 2019 Go to the documentation of tobias 0.1.2 Download tobias 0.1.2 archive
0.1.1 Apr 1, 2019 Go to the documentation of tobias 0.1.1 Download tobias 0.1.1 archive
0.1.0 Mar 1, 2019 Go to the documentation of tobias 0.1.0 Download tobias 0.1.0 archive
0.0.8 Feb 28, 2019 Go to the documentation of tobias 0.0.8 Download tobias 0.0.8 archive
0.0.7 Jan 17, 2019 Go to the documentation of tobias 0.0.7 Download tobias 0.0.7 archive
0.0.6 Nov 7, 2018 Go to the documentation of tobias 0.0.6 Download tobias 0.0.6 archive
0.0.5 Oct 10, 2018 Go to the documentation of tobias 0.0.5 Download tobias 0.0.5 archive

All 14 versions...

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 Jun 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.2
  • pana: 0.12.18
  • Flutter: 1.5.4-hotfix.2


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/src/tobias_iml.dart. (-0.50 points)

Analysis of lib/src/tobias_iml.dart reported 1 hint:

line 2 col 8: Unused import: 'dart:io'.

Maintenance issues and suggestions

Support latest dependencies. (-5 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.58.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8