Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for library classes #14

Closed
theEvilReaper opened this issue May 2, 2023 · 0 comments · Fixed by #16
Closed

Add support for library classes #14

theEvilReaper opened this issue May 2, 2023 · 0 comments · Fixed by #16
Assignees
Labels
enhancement New feature or request feature
Milestone

Comments

@theEvilReaper
Copy link
Owner

theEvilReaper commented May 2, 2023

Dart allows the creation of library classes. A library class can help to minimize tight coupling and make maintainable code.
In terms of library classes, the part of directive is important. These allow other classes etc. to be included in the library without them being in the library file.

An example of a library may look like this:

Library class:

library test;

import 'dart:core' as core;
import '../test.dart';

Small class

part of test;

class Test {
  bool notZero(int value) {
    return value != 0;
  }
}

Small side node: There is no good explaination from the Dart wiki itself about library classes

@theEvilReaper theEvilReaper self-assigned this May 2, 2023
@theEvilReaper theEvilReaper converted this from a draft issue May 2, 2023
@theEvilReaper theEvilReaper added enhancement New feature or request feature labels May 2, 2023
@theEvilReaper theEvilReaper added this to the v1.0.0 milestone May 2, 2023
@theEvilReaper theEvilReaper linked a pull request May 2, 2023 that will close this issue
7 tasks
@github-project-automation github-project-automation bot moved this from In Progress to Done in v0.5.0 May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant