Consider having a `call` method instead of a `run` method in use cases

Open
#61 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
dart

Research direction

The issue names Dart's call method and use-case run calls, but no files or tests. Start by locating the use-case classes and every .run() call site, then confirm the intended scope and compatibility of the API change. Done means the agreed callable-use-case behavior is applied consistently.

Written by the indexing model from the issue text.

Description

If we create a call method in a class, the class becomes callable and we are able to use it like so:

class MyClass {
  void call();
}

final myClass = MyClass();

myClass(); // <——

We could use it with the use cases:

_myUseCase.run(); // instead of this

_myUseCase(); // we will use this.
Dominant language
Dart
Stars
37
Forks
23
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ml-opensource/flutter-template

All issues in ml-opensource/flutter-template

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.