搜尋套件、儲存庫與 APP 分類

GitHub 儲存庫dhafinrayhan/dummymart

dummymart

一個使用 Riverpod、go_router、flutter_hooks 和 Freezed 的範例 Flutter 專案。

dummymart 專案封面
星標
111
分支
19
最近推送(UTC)
2025年3月29日
專案狀態
未封存

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

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.

  1. Products: Basic "view all items" and "view item details" functionalities. Also implements "pull-to-refresh" mechanism.
  2. Todos: Full CRUD operations, including "add item", "edit item", and "delete item".
  3. 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

  1. Run flutter pub get to get dependencies.
  2. Run dart run build_runner build to generate required files. You can also run dart run build_runner watch to generate files and let build_runner watch for changes and rebuild if necessary.
  3. (Optional) Run dart run husky install to 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

View all todos View a single todo Add todo Update todo
Login Profile Infinite scrolling Search post
Dhafin Rayhan A. GitHub avatar
GitHub 作者

Dhafin Rayhan A. ↗

Bandung, Indonesia
語言DartC++CMakeHTMLRubySwiftCKotlinShellObjective-C

分類

使用的依賴

依賴清單 28 項

所在榜單

如何選擇適合專案的儲存庫?

先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。

  1. 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
  2. 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
  3. 使用前在 GitHub 確認 README、授權條款與 Issues。

來源與維護

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