trident_generator 1.0.2

  • Readme
  • Changelog
  • Installing
  • 30

trident_generator #

trident_generator can generate restful api by simple ways, use with trident, a example is [telebot](https://pub .dev/packages/telebot).

Part Example from telebot #

abstract class TelegramBotClient {
  Future<List<Update>> getUpdates(
      {@Query("offset") int offset,
      @Query("limit") int limit,
      @Query("timeout") int timeout,
      @Query("allowed_updates") List<String> allowedUpdates});

  Future<bool> setWebhook(
      {@Query("url") @required String url,
      @Query("certificate") File certificate,
      @Query("max_connections") int maxConnections,
      @Query("allowed_updates") List<String> allowedUpdates});

  Future<bool> deleteWebhook();

  Future<WebhookInfo> getWebhookInfo();

  Future<User> getMe();

1.0.0 #

  • Initial version, created by Stagehand

1.0.1 #

  • Bug fixed

1.0.1+1 #

  • Bug fixed

Use this package as a library

1. Depend on it

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

  trident_generator: ^1.0.2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:trident_generator/trident_generator.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 14, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.15

Health issues and suggestions

Fix lib/src/annotation_checker.dart. (-25.38 points)

Analysis of lib/src/annotation_checker.dart failed with 1 error, 1 hint:

line 8 col 8: Target of URI doesn't exist: 'package:useful_extension/useful_extension.dart'.

line 1 col 8: Unused import: 'dart:async'.

Document public APIs. (-1 points)

3 out of 3 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.

Fix lib/src/info/method_info.dart. (-1.49 points)

Analysis of lib/src/info/method_info.dart reported 3 hints:

line 61 col 9: DO use curly braces for all flow control structures.

line 167 col 11: DO use curly braces for all flow control structures.

line 169 col 11: DO use curly braces for all flow control structures.

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

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

line 22 col 22: Avoid using null in if null operators.

Fix additional 8 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/extensions/dart_object_extension.dart (Run dartfmt to format lib/src/extensions/dart_object_extension.dart.)
  • lib/src/extensions/extensions.dart (Run dartfmt to format lib/src/extensions/extensions.dart.)
  • lib/src/extensions/method_element_extension.dart (Run dartfmt to format lib/src/extensions/method_element_extension.dart.)
  • lib/src/extensions/parameter_element_extension.dart (Run dartfmt to format lib/src/extensions/parameter_element_extension.dart.)
  • lib/src/file_generator.dart (Run dartfmt to format lib/src/file_generator.dart.)
  • lib/src/info/info.dart (Run dartfmt to format lib/src/info/info.dart.)
  • lib/src/info/param_info/param_info.dart (Run dartfmt to format lib/src/info/param_info/param_info.dart.)
  • lib/trident_generator.dart (Run dartfmt to format lib/trident_generator.dart.)

Maintenance issues and suggestions

No valid SDK. (-20 points)

The analysis could not detect a valid SDK that can use this package.

Support latest dependencies. (-10 points)

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

Fix analysis_options.yaml.

The analyzer can't parse analysis_options.yaml.

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 trident_generator.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
analyzer ^0.38.5 0.38.5 0.39.13
build ^1.2.1 1.3.0
dartpoet ^1.0.6+3 1.0.6+3
dio ^3.0.9 3.0.9
json_annotation ^3.0.0 3.0.1
named_mode ^1.0.2+1 1.0.2+1
source_gen ^0.9.4+5 0.9.4+6 0.9.6
trident ^1.0.0 1.0.0
xfile ^1.0.0 1.1.0
Transitive dependencies
args 1.6.0
async 2.4.2
charcode 1.1.3
collection 1.14.13 1.15.0-nullsafety
convert 2.1.1
crypto 2.1.5
csslib 0.16.1
dart_style 1.3.3 1.3.6
front_end 0.1.27 0.1.29
glob 1.2.0
html 0.14.0+3
http_parser 3.1.4
js 0.6.2
kernel 0.3.27 0.3.29
logging 0.11.4
meta 1.2.2 1.3.0-nullsafety
node_interop 1.1.1
node_io 1.1.1
package_config 1.9.3
path 1.7.0
pub_semver 1.4.4
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
type_token 1.0.4
typed_data 1.2.0 1.3.0-nullsafety
watcher 0.9.7+15
yaml 2.2.1
Dev dependencies
build_runner ^1.7.1
json_serializable ^3.2.2
pedantic ^1.8.0 1.9.2
useful_extension ^1.0.0