Skip to content

Functions should not return dynamic for known return type #603

@guyluz11

Description

@guyluz11

🚀 Feature Requests

Contextualize the feature

There is no reason for functions in the package to return a dynamic variable if the type being returned is constant.
It is bad practice and creates a hard time for the developer, from understanding what type it is to making a safe conversion between the dynamic type and the actual type.

Describe the feature

All of the functions implementations should return a type and not dynamic.
Like:
getDefaultVoice is voiceObject, getVoices List[voiceObject]

Or the lazy option:
isLanguageAvailable is bool, getDefaultVoice is Map<String, String>, getVoices is List<Map<String, String>>.

Platforms affected (mark all that apply)

  • 📱 iOS
  • 🤖 Android

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions