CLI package manager and template for Flutter

Overview

Slidy

CLI package manager and template generator for Flutter. Generate Modules, Pages, Widgets, BLoCs, Controllers, tests and more.

Slidy supports mobx, bloc, cubit, rx_notifier and triple.

Why should I use it?

Slidy's goal is to help you structure your project in a standardized way. Organizing your app in Modules formed by pages, repositories, widgets, BloCs, and also create unit tests automatically. The Module gives you a easier way to inject dependencies and blocs, including automatic dispose. Also helps you installing the dependencies and packages, updating and removing them. The best is that you can do all of this running a single command.

Motivations

We realized that the project pattern absence is affecting the productivity of most developers, so we're 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

The structure that slidy offers you, it's similar to MVC, where a page keeps it's own business logic classes(BloC).

We recommend you to use flutter_modular when structuring with slidy. It offers you the module structure(extending the WidgetModule) and dependency/bloc injection, or you will probably get an error.

To understand flutter_modular, take a look at the README.

We also use the Repository Pattern, so the folder structure it's organized in local modules and a global module. The dependencies(repositories, BloCs, models, etc) can be accessed throughout the application.

Sample folder structure generated by slidy:

Installation

You can get Slidy of many ways.

Flutter/Dart directly

 dart pub global activate slidy

choco (only windows)

 choco install slidy

Homebrew (macos and linux)

 brew install slidy

Hello world!

After install, exec the slidy version command. If the command was completed, the slidy was installed.

 slidy --version

Commands:

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

slidy start

run: Run scripts placed in the "scripts" parameter in pubspec.yaml

slidy run open_folder

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

slidy install mockito dio modular

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

slidy i flutter_launcher_icons --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

Creates a new page with slidy generate page:

slidy generate page manager/product/pages/add_product

Creates a new widget with slidy generate widget:

slidy generate widget manager/product/widgets/product_detail

Create a new repository with slidy generate repository

slidy g r manager/product/repositories/product

Create a new rx notifier with slidy generate rx

slidy g rx manager/product/page/my_rx_notifier

Create a new triple with slidy generate t

slidy g t manager/product/page/my_triple

Create a new cubit with slidy generate c

slidy g c manager/product/page/my_cubit

Create a new mobx with slidy generate mbx

slidy g mbx manager/product/page/my_store

For more details Telegram Group Flutterando

