icapps_generator 0.2.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 51

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.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/README.md

Example for the icapps generator #

Run package with Flutter #

flutter packages pub run icapps_generator your_screen_name

Run package with Dart #

pub run icapps_generator your_screen_name

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

Use this package as a library

1. Depend on it

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


dependencies:
  icapps_generator: ^0.2.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

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

Popularity:
Describes how popular the package is relative to other packages. [more]
2
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]
51
Learn more about scoring.

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

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
path ^1.6.2 1.6.4
yaml ^2.1.15 2.2.0
Transitive dependencies
charcode 1.1.2
collection 1.14.12
meta 1.1.8
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
Dev dependencies
test ^1.0.0