pub package all in one

best practice

The pubspec file

https://dart.dev/tools/pub/pubspec

demo

name: dart_library_package
# name: dart-library-package
description: A dart-library-package for Flutter application. homepage: https://github.com/xgqfrms/dart-library-package # The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
# publish_to: 'none'
# Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.2 environment:
sdk: ">=2.7.0 <3.0.0" dependencies:
# flutter:
# sdk: flutter
async: ^2.0.7
path: ^1.0.0 # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
# cupertino_icons: ^0.1.3 dev_dependencies:
# flutter_test:
# sdk: flutter
test: ^1.3.4 # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # The following section is specific to Flutter.
flutter: # The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
# uses-material-design: true # To add assets to your application, add an assets section, like this:
assets:
- images/icon.png
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware. # For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages # To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages

dart_library_package score

https://pub.dev/packages/dart_library_package/score

0/10 points: Provide a valid pubspec.yaml

The package description is too short.

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.

description: A dart-library-package for Flutter application. full platform support, including `package:dart_library_package/math.dart`, `package:dart_library_package/math_io.dart`, `package:dart_library_package/math_html.dart`

0/10 points: 20% or more of the public API has dartdoc comments

0 out of 7 API elements (0.0 %) have documentation comments.

Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API. Document at least 20% of the public API elements.

Support multiple platforms

10/20 points: Supports 1 of 2 possible platforms (native, js)

Consider supporting multiple platforms:

Package not compatible with runtime js

Because:

package:dart_library_package/math_io.dart that imports:

dart:io

Pass static analysis

20/30 points: code has no errors, warnings, lints, or formatting issues

Found 13 issues. Showing the first 2:

INFO: Unused import: 'dart:io'.

lib/math_io.dart:13:8



13 │ import 'dart:io';

│ ^^^^^^^^^



To reproduce make sure you are using pedantic and run dartanalyzer lib/math_io.dart

lib/math.dart is not formatted according to dartfmt

To format your files run: dartfmt -w .

refs



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


pub package all in one的更多相关文章

  1. Dependabot 开始支持 pub package 版本检测

    今年年初,我们发布了 Flutter 2022 产品路线图,其中「基础设施建设」这部分提到:2022 年 Flutter 团队将增加对供应链的安全的投入,目的是达到符合基础设施 SLSA 4 级别中描 ...

  2. Dart 基础重点截取 Dart 2 20180417

    官网教程 https://www.dartlang.org/guides/language/language-tour dart是一个单线程的语言,没有多线程 Final and const If y ...

  3. CentOS6.8环境下搭建yum网络仓库

    CentOS6.8环境下搭建yum网络仓库 本文利用ftp服务,在CentOS6.8系统下搭建一个yum仓库,然后用另一台虚拟机访问该仓库.并安装程序包 安装ftp服务 查询ftp服务是否安装 [ro ...

  4. 9.Libraries and visibility 库和可见性

    import和liabrary指令可以帮助你创建模块化,可复用的代码.库不仅仅提供API,也是一个私有化单元:库中已下划线(_)开头的类都是对外不可访问的.每个Dart的应用也是一个包,尽管它没有使用 ...

  5. Fedora 26/27/28网易云音乐安装

    信息从 https://www.southcity-oldboy.com/1474.html获取,感谢站长南城旧少年! 以下为前辈网页上的内容 1.安装 RPM Fusion 源 (free): ht ...

  6. Fedora 28 系统基础配置以及常用软件安装方式

    实验说明: 很多人说Linux很难用,很难上手,其实不然,倘若不玩游戏,其实很多发行版Linux都可以成为主力系统,就比如本章要讲的 Fedora 28.本章会从镜像来源.系统安装.基础配置和常用软件 ...

  7. Dart语法学习

    Dart语法学习 目录 参考资料 语言特性 关键字 变量与常量 数据类型 运算符 operators 控制流程语句 异常 Exceptions 函数 Function 类 Class 类-方法 类-抽 ...

  8. Dart 学习

    语言特性 Dart所有的东西都是对象, 即使是数字numbers.函数function.null也都是对象,所有的对象都继承自Object类. Dart动态类型语言, 尽量给变量定义一个类型,会更安全 ...

  9. Dart 2.15 现已发布

    作者 / Michael Thomsen, Dart & Flutter Product Manager, Google 我们已经正式发布了 Dart SDK 的 2.15 版本,该版本新增了 ...

随机推荐

  1. 琐碎的想法(三)对Java的批评的看法

    编写本文的目的 在大环境下,Java是一个饱受争议的语言,一方面在工程上它的流行程度非常高:另一方面,越是资深的软件工程师就越容易对这个语言感到不满. 在这种情况下,博主希望每一个Java程序员能够耐 ...

  2. SpringBoot配置文件基础部分说明

    SpringBoot-yml文件配置说明 友情提示:有一些代码中有乱码,请脑补删除,适合快速入门 #开启spring的Bebug模式,可以查看有哪些自动配置生效 #debug=true #开启热启动, ...

  3. Nagle's algorithm 封包 网络游戏协议封包需注意点 封包挂

    w41字节的数据包只有1字节的可用信息.以减少数据包发送量来提高TCP/IP网络性能. https://en.wikipedia.org/wiki/Nagle's_algorithm https:// ...

  4. session和cookie自动登录机制

    cookie的存储 cookie是浏览器支持的一种本地存储方式.以dict,键值对方式存储. {"sessionkey": "123"} 浏览器会自动对于它进行 ...

  5. Opencart 后台getshell

    朋友实战中遇到的,帮忙看后台getshell. 修改日志文件,但是奈何找不到warning这类等级的错误,没办法控制写入的内容,通过sql报错能写入了,但是尖括号却会被实体,使用16进制一样会实体.. ...

  6. nginx、apache比较

    Nginx:异步,多个连接(万级别)可以对应一个进程 轻量级,采用 C 进行编写,同样的 web 服务,会占用更少的内存及资源 抗并发,nginx 以 epoll and kqueue 作为开发模型, ...

  7. windows下hash抓取的几种方式

    前提:在渗透测试过程中,对于windows系统的机器渗透需要注意hash的获取,其中hash分为LM-HASH与NTLM-HASH,在windows系统中,hash的默认存储位置为: C:\Windo ...

  8. 将Windows7系统改造为Linux(Centos7)系统

    作为一个程序员,居然一次都没有安装过系统,果断被嘲笑了一番. 没办法,突然BOSS分配任务,将一台服务器的电脑从windos7改为Linux系统,一脸懵逼. 下面记录一下改造过程. 将Windows7 ...

  9. js创建javaMap

    /** * Simple Map * var m = new Map(); * m.put('key','value'); * var v_otherMap = v_m.toMapString();* ...

  10. DolphinScheduler1.3.2源码分析(一)看源码前先把疑问列出来

    1.谈谈如何看源码   个人觉得拿到一个开源的项目,首先要先使用一下. 如果是有页面的那种,可以先把测试平台部署起来,然后到处随意点点,然后用一下最基础的功能,走一遍基础的使用流程.不用担心会把系统弄 ...