-
I found the [ListCopyWith interface](https://pub.dev/documentation/dart_mappable/latest/dart_mappable/ListCopyWith-class.html) and the [CopyWith topic](https://pub.dev/documentation/dart_mappable/late…
-
Hy
I encounter this redundant code in various places of my application
```dart
final e = someMonthlyExpense;
Expenses(
id: e.amount == amount ? e.id : 0,
amount: e.amount/30,
…
-
I am using freezed for state class in bloc.
```
part 'example_state.freezed.dart';
@freezed
class ExampleState with _$ExampleState {
const ExampleState._();
const factory ExampleState({
…
-
Have you figured out a way to generate copyWith so it does not have to be created manually by hand? built_value offer this solution but it's pretty ugly to use.
dodyg updated
5 years ago
-
Generate copyWith method for sealed classes.
We should disallow generic type change in copy with method to make life easier.
For nullable types we have two approaches:
For example:
```dart
class B…
-
It'd be useful if `DTO`s (or all classes, so commands and queries as well? I really don't know) already came with `copyWith()` generated.
There could be some flag in `contracts_generator.yaml` t…
-
If copyWith of the base class that is overridden by the subclass is called, copyWith of the subclass should be called.
However, since extension will not be overridden in dart, copyWith of the base cl…
-
In the absence of a good way to copy immutable objects with some field changes, the Flutter team often implements a `copyWith` function that copies the original object with optional overrides of indiv…
-
**Package Version**
super_editor `main` branch (`c3190a9cc77b25d9ce18c798b1b7cdcecab13ecc`)
**User Info**
Superlist
**Details**
The only way I found to consistently customize the color of car…
-
Records are coming in the dart 3. They are pretty useful and the almost only drawback is the inability to copy them. I believe it's possible to implement as records can have extensions
So I imagine…