builder_static_text 0.0.1

builder_static_text #

A simple way to add static text to generated source files (hello.g.dart).

The only reason for it's existence is that

  1. json_serialize does not produce code valid for strong mode implicity-dynamic: false https://github.com/dart-lang/json_serializable/issues/247
  2. analysis_options.yml exclude does not work correctly https://github.com/dart-lang/linter/issues/320 https://github.com/dart-lang/sdk/issues/34069
  3. source_gen does not provide a header/footer option on it's own https://github.com/dart-lang/source_gen/issues/370

Getting Started #

Add to pubspec.yaml

dev_dependency:
  builder_static_text: ^0.0.1

Create build.yaml and configure the builder:

targets:
  $default:
    builders:
      builder_static_text|static_text:
        generate_for:
          - lib/**/*.dart
        options:
          content: '// ignore_for_file: strong_mode_implicit_dynamic_parameter'

[0.0.1] - 2019-05-13 Initial release

  • Trivial implementation :)

Use this package as a library

1. Depend on it

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


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

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

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/static_text_generator.dart.

Run flutter format to format lib/static_text_generator.dart.

Maintenance suggestions

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 builder_static_text.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
build ^1.1.4 1.1.6
flutter 0.0.0
source_gen ^0.9.4+2 0.9.4+3
Transitive dependencies
analyzer 0.37.1+1 0.38.0
args 1.5.2
async 2.3.0
charcode 1.1.2
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.1+1
csslib 0.16.1
dart_style 1.2.9
front_end 0.1.21+1 0.1.22
glob 1.1.7
html 0.14.0+2
kernel 0.3.21+1 0.3.22
logging 0.11.3+2
meta 1.1.6 1.1.7
package_config 1.1.0
path 1.6.4
pedantic 1.8.0+1
pub_semver 1.4.2
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
watcher 0.9.7+12
yaml 2.1.16
Dev dependencies
flutter_test