ml-opensource / ml-opensource/flutter-template

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.

Dominant language
Dart
Stars
37
Forks
23
PR merge metrics
No merged PRs in 30d

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.

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.

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.