Skip to content

Wildcard Exports – Because Typing Every File Name is for Cavemen #60347

@stan-at-work

Description

@stan-at-work

The Struggle is Real

Look, we love Dart, but manually exporting every single file in our project is like sorting our laundry by individual thread count. Painful. Time-consuming. Possibly a form of cruel and unusual punishment.

Wouldn't it be great if we could just do something like this?

export 'src/**/*.dart';  // Just grab everything. Yes, everything.
export 'lib/*';          // Take my files. All of them.
export '**/*.dart';      // Absolute chaos, but in a good way.

Current Reality

Right now, we have to type out every single export like some sort of unpaid intern:

export 'src/models/user.dart';
export 'src/models/post.dart';
export 'src/utils/helper.dart';
export 'src/utils/logger.dart';
export 'src/utils/whyDoIHaveToDoThis.dart';
export 'src/config/constants.dart';
// ...and 500 more files later

This isn't 1995. Computers should be doing the tedious work for us.

Why This is Important

  • Less typing = fewer typos = happier developers
  • More time for actual coding (or pretending to code while scrolling memes)
  • Other languages have this feature; let's not get left behind in the stone age

Conclusion

Please, Dart team, spare our fingers. Let us unleash the power of wildcards and export like true modern developers.

Sincerely,
Every Dev Who’s Ever Had to Manually Export 100+ Files

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions