TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Building Local-First Flutter Apps with Riverpod, Drift, and PowerSync

40 点作者 kobieps9 天前

6 条评论

doawoo5 天前
As a newer user of Flutter I found Riverpod to be extremely heavy and have a lot more mental overhead than using stateless widgets with Hooks.<p>Any particular reason you personally prefer Riverpod?
评论 #43948765 未加载
评论 #43949958 未加载
评论 #43949312 未加载
评论 #43951425 未加载
account-54 天前
I replied to this 3 days ago even though it looks like hours ago now. Either way I&#x27;ve another question, that&#x27;s similar.<p>If this is a local first app, why not use the sqlite database itself for state management? Powersync themselves talk about it here:<p><a href="https:&#x2F;&#x2F;www.powersync.com&#x2F;blog&#x2F;how-local-first-simplifies-flutter-state-management" rel="nofollow">https:&#x2F;&#x2F;www.powersync.com&#x2F;blog&#x2F;how-local-first-simplifies-fl...</a><p>Flutter state management always seemed clunky and complicated to me. With the caveat I&#x27;m developing small projects in it that tend not to need complicated state management functionality.
评论 #43963095 未加载
zerr5 天前
I wonder why Flutter didn&#x27;t gain traction in US. It seems to be more or less popular in poor countries and even less in Europe. But in US it seems to be quite a no name. Why US is so JavaScript-centric?
评论 #43949421 未加载
评论 #43949940 未加载
评论 #43949237 未加载
hosh4 天前
Let&#x27;s be clear. This post describes an architecture that is offline-first, not local-first.<p>One of the main goals of local-first is so that the user of a local-first application owns their own data. (See Martin Kleppmann&#x27;s paper on this).<p>As such, local-first applications don&#x27;t necessarily have a concept of a central server. `git` is local-first, though most teams synchronize to a hub such as Github or Gitlab. This is a design principle to get away from having to sync to the cloud, making it more difficult to monetize as a SAAS. There seems to be a growing trend of people promoting offline-first applications as local-first, but structuring it to still lock people&#x27;s data into their SAAS. (If you want to lock them in, then say so -- call it offline-first).<p>A true local-first mobile app would allow me to collaborate with someone in the same room using Bluetooth, even out somewhere where I don&#x27;t have wifi, cell service or Starlink<p>See:<p>- <a href="https:&#x2F;&#x2F;martin.kleppmann.com&#x2F;papers&#x2F;local-first.pdf" rel="nofollow">https:&#x2F;&#x2F;martin.kleppmann.com&#x2F;papers&#x2F;local-first.pdf</a><p>- <a href="https:&#x2F;&#x2F;www.inkandswitch.com&#x2F;essay&#x2F;local-first&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.inkandswitch.com&#x2F;essay&#x2F;local-first&#x2F;</a> (Same, but in html)
评论 #43951068 未加载
sgt5 天前
Would this work with Flutter Web as well?
评论 #43948282 未加载
评论 #43948416 未加载
account-58 天前
Why not just use sqlite instead of drift?
评论 #43925708 未加载
评论 #43947789 未加载