icapps_generator 0.3.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 61

flutter icapps generator #

A dart package to automaticly generate new code when creating a new screen. This package should be used in combination with the icapps template

pub package

This repo contains an example how to use this package.

Packages used:

  • provider
  • kiwi
  • icapps_generator

Setup #

Add dependency to pubspec #

pub package

dev-dependencies:
  icapps_generator: <latest-version>

Run package with Flutter #

flutter packages pub run icapps_generator your_screen_name

Run package with Dart #

pub run icapps_generator your_screen_name

Run with extra options #

Do not add your newly generated screen to the MainNavigatorWidget

--no-nav

Do not regenerate the kiwi dependency tree

--no-kiwi

Result #

Code will be generated:

  • Screen
  • ViewModel
  • Add @Register.factory to the injector file
  • Add code to make sure you can navigate to your new screen in the MainNavigatorWidget
  • Generate the dependecy tree

Working on mac? #

add this to you .bash_profile

fluttergenerator(){
 flutter packages pub run icapps_generator $1
}

now you can use the icapps generator with a single command.

fluttergenerator your_screen_name

Changelog #

[0.3.0] - 2020-01-08 #

Fixed #

  • #14 where provider changed builder to create

[0.2.1] - 2019-10-21 #

Fixed #

  • #12 crash when no arguments were given

[0.2.0] - 2019-10-21 #

Added #

  • Option to skip the main navigator update --no-nav
  • Option to skip the kiwi dependency tree update --no-kiwi

Fixed #

  • #2 widgets import
  • #3 fixed a bug with pushNamedReplacement instead of pushNamed
  • #4 use the KiwiContainer instead

[0.1.0] - 2019-09-18 #

Fixed #

-Fixed a bug where viewmodels and screens were used for imports instead of viewmodel, screen

[0.0.2] - 2019-09-18 #

Fixed #

-Fixed some pub.dev warnings for maintenance

[0.0.1] - 2019-09-18 #

Added #

-Initial release

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:icapps_generator_example/app.dart';

Future<void> main() async {
  runApp(MyApp());
}

Use this package as a library

1. Depend on it

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


dependencies:
  icapps_generator: ^0.3.0

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.

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]
90
Overall:
Weighted score of the above. [more]
61
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.6

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

exitCode: 255 stdout: parsing /dart-sdk/lib/async/async.dart... parsing /dart-sdk/lib/collection/collection.dart... parsing /dart-sdk/lib/internal/internal.dart... parsing /dart-sdk/lib/convert/convert.dart... parsing /dart-sdk/lib/typed_data/typed_data.dart... parsing /dart-sdk/lib/core/core.dart... parsing /dart-sdk/lib/math/math.dart... parsing /dart-sdk/lib/developer/developer.dart... parsing /dart-sdk/lib/isolate/isolate.dart... parsing /dart-sdk/lib/ffi/ffi.dart... parsing /dart-sdk/lib/html/dart2js/html_dart2js.dart... parsing /dart-sdk/lib/html/html_common/html_common_dart2js.dart... parsing /dart-sdk/lib/web_gl/dart2js/web_gl_dart2js.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/native_typed_data.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/interceptors.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/shared/embedded_names.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/js_helper.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/foreign_helper.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/js_names.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/rti.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/shared/recipe_syntax.dart... parsing /dart-sdk/lib/js_util/dart2js/js_util_dart2js.dart... parsing /dart-sdk/lib/html/html_common/metadata.dart... parsing /dart-sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart... parsing /dart-sdk/lib/svg/dart2js/svg_dart2js.dart... parsing /dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart... parsing /dart-sdk/lib/web_sql/dart2js/web_sql_dart2js.dart... parsing /dart-sdk/lib/_http/http.dart... parsing /dart-sdk/lib/io/io.dart... parsing /dart-sdk/lib/js/dart2js/js_dart2js.dart... parsing /dart-sdk/lib/js/_js.dart... parsing /dart-sdk/lib/mirrors/mirrors.dart... parsing /dart-sdk/lib/html/dartium/nativewrappers.dart... parsing /dart-sdk/lib/cli/cli.dart... parsing /dart-sdk/lib/wasm/wasm.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/js_primitives.dart... parsing /dart-sdk/lib/_internal/js_runtime/lib/shared/async_await_error_codes.dart... Initialized dartdoc with 37 libraries in 29.3 seconds documenting icapps_generator Validating docs... no issues found Documented 0 public libraries in 1.4 seconds stderr: Documenting icapps_generator... Unhandled exception: dartdoc could not find any libraries to document #0 Dartdoc.generateDocs (package:dartdoc/dartdoc.dart:196:7)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
path ^1.6.4 1.6.4
yaml ^2.2.0 2.2.0
Transitive dependencies
charcode 1.1.3
collection 1.14.12
meta 1.1.8
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
Dev dependencies
test ^1.9.4