Comments
  • Can't load Kernel binary: Invalid SDK hash

    Can't load Kernel binary: Invalid SDK hash

    • Operational System: WIndows
    • How to repeat the beheavior:
      1. Install slidy follow the README instructions
      2. Run the command slidy --version
      3. Script print after version Can't load Kernel binary: Invalid SDK hash
    • Severity: non-blocking
    opened by casenvi 15
  • Pequena atualização no comando pub para instalar o Slidy

    Pequena atualização no comando pub para instalar o Slidy

    Olá pessoal do Flutterando! Gostaria de agradecer por essa incrível CLI!

    Bom, eu tive um pequeno problema na hora da instalação. Ao utilizar o comando: flutter pub global activate slidy eu obtive o erro Can't load Kernel binary: Invalid kernel binary format version. No active package slidy.

    A solução foi tirar o flutter ficando somente pub global activate slidy

    opened by itsjhonny 14
  • slidy create projectest error: Undefined name '$AppController'

    slidy create projectest error: Undefined name '$AppController'

    Hi there,

    I'm trying to start a new project using: slidy create projectteste, but slidy makes a wrong pubspec.yaml:

    https://user-images.githubusercontent.com/379850/105056714-487eff80-5a53-11eb-97c2-4a7aa89a7383.mov

    After this, i changed the pubspec.yaml and fix the wrong line, but appear a new error:

    https://user-images.githubusercontent.com/379850/105057127-aca1c380-5a53-11eb-83df-e7941dbf1c02.mov

    After run flutter pub run build_runner build --delete-conflicting-outputs and clean the problem persist.

    Captura de Tela 2021-01-19 às 12 36 35

    How can i fix this error in line 9 of home_module.dart?

    opened by hermesalvesbr 13
  • Slidy won't accept null or unexistent `dependencies`

    Slidy won't accept null or unexistent `dependencies`

    The pubspec specification states the following about dependencies:

    [Dependencies] can be omitted if your package has no dependencies.

    Thus, the following file is a valid pubspec.yaml file:

    name: package
    version: 0.01
    description: Lorem ipsum
    
    dev_dependencies:
      flutter_test:
        sdk: flutter
      test: ^1.9.4
    
    environment:
      sdk: ">=2.7.0 <3.0.0"
    

    Inserting an empty dependencies should also work:

    name: package
    version: 0.01
    description: Lorem ipsum
    
    dependencies:
    
    dev_dependencies:
      flutter_test:
        sdk: flutter
      test: ^1.9.4
    
    environment:
      sdk: ">=2.7.0 <3.0.0"
    

    In both cases, however, running slidy install <package> results in an error:

    ERROR: No valid project found in this folder.
    If you haven't created your project yet create with:
    
    slidy create myproject
    
    Or enter your project folder with to use slidy: 
    
    cd myproject && slidy start
    
    

    This error is misleading, because it both exist and it's a valid project.

    bug 
    opened by mateusfccp 12
  • Flutter falha em pegar o pacote

    Flutter falha em pegar o pacote

    Quando insiro o pacote em dependecies, tanto bloc_pattern: ^2.3.2, quando bloc_pattern: ^2.4.4 da o erro: A package may not list itself as a dependency.

    A saida do console: [bloc_pattern] flutter packages get Running "flutter pub get" in bloc_pattern...
    Error on line 27, column 3 of pubspec.yaml: A package may not list itself as a dependency.

    27 │ bloc_pattern: ^2.3.2

    │ ^^^^^^^^^^^^ ╵ pub get failed (65) exit code 65

    Algum jeito de resolver esse problema?

    opened by pauloantonelli 11
  • Cmd commands invoked twice

    Cmd commands invoked twice

    image

    When trying to invoke a command over the terminal in VS Code, slidy commands run twice, making it impossible to work with.

    Has anyone encountered that problem?

    environment: sdk: ">=2.12.0 <3.0.0"

    `[√] Flutter (Channel stable, 2.0.3, on Microsoft Windows [Version 10.0.19042.867], locale en-US) • Flutter version 2.0.3 at D:\SDKs\flutternullsafe\flutter • Framework revision 4d7946a68d (2 weeks ago), 2021-03-18 17:24:33 -0700 • Engine revision 3459eb2436 • Dart version 2.12.2

    [√] Android toolchain - develop for Android devices (Android SDK version 29.0.3) • Android SDK at C:\Users\roini\AppData\Local\Android\sdk • Platform android-30, build-tools 29.0.3 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04) • All Android licenses accepted.

    [√] Chrome - develop for the web • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

    [√] Android Studio (version 3.6) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 49.0.1 • Dart plugin version 192.8052 • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

    [√] VS Code (version 1.55.0) • VS Code at C:\Users\roini\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.16.0

    [√] Connected device (2 available) • Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.90 • Edge (web) • edge • web-javascript • Microsoft Edge 89.0.774.63

    • No issues found`

    bug 
    opened by rogasciences 10
  • slidy start não funciona de forma adequada no Android Studio

    slidy start não funciona de forma adequada no Android Studio

    Olá!

    Ao executar o comando "slidy start" (estou usando a versão 1.5.3) não consigo usar as setas do teclado para selecionar as opções. E se apenas aperto enter acontece o seguinte:

    `[2J[0;0H [38;5;10mSlidy CLI Interative [0m [38;5;11mWARN: What Provider System do you want to use?[0m [38;5;10mflutter_modular (default)[0m [38;5;15mbloc_pattern[0m

    Use ↑↓ (keyboard arrows) Press 'q' to quit. [2J[0;0H [38;5;10mSlidy CLI Interative [0m [38;5;11mWARN: Choose a state manager[0m [38;5;10mmobx (default)[0m [38;5;15mflutter_bloc[0m [38;5;15mBLoC with rxdart[0m

    Use ↑↓ (keyboard arrows) Press 'q' to quit. [38;5;9mERROR: The lib folder must be empty[0m ` Ele dá este erro mesmo se eu apagar os arquivos das pastas 'lib' e 'test' manualmente.

    EDIT: Consegui instalar apenas apertando ENTER e usando as configurações default após apagar completamente as pastas 'lib' e 'test' (não apenas os arquivos).

    opened by ThiagoFTelles 10
  • Apos o ultimo update do dart o slidy fecha o console após executar comando

    Apos o ultimo update do dart o slidy fecha o console após executar comando

    Windows 10 λ flutter doctor -v
    [√] Flutter (Channel stable, 1.20.1, on Microsoft Windows [versão 10.0.19041.388], locale pt-BR)
    • Flutter version 1.20.1 at C:\flutter
    • Framework revision 2ae34518b8 (4 days ago), 2020-08-05 19:53:19 -0700
    • Engine revision c8e3b94853
    • Dart version 2.9.0

    [√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\Avell\AppData\Local\Android\Sdk
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = C:\Users\Avell\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

    [√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

    [√] VS Code (version 1.47.3)
    • VS Code at C:\Users\Avell\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.13.2

    [!] Connected device
    ! No devices available

    ! Doctor found issues in 1 category.

    erro

    opened by toshiossada 8
  • Erros de geração de código ao criar um projeto com mobx

    Erros de geração de código ao criar um projeto com mobx

    Descrição

    Quando crio um projeto escolhendo o state manager mobx, aparecem os seguintes erros no arquivo home_page.dart:

    Linha 5:
    Taget of URI doesn't exist: 'package:slidy_testes/app/modules/home/home_store.dart'
    Linha 9:
    The parameter 'key' can't have a value of 'null' because of its type, but the implicit default value is 'null'.
    

    Solução

    O primeiro problema pode ser contornado substituindo "slidy_testes" pelo nome do pacote do projeto criado como em: import 'package:<nome_projeto>/app/modules/home/home_store.dart';. Já para o segundo, basta adicionar uma interrogação (?) como em: const HomePage({Key ? key, this.title = "Home"}) : super(key: key);

    Passos para reprodução

    • slidy start
    • state manager: mobx

    Ambiente

    • Flutter: 2.2.0
    • Dart: 2.13.0
    • Slidy: 3.2.2

    Criei esta issue apenas para caráter informativo, uma vez que os passos da solução já resolvem os problemas.

    opened by neyara 7
  • Adding Linting

    Adding Linting

    Added Linting to Modular with Lint, which can be changed to pedantic or Effective Dart packages while keeping current lints.

    Improved readability changing functions with multiple parameters to named parameters.

    Also, corrected some undesired typos where a async function wouldn't return Future but actually void.

    Tell me what you guys think if there's something which can be improved.

    opened by Ascenio 7
  • Error to start a project with `slidy start`

    Error to start a project with `slidy start`

    I'm running slidy start and no matter which option I choose to start, it ends with the same error:

    Removing lib and test folders
    Unhandled exception:
    UnimplementedError
    #0      CustomFile.writeAsString (package:slidy/src/core/models/custom_file.dart:251)
    #1      new YamlServiceImpl (package:slidy/src/core/services/yaml_service_impl.dart:20)
    #2      CreateImpl.call (package:slidy/src/modules/template_generator/domain/usecases/create.dart:28)
    <asynchronous suspension>
    #3      StartCommand.run (package:slidy/src/modules/template_generator/presentation/start_command.dart:122)
    <asynchronous suspension>
    #4      CommandRunner.runCommand (package:args/command_runner.dart:209)
    <asynchronous suspension>
    #5      main (file:///private/tmp/slidy-20220824-11351-1qsps14/slidy-4.0.1/bin/main.dart:18)
    <asynchronous suspension>
    

    System settings:

    image

    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 3.0.5, on macOS 12.5.1 21G83 darwin-arm, locale en-BR)
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    [✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 2021.2)
    [✓] VS Code (version 1.67.0)
    [✓] Connected device (2 available)
    [✓] HTTP Host Availability
    
    • No issues found!
    
    ███████╗██╗     ██╗██████╗ ██╗   ██╗     ██████╗██╗     ██╗
    ██╔════╝██║     ██║██╔══██╗╚██╗ ██╔╝    ██╔════╝██║     ██║
    ███████╗██║     ██║██║  ██║ ╚████╔╝     ██║     ██║     ██║
    ╚════██║██║     ██║██║  ██║  ╚██╔╝      ██║     ██║     ██║
    ███████║███████╗██║██████╔╝   ██║       ╚██████╗███████╗██║
    ╚══════╝╚══════╝╚═╝╚═════╝    ╚═╝        ╚═════╝╚══════╝╚═╝                                             
    
    CLI package manager and template for Flutter
    
    Slidy version: 4.0.0+24
    
    opened by JonataCSantos 6
  • travado  brew install slidy

    travado brew install slidy

    boa tarde, tudo bem? fui instalar o slidy brew install slidy

    ==> Installing slidy from flutterando/slidy ==> /usr/local/opt/dart/libexec/bin/dart pub get ==> /usr/local/opt/dart/libexec/bin/dart run build_runner build

    trava nessa linha e nao sai já faz 30 minutos. cancelando e tentando novamente.

    Dart SDK version: 2.18.6 (stable) (Tue Dec 13 21:15:14 2022 +0000) on "macos_x64" Version global flutter FVM [✓] Flutter (Channel stable, 3.3.10, on macOS 13.1 22C65 darwin-x64, locale pt-BR) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.3) [✓] VS Code (version 1.74.2) [✓] Connected device (2 available) [✓] HTTP Host Availability

    opened by DiegoLimeiradaSilva 1
  • Não consigo instalar o slidy no linux ubuntu 22.04.01 LTS

    Não consigo instalar o slidy no linux ubuntu 22.04.01 LTS

    recentemente mudei meu sistema operacional para o Linux e eu só usava windows antes disso. no windows consegui baixar o slidy através do chocolatey. aqui no linux vi que tinha que utilizar o homebrew, não consegui através do homebrew pois ele fica travado em uma etapa do processo. então decidi baixar atráves do comando "flutter pub global activate slidy", e aparentemente tinha dado certo. só que quando vou executar algum comando do slidy me retorna o seguinte erro: "/usr/bin/slidy: 17: exec: /usr/bin/src/dart: not found" alguém pode me ajudar? é algo que eu fiz errado? desde já, obrigado pela atenção!

    opened by kauantorrisi 1
