It is possible to rename "lib" directory of local Dart dependency without imports breaking?

Viewed 36

My Dart project consists from the three modules:

  • BusinessRules - obviously, the business rules
  • Client - client application
  • Server - serve application

enter image description here

Both Client and Server depends on BusinessRules. Currently the BusinessRules has two classes: Task and User:

enter image description here

The Task could be imported to Server project as:

import "package:business_rules/Enterprise/Task.dart";

If to set aside the guidelines during this question, can I rename the lib directory in BusinessRules without loss of visibility of this class and application crash? I suppose some setup will required - it's O'K.

Important point

  • None of these packages will be published as library.
  • I know that valid Dart package name could not include the uppercase symbols (so, the BusinessRules called business_rules in it's pubspec.yaml). However, I reserve the right to name the directories as I want.
0 Answers
Related