|
| 1 | +# Flutter desafio |
1 | 2 |
|
| 3 | +Desafio em flutter consumindo [API The Rick and Morty](https://rickandmortyapi.com/). |
2 | 4 |
|
3 |
| -# FlutterDesafio |
| 5 | +Monorepo para projetos frontend utilizando |
4 | 6 |
|
5 |
| -This project was generated using [Nx](https://nx.dev). |
| 7 | +- [Nx Workspace](https://nx.dev/) 14.8.6 |
| 8 | +- [Flutter](https://flutter.dev/) 3.0.5 |
| 9 | +- Dart 2.17.6 |
| 10 | +- Node 16.16.0 |
| 11 | +- Npm 8.11.0 |
6 | 12 |
|
7 |
| -<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="450"></p> |
| 13 | +## Dependências |
8 | 14 |
|
9 |
| -🔎 **Smart, Fast and Extensible Build System** |
| 15 | +- [dio](https://pub.dev/packages/dio) 4.0.6 |
| 16 | +- [flutter_modular](https://pub.dev/packages/flutter_modular) 5.0.3 |
| 17 | +- [flutter_mobx](https://pub.dev/packages/flutter_mobx) 2.0.6+4 |
| 18 | +- [flutter_svg](https://pub.dev/packages/flutter_svg) 1.1.5 |
| 19 | +- [intl](https://pub.dev/packages/intl) 0.17.0 |
| 20 | +- [mobx](https://pub.dev/packages/mobx) 2.1.1 |
| 21 | +- [shared_preferences](https://pub.dev/packages/shared_preferences) 2.0.15 |
| 22 | +- [skeletons](https://pub.dev/packages/skeletons) 0.0.3 |
10 | 23 |
|
11 |
| -## Adding capabilities to your workspace |
| 24 | +## Funcionalidades |
12 | 25 |
|
13 |
| -Nx supports many plugins which add capabilities for developing different types of applications and different tools. |
| 26 | +- Lista dos personagens com seus respectivos nomes e fotos |
| 27 | +- Busca por personagens (Nome) |
| 28 | +- Filtro que permite listar todos, só humanos ou só aliens, status e gênero |
| 29 | +- Visualização detalhada do personagem |
| 30 | +- Lista de favoritos e adicionar/remover personagens |
| 31 | +- Visualização detalhada do episódio |
14 | 32 |
|
15 |
| -These capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well. |
| 33 | +## Configurações iniciais |
16 | 34 |
|
17 |
| -Below are our core plugins: |
| 35 | +> 💡 Garanta que seu Node esteja na versão 16x, para uma melhor compatibilidade e integração |
18 | 36 |
|
19 |
| -- [React](https://reactjs.org) |
20 |
| - - `npm install --save-dev @nrwl/react` |
21 |
| -- Web (no framework frontends) |
22 |
| - - `npm install --save-dev @nrwl/web` |
23 |
| -- [Angular](https://angular.io) |
24 |
| - - `npm install --save-dev @nrwl/angular` |
25 |
| -- [Nest](https://nestjs.com) |
26 |
| - - `npm install --save-dev @nrwl/nest` |
27 |
| -- [Express](https://expressjs.com) |
28 |
| - - `npm install --save-dev @nrwl/express` |
29 |
| -- [Node](https://nodejs.org) |
30 |
| - - `npm install --save-dev @nrwl/node` |
| 37 | +Na raiz do repositório execute o comando |
31 | 38 |
|
32 |
| -There are also many [community plugins](https://nx.dev/community) you could add. |
| 39 | +```bash |
| 40 | +npm install |
| 41 | +``` |
33 | 42 |
|
34 |
| -## Generate an application |
| 43 | +Antes de executar o projeto, execute os comandos |
35 | 44 |
|
36 |
| -Run `nx g @nrwl/react:app my-app` to generate an application. |
| 45 | +```bash |
| 46 | +nx run flutter-suflex:clean |
| 47 | +``` |
37 | 48 |
|
38 |
| -> You can use any of the plugins above to generate applications as well. |
| 49 | +Para iniciar o aplicativo em desenvolvimento, execute o comando |
39 | 50 |
|
40 |
| -When using Nx, you can create multiple applications and libraries in the same workspace. |
| 51 | +```bash |
| 52 | +npx nx run flutter-suflex:run |
| 53 | +``` |
41 | 54 |
|
42 |
| -## Generate a library |
| 55 | +--- |
43 | 56 |
|
44 |
| -Run `nx g @nrwl/react:lib my-lib` to generate a library. |
| 57 | +## Comandos úteis |
45 | 58 |
|
46 |
| -> You can also use any of the plugins above to generate libraries as well. |
| 59 | +Todos os comandos rodam no NX CLI instalado no workspace. |
47 | 60 |
|
48 |
| -Libraries are shareable across libraries and applications. They can be imported from `@flutter-desafio/mylib`. |
| 61 | +Caso estela com algum problema com o comando local você pode acionar pelo `npx` |
49 | 62 |
|
50 |
| -## Development server |
| 63 | +| COMANDO | DESCRIÇÃO | |
| 64 | +| ------- | --------- | |
| 65 | +| `nx run flutter-suflex:analyze` | Analise o código Dart do projeto | |
| 66 | +| `nx run flutter-suflex:clean` | Excluir os diretórios `build/` e `dart_tool/` | |
| 67 | +| `nx run flutter-suflex:format` | Formate um ou mais arquivos Dart | |
| 68 | +| `nx run flutter-suflex:test` | Execute testes de unidade Flutter para o projeto atual | |
| 69 | +| `nx run flutter-suflex:doctor` | Execute o Flutter doctor para verificar o ambiente e o status da instalação do Flutter | |
| 70 | +| `nx run flutter-suflex:assemble` | Montar e construir recursos Flutter | |
| 71 | +| `nx run flutter-suflex:attach` | Anexar a um aplicativo em execução | |
| 72 | +| `nx run flutter-suflex:drive` | Execute testes de integração para o projeto em um dispositivo ou emulador conectado | |
| 73 | +| `nx run flutter-suflex:gen-l10n` | Gerar localizações para o projeto atual | |
| 74 | +| `nx run flutter-suflex:install` | Instale um aplicativo Flutter em um dispositivo conectado | |
| 75 | +| `nx run flutter-suflex:run` | Execute seu aplicativo Flutter em um dispositivo conectado | |
| 76 | +| `nx run flutter-suflex:build-aar` | Construir um repositório contendo um AAR e um arquivo POM | |
| 77 | +| `nx run flutter-suflex:build-apk` | Crie um arquivo APK do Android a partir do seu aplicativo | |
| 78 | +| `nx run flutter-suflex:build-appbundle` | Crie um arquivo Android App Bundle a partir do seu aplicativo | |
| 79 | +| `nx run flutter-suflex:build-bundle` | Crie o diretório de ativos do Flutter a partir do seu aplicativo | |
| 80 | +| `nx run flutter-suflex:build-ios` | Criar um pacote de aplicativos iOS (somente host Mac OS X) | |
| 81 | +| `nx run flutter-suflex:build-ios-framework` | Produz um diretório .framework para um módulo Flutter e seus plugins para integração em projetos Xcode simples e existentes | |
| 82 | +| `nx run flutter-suflex:build-ipa` | Criar um pacote de arquivos iOS (somente host do Mac OS X) | |
51 | 83 |
|
52 |
| -Run `nx serve my-app` for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files. |
| 84 | +### Exemplos |
53 | 85 |
|
54 |
| -## Code scaffolding |
| 86 | +Serve a aplicação em modo desenvolvimento |
55 | 87 |
|
56 |
| -Run `nx g @nrwl/react:component my-component --project=my-app` to generate a new component. |
| 88 | +```bash |
| 89 | +nx run flutter-suflex:run |
| 90 | +``` |
57 | 91 |
|
58 |
| -## Build |
| 92 | +Execute os testes unitários do projeto |
59 | 93 |
|
60 |
| -Run `nx build my-app` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. |
| 94 | +```bash |
| 95 | +nx run flutter-suflex:test |
| 96 | +``` |
61 | 97 |
|
62 |
| -## Running unit tests |
| 98 | +Execute todos os testes unitários do repositório |
63 | 99 |
|
64 |
| -Run `nx test my-app` to execute the unit tests via [Jest](https://jestjs.io). |
| 100 | +```bash |
| 101 | +nx run-many --target=test --all=true |
| 102 | +``` |
65 | 103 |
|
66 |
| -Run `nx affected:test` to execute the unit tests affected by a change. |
| 104 | +## Workflows |
67 | 105 |
|
68 |
| -## Running end-to-end tests |
| 106 | +Sempre que uma PR é aberta é iniciado um workflow de `CI` (Continuous Integration). Após ser criado um novo release é iniciado um workflow de `CD` (Continuous Delivery). |
69 | 107 |
|
70 |
| -Run `nx e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io). |
| 108 | +### CI - Continuous Integration |
71 | 109 |
|
72 |
| -Run `nx affected:e2e` to execute the end-to-end tests affected by a change. |
| 110 | +O `CI` auxilia em termos de segurança e confiabilidade no código desenvolvido, antes dele ser de fato mergeado. Onde é estressados cenários de testes, análises do código e formatação. |
73 | 111 |
|
74 |
| -## Understand your workspace |
| 112 | +#### Jobs que são executados: |
75 | 113 |
|
76 |
| -Run `nx graph` to see a diagram of the dependencies of your projects. |
| 114 | +- prepare |
| 115 | +- analyze |
| 116 | +- test |
77 | 117 |
|
78 |
| -## Further help |
| 118 | + |
79 | 119 |
|
80 |
| -Visit the [Nx Documentation](https://nx.dev) to learn more. |
| 120 | +### CD - Continuous Delivery |
81 | 121 |
|
| 122 | +Esse workflow é responsável por buildar o aplicativo e gerar o `appbundle` |
82 | 123 |
|
| 124 | +#### Jobs que são executados: |
83 | 125 |
|
84 |
| -## ☁ Nx Cloud |
| 126 | +- prepare |
| 127 | +- build_appbundle |
85 | 128 |
|
86 |
| -### Distributed Computation Caching & Distributed Task Execution |
| 129 | + |
87 | 130 |
|
88 |
| -<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-cloud-card.png"></p> |
| 131 | +## Integração com o gráfico de dependências |
89 | 132 |
|
90 |
| -Nx Cloud pairs with Nx in order to enable you to build and test code more rapidly, by up to 10 times. Even teams that are new to Nx can connect to Nx Cloud and start saving time instantly. |
| 133 | +Através do comando `nx graph`, é possível visualizar as dependências de qualquer módulo. Ele abrirá um gráfico de dependência em um navegador. No menu do lado esquerdo, você pode escolher quais projetos deseja incluir na visualização. Após clicar em Select all, você deverá ver o seguinte gráfico: |
91 | 134 |
|
92 |
| -Teams using Nx gain the advantage of building full-stack applications with their preferred framework alongside Nx’s advanced code generation and project dependency graph, plus a unified experience for both frontend and backend developers. |
| 135 | + |
93 | 136 |
|
94 |
| -Visit [Nx Cloud](https://nx.app/) to learn more. |
| 137 | +| Personagens | Episódios | Splash | |
| 138 | +| ----- | ----- | ----- | |
| 139 | +|  |  |  | |
| 140 | + |
| 141 | +## Capturas de tela |
| 142 | + |
| 143 | +| Personagens | Busca | |
| 144 | +| ----------- | ----- | |
| 145 | +|  |  | |
| 146 | + |
| 147 | +| Detalhe/Informações | Detalhe/Episódios | |
| 148 | +| ------------------- | ----------------- | |
| 149 | +|  |  | |
| 150 | + |
| 151 | +| Episódio/Informações | Episódio/Personagens | |
| 152 | +| -------------------- | -------------------- | |
| 153 | +|  |  | |
| 154 | + |
| 155 | +| Filtros | Favoritos | |
| 156 | +| -------------------- | -------------------- | |
| 157 | +|  |  | |
0 commit comments