nautilus 0.0.7

  • Readme
  • Changelog
  • Example
  • Installing
  • 68

Nautilus pub package #



Nautilus原本是在一位热心网友的赞助下开发的,现应该网友要求将其开源。在此特别感谢这位朋友。 欢迎加入QQ群:892398530共同交流。

使用需知 #

同样地,我建议去下载下百川电商SDK Demo并阅读相关文档,并参考官网文档,尽管官网的文档很坑。因为很多内容我不会在这里做赘述。 也欢迎各位朋友PR。

初始化 #

 import 'package:nautilus/nautilus.dart' as nautilus;
 var  result = await nautilus.initTradeAsync();

淘宝授权登录 #


var result = await nautilus.login();


 import 'package:nautilus/nautilus.dart' as nautilus;
 nautilus.User user = await nautilus.getUser();


 import 'package:nautilus/nautilus.dart' as nautilus;
 bool isLogin = await nautilus.isLogin();

打开淘宝详情: #

 import 'package:nautilus/nautilus.dart' as nautilus;
 nautilus.openItemDetail(itemID: "41576306115");

打开淘宝URL #

 import 'package:nautilus/nautilus.dart' as nautilus;
 nautilus.openUrl(pageUrl: "");

更多功能敬请期待 #

捐助 #



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.0.7 #

  • ios 不用重写AppDelegate了

0.0.6 #

  • 修复Bug。

0.0.5 #

  • 字段名变更。
  • 修复Bug。

0.0.4 #

  • 现在User类的信息更全了。

0.0.3 #

  • 移除android初始化失败toast。

0.0.2 #

  • 修复android初始化失败的问题。

0.0.1 #

  • 首个版本发布.


import 'package:flutter/material.dart';
import 'open_page.dart';
import 'login_page.dart';
import 'package:nautilus/nautilus.dart' as nautilus;
void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  _MyAppState createState() => _MyAppState();

class _MyAppState extends State<MyApp> {

  void initState() {

  Widget build(BuildContext context) {
    return MaterialApp(
      routes:<String, WidgetBuilder>{
        "Login":(context)=> LoginPage(),
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),

class HomeBody extends StatefulWidget {
  HomeBodyState createState() {
    return new HomeBodyState();

class HomeBodyState extends State<HomeBody> {

  String _initTradeServiceResult="初始化结果:";
  void initState() {

  void initTradeService(){
    nautilus.initTradeAsync(debuggable: false).then((data){
      setState(() {
        _initTradeServiceResult ="初始化结果:${data.isSuccessful}";
  Widget build(BuildContext context) {
    return  ListView(
      children: <Widget>[
          padding: const EdgeInsets.all(8.0),
          child: new Text(_initTradeServiceResult)),
          padding: const EdgeInsets.all(8.0),
          child: new OutlineButton(
              onPressed: () {
              child: const Text("Login with Taobao")),
          padding: const EdgeInsets.all(8.0),
          child: new OutlineButton(
              onPressed: () {
              child: const Text("Open Page")),

Use this package as a library

1. Depend on it

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

  nautilus: ^0.0.7

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:nautilus/nautilus.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 Jul 3, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:nautilus/nautilus.dart] that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because of import path [package:nautilus/nautilus.dart] that declares support for platforms: android, ios

Package does not support Flutter platform web

Because of import path [package:nautilus/nautilus.dart] that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because of import path [package:nautilus/nautilus.dart] that declares support for platforms: android, ios

Package not compatible with SDK dart

because of import path [nautilus] that is in a package requiring null.

Health suggestions

Format lib/nautilus.dart.

Run flutter format to format lib/nautilus.dart.

Format lib/src/login/login_service.dart.

Run flutter format to format lib/src/login/login_service.dart.

Format lib/src/nautilus_iml.dart.

Run flutter format to format lib/src/nautilus_iml.dart.

Maintenance issues and suggestions

The description contains too many non-ASCII characters. (-20 points)

The site uses English as its primary language. The value of the description field in your package's pubspec.yaml field should primarily contain characters used in English.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Package is getting outdated. (-1.64 points)

The package was last published 53 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies