dart_mappable icon indicating copy to clipboard operation
dart_mappable copied to clipboard

[Feature request] MappableField to work on Mixins or interfaces

Open AhmedLSayed9 opened this issue 1 year ago • 0 comments
trafficstars

i.e:

mixin FooMixin {
  @MappableField(key: 'some_new_key')
  String get some;
}

@MappableClass()
class Foo with FooMixin, FooMappable {
  const Foo({
    required this.some,
  });

  @override
  final String some;
}

or

abstract class FooInterface {
  SomeInterface({
    @MappableField(key: 'some_new_key') required this.some,
  });

  final String some;
}

@MappableClass()
class Foo with FooMappable implements FooInterface {
  const Foo({
    required this.some,
  });

  @override
  final String some;
}

AhmedLSayed9 avatar Oct 31 '24 17:10 AhmedLSayed9