Releases(4.0.3)
Flutter network manager package.

Features With Network Manager, you can now easily manage your internet requests, send and receive data. Usage Set Base URL Settings Base URL -> Networ

Sercan KAYA 14 Dec 4, 2022
Flutter Package Manager

Flutter Package Manager Flutter Package Manager, powerfull package management via CLI, add/search/top/favorite packages! Install > pub global activate

César Ferreira 3 Dec 1, 2021
A Package providing Core functionality/Template to start off a Clean Architecture based project

A Package providing Core functionality/Template to start off a Clean Architecture based project Features Provides with APIResult & UseCaseResult model

null 1 Dec 25, 2021
Utility Manager Flutter Application is made with Flutter and Supabase which allows user to add task, set remainder to the task, set color to separate tasks and it allows to add URL with URL's informations.

Utility Manager Flutter Application! Utility Manager Flutter Application is made with Flutter and Supabase which allows user to add task, set remainde

Kathirvel Chandrasekaran 6 Jan 6, 2022
Password Manager Created Using Flutter And SQLite

Password Manager Created Using Flutter And SQLite

Imira Randeniya 15 Dec 24, 2022
An open source task manager (todo list) app, developed using Dart language and Flutter framework.

Tasker An open source task manager (todo list) app, developed using Dart language and Flutter framework. Screenrecords     Screenshots                

