Hi there! Your package looks very promising - we can't wait to replace built_value with it.
This is what I found out while trying the laaaatest version:
// main.dart
import 'package:flutter/foundation.dart';
import 'package:json_annotation/json_annotation.dart';
part 'model.freezed.dart';
part 'model.g.dart';
@immutable
abstract class Model with _$Model {
factory Model({String a, List<Model> models}) = _Model;
factory Model.fromJson(Map<String, dynamic> json) => _$ModelFromJson(json);
}
main() {
var model = Model(
a: 'hol',
models: [
Model(
a: 'no',
models: const [],
),
],
);
model.copyWith(a: 't'); // => no
}
In the last line copyWith is not accessible - I could, however, use _Model instead
Oh, interesting.
I kinda know why. I'll fix it very soon
Is this closed because it's solved? I have the same issue...
This is fixed, yes.
Most helpful comment
Oh, interesting.
I kinda know why. I'll fix it very soon