freezed
language
freezed | language | |
---|---|---|
45 | 153 | |
1,935 | 2,677 | |
- | 0.5% | |
8.8 | 9.2 | |
20 days ago | 1 day ago | |
Dart | TeX | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
freezed
-
Streaming Real-Time Data in Flutter: A Step-by-Step Guide for Developers
Freezed Package: Add the Freezed package to simplify data class creation and immutable state management.
-
Build a Personal Target Tracking Application with Flutter Riverpod and Strapi GraphQL
Incorporating Riverpod with Freezed for Immutable State Management: To leverage Riverpod alongside Freezed in your Flutter project for even more robust state management, you'll be enhancing components like GoalNotifier to efficiently handle immutable state. Freezed complements Riverpod by enabling the use of immutable objects in Dart, which aids in making your state management more predictable and safer.
-
Dart 3.3
There is the `sealed` class modifier which allows for exhaustive matching on possible types: https://dart.dev/language/class-modifiers#sealed
There's also a package called freezed which offers similar utility (you might already be familiar with this seeing as you mentioned pattern matching): https://pub.dev/packages/freezed
I recall there being a reason unions aren't generally implemented, though I'm not sure where I read it. It was to do with union types being unnecessarily complex for the compiler and the code they tend to produce, at no real benefit to the programmer or the resulting program. Go's lack of unions is essentially based around the same reasoning.
-
Fluvera is a Flutter SDUI package designed to simplify the process of building user interfaces (UIs) based on JSON server responses.
Interesting. May I ask how this differs from something like Freezed https://pub.dev/packages/freezed and its from/ToJson features ? I haven't used it yet, but I'm just curious about the concept and use of these sort of packages.
-
Dart 3.0: Best New Features & Why You Should Care
The official site does show what you can use it for but to explain a bit more, it helps you work faster.
-
🎉 Introducing MODDDELS: A Powerful Package for Robust, Self-Validated Models in Flutter & Dart
One rather minor suggestion: it took me a while to understand exactly what the benefits were, but the example shown on this page of the docs summarized it well. I would suggest showing an example like that at the top of the main Readme and first page of the site, before or right after the motivation section, similar to how Freezed immediately shows its value proposition.
-
Maximizing Your Flutter App's Performance with (Async)NotifierProvider, Freezed & Riverpod Code Generators
Read more on what you can do with Freezed.
-
Class Constructor Plugins- Are there any?
freezed on pub.dev
-
Firestore partial doc updates and type safety
We use freezed for our models, and then use withConverter in the firestore SDK to easily translate between firestore and our models... however we run into issues with concurrent updates to documents.
-
🚀 Building a Fullstack App with dart_frog and Flutter in a Monorepo - Part 2
Once the package has been created, we will install freezed for JSON serialization and value equality , as this library provides helpful tools for these tasks. We will use json_serializable for JSON serialization. To install freezed and freezed_annotation, open your terminal inside the models package and use the command:
language
-
The Ultimate Conditional Syntax
Oh, wow, that's interesting.
We added pattern matching and exhaustiveness to Dart not that long ago, and dealing with exhaustiveness and mutability was a big concern since Dart (unlike more strictly functional languages) generally doesn't avoid mutability.
Our solution was that whenever a pattern accesses a property, the language implicitly caches that value. Any future accesses to the same property in that switch statement/expression use the previously cached value. That way, an entire set of switch cases is always operating on an immutable snapshot of data so that exhaustiveness can't be violated by side effects. Spec:
https://github.com/dart-lang/language/blob/main/accepted/3.0...
- Shared Memory Multithreading for Dart
-
REPL for Dart: supporting 3rd party packages, hot reload, and full grammar
There is so much cool stuff at various stages of landing in the Dart pipeline at the moment. A few things that come to mind include:
1. Dart now supports the native Web platform APIs and offers a really compelling alternative to TypeScript now thanks to their their latest generation of JS interop. Example for how the code looks here: https://github.com/kevmoo/kevmoo.com/blob/main/web/main.dart
2. Compile to WASM now on the web also with future work to also align itself with the emerging WASI standards both as a compile target and the ability to embed WASI runtimes into Dart programs (technically already possible through their C interop)
3. Lots of great work on cross language interop with C, C++, Swift, Rust, Go, JavaScript, Objective C, Swift, Kotlin and Java here https://github.com/dart-lang/native
4. Upcoming Macros feature which gives fully static type safe automatic and fully debugable code generation.
5. Potentially looking at bringing Shared Memory Multithreading to the language https://github.com/dart-lang/language/blob/2662d252b7fa93175...
6. Also some early work on a bytecode compiler it seems but I’ve not seen any kind of announcement about it here https://github.com/dart-lang/sdk/tree/main/pkg/dart2bytecode
7. This REPL
It’s really a good time to be a part of the community. It’s a very bright looking future for it.
- Shared Memory Multithreading for Dart (Proposal)
-
Official proposal for Type Unions in C#
Thanks, I appreciate the explanation a lot! I find losing the type hints because I am forced to type something as "dynamic" is a bummer, I hope exhaustive pattern matching solves this.
Related issue https://github.com/dart-lang/language/issues/83
-
Swift Static Linux SDK
For now but this is in the pipeline too.
https://github.com/dart-lang/language/blob/main/working/333%...
- Why do we have to put the const keyword in Flutter?
-
Playing around with Extension Types
I noticed that I can enable inline-class as an experiment to play with Extension Types. You need to also add sdk: ^3.3.0-0 to your pubspec.yaml.
- Entendendo Algoritmos: Recursão
What are some alternatives?
json_serializable.dart - Generates utilities to aid in serializing to/from JSON.
sdk - The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
bloc - A predictable state management library that helps implement the BLoC design pattern
quicktype - Generate types and converters from JSON, Schema, and GraphQL
flutter_gen - The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
gallery - Flutter Gallery was a resource to help developers evaluate and use Flutter
flutter-fake-data-factory-pattern
serverpod - Serverpod is a next-generation app and web server, explicitly built for the Flutter and Dart ecosystem.
Flutter - Flutter makes it easy and fast to build beautiful apps for mobile and beyond
dart-petitparser - Dynamic parser combinators in Dart.
conduit - Dart HTTP server framework for building REST APIs. Includes PostgreSQL ORM and OAuth2 provider.