thyi 1.0.8

  • Readme
  • Changelog
  • Installing
  • 65

How to use #

  • First define a bean class
class User {
    var username = "";
    var nickname = "";
  • Add the json_serializable dependency The json_serializble usage please see it's doc. And then add JsonSerialzble to User class
class User {
    var username = "";
    var nickname = "";
  • Then define the Api class wich define your api interface. Example api.dart.
/// the api.dart file
class API {
  Future<User> getUser(@PARAM("id") int id);
  • Run flutter pub run build_runner build to generate api impl, by generate the api_thyi.dart file.

  • New the api

/// the API_thyiImpl is the generate class(in api_thyi.dart file).
var api = new API_thyiImpl(Thyi(rootUrl));

1.0.8 #

Can use.

Use this package as a library

1. Depend on it

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

  thyi: ^1.0.8

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or 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:thyi/thyi.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 16, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health issues and suggestions

Document public APIs. (-0.19 points)

35 out of 36 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/src/annotations.dart.

Run dartfmt to format lib/src/annotations.dart.

Format lib/src/thyi.dart.

Run dartfmt to format lib/src/thyi.dart.

Format lib/src/util/util_log.dart.

Run dartfmt to format lib/src/util/util_log.dart.

Format lib/thyi.dart.

Run dartfmt to format lib/thyi.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 thyi.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.5.0 <3.0.0
cookie_jar ^1.0.1 1.0.1
dio ^3.0.7 3.0.8
dio_cookie_manager ^1.0.0 1.0.0
Transitive dependencies
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
test any