powerflutter_code_generation 0.1.1

powerflutter_code_generation #

Powerflutter Code Generation Library

Getting Started #

  1. Add powerflutter_code_generation to your dev_dependencies.
  2. Run flutter packages pub run build_runner watch in the terminal of the project
  3. Add Annotations to your code like @powermodel and the part 'filename.g.dart'; to the top of the file

Annotations #

@powermodel: Used on a private (start it with underscore _ ) model class a public class will be generated that inherits the private class and overrides every field with a setter and getter needed for Powerflutter databinding.

@ModelName("test") Used on a field of a @powermodel class sets the Name used in serialization etc. for this field

Example #

In the Powerflutter Examples we use the following simple model class:

import 'package:powerflutter/powerflutter.dart';

part 'counter.g.dart';

@powermodel
class _CounterModel with PowerModel {
  int counter = 0;
}

This will generate a CounterModel Class that has the Getters and Setters needed for Poweflutter.

[0.1.0]

inital release

example/README.md

Getting Started #

Examples and gettings Started Guides can be found in the Powerflutter Examples Repo.

Use this package as a library

1. Depend on it

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


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

We analyzed this package on Aug 19, 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/codegeneration/builder.dart.

Run flutter format to format lib/codegeneration/builder.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
powerflutter ^0.1.0 0.1.1+1
source_gen ^0.9.0 0.9.4+3
Transitive dependencies
analyzer 0.37.1+1 0.38.0
args 1.5.2
async 2.3.0
build 1.1.6
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.10
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
shared_preferences 0.5.3+4
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
uuid 2.0.2
vector_math 2.0.8
watcher 0.9.7+12
yaml 2.1.16
Dev dependencies
build_runner ^1.0.0
flutter_test