Giter Site home page Giter Site logo

flutter_state_management_collection's Introduction

flutter_state_management_collection

框架

  • riverpod
  • mobx
  • provider
  • bloc

考慮情境

  • 讀取單個
  • 讀取列表
  • A (single/multi models) -> B (single/multi models)
    1. 進入 B 時
      1. 讀取失敗,A 不受影響
      2. 讀取成功,A 更新資料
      3. A 的資料作為 B 的初始值,不重新讀取? A 的資料作為 B 的初始值,但同時會再次讀取 B 的最新資料,如果取得的話,再次更新畫面 (減少等待時間?) 如果正在再次讀取或失敗且該畫面是重要畫面 (但如果是重要畫面,本身就不該用 A 當作初始值,而是重新讀取最新),若使用者執行重要行為時,跳出提醒?

        重要畫面: 轉帳-手續費、結帳 (有些網站會在購物車更新時跳出提醒商品變更,強制跳回 or 提醒更新商品內容 or 詢問是否留下?) B 是否可以重整? 可以重整的話,是否需要更新前面資料?

    2. 在後續刪除/更新的話,是否要更新前面頁面? (A 和 B 資料隔離?) 根據資料是否為敏感? (牽涉個資等原因) (例如有些網站按上一頁會顯示資料不存在、有些網站即便資料已不存在,但會根據 history state 回復資料)
    3. A -> B (執行更新) 在更新未完成前 (請求尚未回傳),是否該讓其回上一頁? ()

ViewModel (aka Controller ...)

用以控制頁面狀態

  • 討論 A ViewModel 與 B ViewModel 連動,假設 A ViewModel 為 Product、B ViewModel
  • State 要有 event/action code,讓每個 action

flutter_state_management_collection's People

Contributors

wjprogramer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.