Erfan Rahmati 42 Dec 29, 2022
Finance manager for devlance using flutter and firebase (Open source)

finance_manager A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

ANIKET SINDHU 2 Dec 27, 2021
A task manager app made with flutter where you can mark your tasks for specific days and keep your life organized!

task_manager_app A task manager app made with flutter where you can mark your tasks for specific days and keep your life organized! Getting Started Th

null 2 Sep 1, 2021
Attendance and Payment manager

Manage Me Application A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you st

Rohit Karnawat 1 Oct 16, 2021
A simple and secure money manager that keeps you financially vigilant.

Be Thrifty Today A simple and secure money manager that keeps you financially vigilant. Website https://bethrifty.today Short Description Be Thrifty T

Amruth Pillai 121 Dec 26, 2022
This is an eCommerce minimalist template with a clean and beautiful design for Flutter.

Shope - Free Flutter eCommerce Template The “Shope” e-Commerce UI Kit has the goal to help you to save time with the frontend development. You can use

Roberto Juarez 1.1k Jan 8, 2023
AuthPass - Password Manager based on Flutter for all platforms. Keepass 2.x (kdbx 3.x) compatible.

AuthPass.app - Open Source Password Manager for mobile and desktop AuthPass - Password Manager based on Flutter for all platforms. Keepass 2.x (kdbx 3

AuthPass 1.5k Jan 5, 2023
A task manager built with Flutter, Serverless, Postgres, Firebase

Tasky Mobile App A project management mobile app This project is an implementation of a Design i found on uigaints.com by Ashish Dhakal. The Backend w

Etornam Sunu 137 Dec 31, 2022
A simple, cross-platform password manager created with Flutter.

PassMan PassMan Logo © 2021 by Yash Ahir is licensed under CC BY-NC 4.0 A simple, cross-platform password manager created with Flutter. How to run thi

Yash Ahir 19 Dec 14, 2022
Simple student record manager app for learning flutter basics

Simple Student Record Manager Simple student record manager app for learning flutter basics integrated with Django REST API (refer Generic-Student-API

Akshat Soni 3 Oct 31, 2022
Plant Manager is an application that was developed on Rocketseat NLW5 with React Native but was rebuilt using Flutter.

Technologies | Project | Layout | License ?? Technologies This project was developed with the following technologies: Flutter ?? Project Plant Manager

Mayderson 7 Aug 11, 2021
Flutter Theme Manager with Abstract Factory Design

extheme A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Veli Bacik 28 Dec 23, 2022
Create mobile file manager design using Flutter

Mobile File Manager Watch it on YouTube Home & Cloud Screen On this file manager design has two pages. The Home page displays file usage information,

Firgia 38 Dec 23, 2022
Flutter StatusBar Manager for iOS & Android

flutter_statusbar_manager Now compatible with AndroidX thanks to https://github.com/lorenzOliveto Flutter Statusbar Manager, lets you control the stat

Foo() 190 Dec 13, 2022