slidy 0.2.1

Para ver em Português clique aqui

Slidy #

This CLI consists of a way to assemble your project structured by modules, pages, repositories, widgets always following the standards of good practices that has been applied by the community flutter in bigger and more structured projects. It also provides the libraries manager (libs or pubs) with it you can install multiple libraries with just one command line and even remove and update.

IMPORTANT! This project is under development. #

We're excited to deliver slidy to the community, but it's still a package that's developing and may show some weird behavior. Use with caution. To speed up and help with development, cooperate by putting your problems and suggestions in the issues tab of that repository.

Motivations #

We realized that the lack of a project pattern is affecting the productivity of several developers at that initial moment, so we are proposing a development pattern along with a tool that imitates NPM (NodeJS) functionality as well as template generation capabilities (similar to Scaffold ).

About the Proposed Pattern. #

We adopted the BLoC standard for business rule in a structure similar to MVC, where a page or widget has one or more BLoC to manage its business rule.

We are using the module structure and dependency injection of the package bloc_pattern. Read the bloc_pattern README to familiarize yourself with the concept of dependency injection, BLoC Provider and modules.

For services and provider we use the Repository Pattern.

In this way our folder structure is organized into local modules and a global module, as well as models, repositories and BLoC`s that can be accessed throughout the application in the shared folder.

Sample folder structure generated by slidy:

Folder example

Instalation #

  • You need to have the Dart SDK installed. If you do not have download now.
  • Now just activate the slidy using the pub:
pub global activate slidy
  • Type slidy --version - if you return the slidy version you can consider the complete installation.
  • To update the slidy just use the command:
slidy upgrade

Ready now you can enjoy this new world.

Commands: #

start: Create a basic structure for your project (confirm that you have no data in the "lib" folder).

slidy start

Install: Install (or update) a new package or packages:

slidy install rxdart dio bloc_pattern

You can also install a package as dev_dependency using the flag --dev

slidy i flutter_launcher_icons --dev

remove a package

 slidy uninstall dio 

You can also remove a dev_dependency using the flag --dev

Generate: #

Create a module, page, widget or repository according to the option.

Options:

Creates a new module with slidy generate module:

slidy generate module manager/product/product

Creates a new page and its respective Bloc

slidy generate page manager/product/pages/add_product

Creates a new widget and its respective Bloc:

slidy generate widget manager/product/widgets/product_detail

NOTE: You can create a page or widget with your respective BLoC using the flag -b

Create a new repository

slidy g r manager/product/repositories/product

For more details https://t.me/flutterando

0.2.1 #

  • Removed folder App for main module.
  • File placement changes after "start -c" command.
  • The command "start -c" is being optimized to be the initial interface. We are working on the routes.

0.2.0 #

  • Added start -c, to start the project with routers, locations, and page structures

0.1.2 #

  • Added bloc command create;

0.1.1 #

  • Added param 'create';

0.0.1 #

  • Initial version, created by Stagehand

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate slidy

2. Use it

The package has the following executables:


$ slidy

Use this package as a library

1. Depend on it

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


dependencies:
  slidy: ^0.2.1

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

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

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: other

Primary library: package:slidy/slidy.dart with components: io, mirrors.

Health suggestions

Fix lib/src/modules/generate.dart. (-1 points)

Analysis of lib/src/modules/generate.dart reported 2 hints:

line 21 col 7: DO use curly braces for all flow control structures.

line 24 col 7: DO use curly braces for all flow control structures.

Format bin/main.dart.

Run dartfmt to format bin/main.dart.

Format lib/slidy.dart.

Run dartfmt to format lib/slidy.dart.

Fix additional 22 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/command/start_command.dart (Run dartfmt to format lib/src/command/start_command.dart.)
  • lib/src/command/sub_command/generate_bloc.dart (Run dartfmt to format lib/src/command/sub_command/generate_bloc.dart.)
  • lib/src/modules/create.dart (Run dartfmt to format lib/src/modules/create.dart.)
  • lib/src/modules/install.dart (Run dartfmt to format lib/src/modules/install.dart.)
  • lib/src/modules/modules.dart (Run dartfmt to format lib/src/modules/modules.dart.)
  • lib/src/modules/start.dart (Run dartfmt to format lib/src/modules/start.dart.)
  • lib/src/modules/update.dart (Run dartfmt to format lib/src/modules/update.dart.)
  • lib/src/modules/upgrade.dart (Run dartfmt to format lib/src/modules/upgrade.dart.)
  • lib/src/templates/generator/bloc_generator.dart (Run dartfmt to format lib/src/templates/generator/bloc_generator.dart.)
  • lib/src/templates/generator/widget_generator.dart (Run dartfmt to format lib/src/templates/generator/widget_generator.dart.)
  • lib/src/templates/start/main.dart (Run dartfmt to format lib/src/templates/start/main.dart.)
  • lib/src/templates/start/src/app_bloc.dart (Run dartfmt to format lib/src/templates/start/src/app_bloc.dart.)
  • lib/src/templates/start/src/app_module.dart (Run dartfmt to format lib/src/templates/start/src/app_module.dart.)
  • lib/src/templates/start/src/app_widget.dart (Run dartfmt to format lib/src/templates/start/src/app_widget.dart.)
  • lib/src/templates/start/src/locale/en-US_locale.dart (Run dartfmt to format lib/src/templates/start/src/locale/en-US_locale.dart.)
  • lib/src/templates/start/src/locale/locales.dart (Run dartfmt to format lib/src/templates/start/src/locale/locales.dart.)
  • lib/src/templates/start/src/locale/pt-BR_locale.dart (Run dartfmt to format lib/src/templates/start/src/locale/pt-BR_locale.dart.)
  • lib/src/templates/start/src/routes.dart (Run dartfmt to format lib/src/templates/start/src/routes.dart.)
  • lib/src/templates/start/src/styles/theme_style.dart (Run dartfmt to format lib/src/templates/start/src/styles/theme_style.dart.)
  • lib/src/templates/templates.dart (Run dartfmt to format lib/src/templates/templates.dart.)
  • lib/src/utils/output_utils.dart (Run dartfmt to format lib/src/utils/output_utils.dart.)
  • lib/src/utils/utils.dart (Run dartfmt to format lib/src/utils/utils.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 slidy.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

The description is too long. (-10 points)

Search engines display only the first part of the description. Try to keep the value of the description field in your package's pubspec.yaml file between 60 and 180 characters.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
ansicolor ^1.0.2 1.0.2
args ^1.5.2 1.5.2
http ^0.12.0+2 0.12.0+2
path ^1.6.2 1.6.4
pubspec ^0.1.1 0.1.2
yaml ^2.1.16 2.1.16
Transitive dependencies
async 2.3.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
matcher 0.12.5
meta 1.1.7
pedantic 1.8.0+1
pub_semver 1.4.2
quiver 2.0.5
source_span 1.5.5
stack_trace 1.9.3
string_scanner 1.0.5
stuff 0.1.0
term_glyph 1.1.0
typed_data 1.1.6
uri 0.11.3+1
utf 0.9.0+5