flutter_auto_export 1.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 79

pub package

Flutter Auto Export #

A new Flutter package that allows you to auto export types globally.

Getting Started #

To use auto export feature, you just need to add the @AutoExporter() annotation to your class that you want to be automatically exported in the lib/auto_export.dart file.

Then in your other files, you just need to import the auto_export.dart file to have access to all auto exported files

[1.0.2] - 2020-06-07 #

  • Added first line on auto_export file warning about that is generated code
  • Added example

[1.0.1] - 2020-06-07 #

  • Added simple documentation on readme

[1.0.0] - 2020-06-07 #

  • First version of the package

example/main.dart

import 'auto_export.dart';

void main() {
  final sum = CalculatorSum();
  final sub = CalculatorSub();
  final mult = CalculatorMult();

  print("10 + 1 = ${sum.Sum(10, 1)}");
  print("10 - 1 = ${sub.Sub(10, 1)}");
  print("10 * 1 = ${mult.Mult(10, 1)}");
}

Use this package as a library

1. Depend on it

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


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

We analyzed this package on Jul 11, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14

Analysis suggestions

Package not compatible with SDK flutter

Because it is not compatible with any of the supported runtimes: flutter-native, flutter-web

Package not compatible with runtime flutter-native on android

Because:

  • package:flutter_auto_export/flutter_auto_export.dart that imports:
  • package:flutter_auto_export/src/ExporterGeneratorBuilder.dart that imports:
  • package:source_gen/source_gen.dart that imports:
  • package:source_gen/src/type_checker.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-native on ios

Because:

  • package:flutter_auto_export/flutter_auto_export.dart that imports:
  • package:flutter_auto_export/src/ExporterGeneratorBuilder.dart that imports:
  • package:source_gen/source_gen.dart that imports:
  • package:source_gen/src/type_checker.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-native on linux

Because:

  • package:flutter_auto_export/flutter_auto_export.dart that imports:
  • package:flutter_auto_export/src/ExporterGeneratorBuilder.dart that imports:
  • package:source_gen/source_gen.dart that imports:
  • package:source_gen/src/type_checker.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-native on macos

Because:

  • package:flutter_auto_export/flutter_auto_export.dart that imports:
  • package:flutter_auto_export/src/ExporterGeneratorBuilder.dart that imports:
  • package:source_gen/source_gen.dart that imports:
  • package:source_gen/src/type_checker.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-native on windows

Because:

  • package:flutter_auto_export/flutter_auto_export.dart that imports:
  • package:flutter_auto_export/src/ExporterGeneratorBuilder.dart that imports:
  • package:source_gen/source_gen.dart that imports:
  • package:source_gen/src/type_checker.dart that imports:
  • dart:mirrors

Package not compatible with runtime flutter-web on web

Because:

  • package:flutter_auto_export/flutter_auto_export.dart that imports:
  • package:flutter_auto_export/src/ExportsBuilder.dart that imports:
  • package:build/build.dart that imports:
  • package:build/src/generate/run_post_process_builder.dart that imports:
  • package:build/src/builder/post_process_builder.dart that imports:
  • package:build/src/builder/builder.dart that imports:
  • package:build/src/builder/build_step.dart that imports:
  • package:build/src/asset/reader.dart that imports:
  • package:glob/glob.dart that imports:
  • package:glob/src/list_tree.dart that imports:
  • package:glob/src/io.dart that imports:
  • package:glob/src/io_export.dart that imports:
  • dart:io

Package not compatible with runtime js

Because:

  • package:flutter_auto_export/flutter_auto_export.dart that imports:
  • package:flutter_auto_export/src/ExportsBuilder.dart that imports:
  • package:build/build.dart that imports:
  • package:build/src/generate/run_post_process_builder.dart that imports:
  • package:build/src/builder/post_process_builder.dart that imports:
  • package:build/src/builder/builder.dart that imports:
  • package:build/src/builder/build_step.dart that imports:
  • package:build/src/asset/reader.dart that imports:
  • package:glob/glob.dart that imports:
  • package:glob/src/list_tree.dart that imports:
  • package:glob/src/io.dart that imports:
  • package:glob/src/io_export.dart that imports:
  • dart:io

Package not compatible with runtime native-aot

Because:

  • package:flutter_auto_export/flutter_auto_export.dart that imports:
  • package:flutter_auto_export/src/ExporterGeneratorBuilder.dart that imports:
  • package:source_gen/source_gen.dart that imports:
  • package:source_gen/src/type_checker.dart that imports:
  • dart:mirrors

Health issues and suggestions

Document public APIs. (-1 points)

4 out of 4 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/ExporterGeneratorBuilder.dart. (-0.50 points)

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

line 22 col 7: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

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

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

line 21 col 7: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
analyzer >=0.38.5 <0.40.0 0.39.12
build ^1.1.4 1.3.0
build_resolvers ^1.3.2 1.3.10
glob ^1.2.0 1.2.0
meta ^1.1.0 1.2.2 1.3.0-nullsafety
source_gen ^0.9.4 0.9.6
Transitive dependencies
_fe_analyzer_shared 5.0.0
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.6
graphs 0.2.0
html 0.14.0+3
js 0.6.2
logging 0.11.4
node_interop 1.1.1
node_io 1.1.1
package_config 1.9.3
path 1.7.0
pedantic 1.9.2
pub_semver 1.4.4
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.2.0 1.3.0-nullsafety
watcher 0.9.7+15
yaml 2.2.1