Content-Length: 297911 | pFad | https://github.com/flutter/flutter/issues/100421

5B generated_main.dart should using alias import · Issue #100421 · flutter/flutter · GitHub
Skip to content

generated_main.dart should using alias import #100421

@ekasetiawans

Description

@ekasetiawans

Use case

Since flutter generate generated_main.dart inside .dart_tool/flutter_build for every plugins that implement dartPluginClass, there was possible issue when two or more different plugins has same dartPluginClass.

Proposal

To avoid conflicts in _PluginRegistrant.register method, we can use alias imports e.g

import 'package:foo/foo.dart' as p1;
import 'package:bar/bar.dart' as p2;
...

then we call registerWith method like this

p1.SomePluginClass.registerWith();
p2.SomePluginClass.registerWith();

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: pluginsSupport for writing, building, and running plugin packagesc: proposalA detailed proposal for a change to Flutterteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/flutter/flutter/issues/100421

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy