Hi! This may sound weird but consider watching the "Halt and Catch Fire" show. It does an excellent job of showing the thing's passionate, emotional, and personal parts. And it could lead to some ideas. It could help with the drive.
It definitely made me realize how software, the idea of software is inherently essential to me.
Also, if there are any Apple Music users on iOS 17, I'd highly appreciate it if you share the experience.
When I first heard the announcement, I thought they were finally adding something like Spotify Connect, but after looking for it, I think it's not the case, unfortunately.
Anyways, I think this is a matter of preference, and I've been historically avoiding codegen as much as possible. I'm glad it's now easier to do that, but freezed is still cool and could be really helpful for certain people/scenarios!
Since there are too many examples on the freezed README and the one at the top isn't a good use case to begin with (I like to keep my data models (DTOs) separate from entities, and DTOs are good enough with plain json_serializable), I'll provide an example from one of the projects I'm currently working on. It is still more verbose than it would usually be with freezed, however, I'm pretty fine with that. Also, it's worth noting that whenever I need a copyWith, I still use codegen with copy_with_extension. It has a nicer copyWith API and only handles that instead of a bunch of other stuff I don't necessarily need.
part of 'simply_browser_bloc.dart';
sealed class SimplyBrowserState with EquatableMixin {
const SimplyBrowserState();
}
class SimplyBrowserInitial extends SimplyBrowserState {
const SimplyBrowserInitial();
@override
List<Object?> get props => const [];
}
class SimplyBrowserLoading extends SimplyBrowserState {
const SimplyBrowserLoading({this.loadedSimplies});
final List<Simply>? loadedSimplies;
@override
List<Object?> get props => const [];
}
class SimplyBrowserFailed extends SimplyBrowserState {
const SimplyBrowserFailed(this.failure);
final ApiFailure failure;
@override
List<Object?> get props => [failure];
}
class SimplyBrowserLoaded extends SimplyBrowserState {
const SimplyBrowserLoaded({
required this.canLoadMore,
required this.simplies,
});
final bool canLoadMore;
final List<Simply> simplies;
@override
List<Object?> get props => [simplies];
}
And then using the sealed class itself becomes super-nice, like the following snippet (only wrapped in a function to state clearly where the variable is coming from):
Hi! This may sound weird but consider watching the "Halt and Catch Fire" show. It does an excellent job of showing the thing's passionate, emotional, and personal parts. And it could lead to some ideas. It could help with the drive. It definitely made me realize how software, the idea of software is inherently essential to me.
🫂
Oh, yeah, this is a good one!
It seems that, unfortunately, the app isn't available for download on App Store anymore.
I wonder if there's already a "the bots are from Reddit" conspiracy :D
I really see no point in these actions. I mean, seriously, why would you want to just harm something open?
Here! https://greasyfork.org/en/scripts/469221-lemmy-local-community-redirect
I usually add all lint rules and disable the ones I don't like/the ones that conflict with each other
There’s an open-source and privacy-oriented userscript manager for Chrome(ium) called ViolentMonkey. Highly recommended using that!
That’s a great idea, thanks! Will do :)
Thanks! Yup, I’ll add it to greasyfork later :)
I think it’s pretty similar. But this is a bit more minimal and it’s a userscript (which I prefer over extensions for small stuff)
Sure!
Thanks for sharing! The beginning and the comments look promising; added to WL!
Also, if there are any Apple Music users on iOS 17, I'd highly appreciate it if you share the experience. When I first heard the announcement, I thought they were finally adding something like Spotify Connect, but after looking for it, I think it's not the case, unfortunately.
and then it's gonna say you need to update Xcode to be compatible with your iOS
(╯°□°)╯︵ ┻━┻
You can! Ghostery and Adguard are available for Safari. Also, lots of userscripts :)
Replied above for a better comment hierarchy. Feel free to comment there if you have any questions/thoughts!
It's also worth noting that freezed is switching to the Dart 3 pattern matching, too (see https://pub.dev/packages/freezed#legacy-union-types-and-sealed-classes).
Anyways, I think this is a matter of preference, and I've been historically avoiding codegen as much as possible. I'm glad it's now easier to do that, but freezed is still cool and could be really helpful for certain people/scenarios!
Since there are too many examples on the freezed README and the one at the top isn't a good use case to begin with (I like to keep my data models (DTOs) separate from entities, and DTOs are good enough with plain
json_serializable), I'll provide an example from one of the projects I'm currently working on. It is still more verbose than it would usually be with freezed, however, I'm pretty fine with that. Also, it's worth noting that whenever I need acopyWith, I still use codegen with copy_with_extension. It has a nicercopyWithAPI and only handles that instead of a bunch of other stuff I don't necessarily need.And then using the sealed class itself becomes super-nice, like the following snippet (only wrapped in a function to state clearly where the variable is coming from):