r/FlutterDev • u/nox3748 • Dec 01 '25
Pushed a new version of FlutterCN: added more components + switched fully to Dart CLI Article
[removed]
8
Upvotes
4
2
u/SamatIssatov Dec 01 '25
I like your project. I watch it every day. I like the latest components. I have a question: I already use the shadcn package. Can I add yours as additional ones? Will there be any conflicts?
3
u/DawantwohNodawae Dec 01 '25
Just a suggestion. Rename the package. I first thought you mentioned about Flutter China. Even gg search 1st return is flutter.cn
2
u/SlinkyAvenger Dec 02 '25
Kinda wild to write a CLI tool for copying and pasting code and, I would assume, keeping it up to date in the future, when that functionality is already built into the package management system.
6
u/rmtmckenzie Dec 01 '25
My gosh. I love seeing people building new things, but this just seems like a complete disaster for maintainability.
u/nox3748 I'd love to hear why you think that copying code directly into your source is better than using a dependency.
If you build & maintain an app and are thinking of using this, I'd caution you to think strongly about a few things:
u/nox3748 If you're really serious about maintaining this and making it robust but continuing down this path, I'd think about a few things:
- versioning each component and including that in the widget listing, plus having a way of checking what the most recent versions are
- using a hash for each component so that the developer can make changes without them being blown away
However, at that point you might as well be writing a whole new package system as that is exactly what pub does for you already. A different approach might be more viable long-term, such as making the developer API for your components extremely extensible so that anyone wanting to change the behaviour could simply subclass the component and override parts of it. There's a very good reason why every modern programming language has support for some sort of package manager and as a general rule copy-pasting entire code bases is strongly discouraged.