Visitar URL original
[RFW] Callout mismatching arguments · Issue #141709 · flutter/flutter · GitHub
Skip to content

[RFW] Callout mismatching arguments #141709

Open

Description

@tugorez

Problem

While writing RFW txt templates it is very easy to misspell arguments or provide ones with the wrong types. Even though typing mismatching can be somewhat handled today in local widgets, we don't give meaningful information to developers about what's missing.

e.g The Icon local widget in core is defined as follows

Icon(
  ArgumentDecoders.iconData(source, []) ?? Icons.flutter_dash,
)

Hence doing something like

widget Foo = Icon(
   // mispelling the arg name
   icn: {...},
   
   // passing the wrong type
   icon: 1,
);

Doesn't notify developers they're doing something wrong.

Activity

  1. added
    package
    p: rfw
    on Jan 17, 2024
  2. Hixie commented on Jan 17, 2024

    @Hixie
    Contributor

    Having a developer-side tool to detect these kinds of errors would be smart. Not sure exactly how to fit it into the current design...

  3. added
    c: new feature
    team-ecosystem
    P3
    triaged-ecosystem
    on Feb 27, 2024
  4. removed their assignment
    on Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3c: new featurep: rfwpackageteam-ecosystemtriaged-ecosystem

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions