dgg_flutter_common_utils 0.0.1

  • Readme
  • Changelog
  • Installing
  • new40

dgg_flutter_common_utils (Dart常用工具类库) #

Dart常用工具类库。包含日期,正则,倒计时,定时任务,时间轴,屏幕工具等工具类。如果你有好的工具类欢迎添加进来. #

使用方式: #

使用方式:

dependencies:
  dgg_flutter_common_utils: ^0.0.1 
      git: 
        url: http://172.16.0.25/MobileFrameworks/Flutter-Modules/dgg_flutter_common_utils.git
        version: ^0.0.1

常用工具类 #

1、TimelineUtil : 时间轴. 2、TimerUtil : 倒计时,定时任务. 3、MoneyUtil : 精确转换,元转分,分转元,支持格式输出. 4、LogUtil : 简单封装打印日志. 5、DateUtil : 日期转换格式化输出. 6、RegexUtil : 正则验证手机号,身份证,邮箱等等. 7、NumUtil : 保留x位小数, 精确加、减、乘、除, 防止精度丢失. 8、ObjectUtil : 判断对象是否为空(String List Map),判断两个List是否相等. 9、EnDecodeUtil : md5加密,Base64加/解密. 10、TextUtil : 银行卡号每隔4位加空格,每隔3三位加逗号,隐藏手机号等等. 11、ScreenUtil : 屏幕工具类.

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.

Use this package as a library

1. Depend on it

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


dependencies:
  dgg_flutter_common_utils: ^0.0.1

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:dgg_flutter_common_utils/dgg_flutter_common_utils.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
92
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
40
Learn more about scoring.

We analyzed this package on Dec 3, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/src/date_util.dart. (-7.71 points)

Analysis of lib/src/date_util.dart reported 16 hints, including:

line 30 col 17: Name non-constant identifiers using lowerCamelCase.

line 31 col 17: Name non-constant identifiers using lowerCamelCase.

line 32 col 17: Name non-constant identifiers using lowerCamelCase.

line 33 col 17: Name non-constant identifiers using lowerCamelCase.

line 34 col 17: Name non-constant identifiers using lowerCamelCase.

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

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

line 9 col 17: Name non-constant identifiers using lowerCamelCase.

Format lib/src/money_util.dart.

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

Maintenance suggestions

The package description is too short. (-20 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.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and dgg_flutter_common_utils.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
convert ^2.1.1 2.1.1
crypto >=2.0.6 <3.0.0 2.1.3
decimal >=0.3.1 <1.0.0 0.3.5
flutter 0.0.0
Transitive dependencies
charcode 1.1.2
collection 1.14.11 1.14.12
meta 1.1.7 1.1.8
rational 0.3.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test