Skip to content

can't correctly generate code if another file is imported with prefix #14

@miklcct

Description

@miklcct

Example

foo.dart

import 'package:morphy_annotation/morphy_annotation.dart';

import 'bar.dart' as bar;

part 'foo.g.dart';
part 'foo.morphy.dart';

@Morphy(generateJson: true)
abstract class $Foo {
    bar.$Bar get bar;
}

bar.dart

import 'package:morphy_annotation/morphy_annotation.dart';

part 'bar.g.dart';
part 'bar.morphy.dart';

@Morphy(generateJson: true)
abstract class $Bar {
    int get value;
}

The generated code misses the prefix so it doesn't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions