dummymart
Um projeto de exemplo do Flutter que usa Riverpod, go_router, flutter_hooks e Freezed.
- Estrelas
- 111
- Forks
- 19
- Último push (UTC)
- 29 de mar. de 2025
- Status do projeto
- Ativo
README original
Texto original em inglês. Visite o GitHub para a versão atual.
DummyMart
An example Flutter project that uses Riverpod, go_router, flutter_hooks, and Freezed.
Check out the experimental use of macros here.
⚠ Important Notes
This project uses DummyJSON API. Please note that DummyJSON doesn't apply your changes when creating, updating, or deleting items. This project correctly implements those actions, but expect no data changes due to these API limitations.
You can run the app with --dart-define=MOCK_API=true flag to use the internal mocked API that mimics the original API behavior and does modify your changes in a session. If you're using VSCode, you can instead run the app with the "dummymart (mock API)" configuration.
Features
Each feature demonstrates certain functionalities that are commonly used in a CRUD app.
- Products: Basic "view all items" and "view item details" functionalities. Also implements "pull-to-refresh" mechanism.
- Todos: Full CRUD operations, including "add item", "edit item", and "delete item".
- Posts: More advanced read operations such as "search as we type (with debounce)" and "infinite scrolling".
The auth and router services allow functionalities such as "invalidate all data on logout" and "redirect screens based on the auth state".
Routes
Full paths for routes:
=> /
=> /login
=> /settings
=> /products
=> /products/:id
=> /todos
=> /todos/add
=> /todos/:id
=> /todos/:id/update
=> /posts
=> /posts/:id
=> /profile
Setup
- Run
flutter pub getto get dependencies. - Run
dart run build_runner buildto generate required files. You can also rundart run build_runner watchto generate files and let build_runner watch for changes and rebuild if necessary. - (Optional) Run
dart run husky installto setup git hooks on your machine.
Credentials
Use these credentials to login:
username: avat
password: avatpass
Or you can use any user credentials from https://dummyjson.com/users.
Screenshots
Categorias
Dependências usadas
Lista de dependências 28 itens
- dio
^5.8.0+1 - flextras
^1.0.0 - flutter
{"sdk":"flutter"} - flutter_gutter
^2.2.0 - flutter_hooks
^0.20.5 - flutter_native_splash
^2.4.5 - flutter_secure_storage
^9.2.4 - flutter_use
^0.0.4 - freezed_annotation
^2.4.4 - gap
^3.0.1 - go_router
^14.8.0 - hooks_riverpod
^2.6.1 - json_annotation
^4.9.0 - riverpod_annotation
^2.6.1 - shared_preferences
^2.5.2 - build_runnerDesenvolvimento
^2.4.15 - custom_lintDesenvolvimento
^0.7.3 - flutter_launcher_iconsDesenvolvimento
^0.14.3 - flutter_lintsDesenvolvimento
^4.0.0 - flutter_testDesenvolvimento
{"sdk":"flutter"} - freezedDesenvolvimento
^2.5.8 - huskyDesenvolvimento
^0.1.7 - json_serializableDesenvolvimento
^6.9.4 - lint_stagedDesenvolvimento
^0.5.1 - riverpod_generatorDesenvolvimento
^2.6.4 - riverpod_lintDesenvolvimento
^2.6.4 - shared_preferences_platform_interfaceDesenvolvimento
^2.4.1 - testDesenvolvimento
^1.25.15
Rankings
Como escolher um repositório para seu projeto?
Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.
- Busque por nome, autor ou descrição e filtre por tema.
- Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
- Confira o README, a licença e as issues no GitHub antes de usar o projeto.
Fontes e manutenção
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