Skip to content

The Component for the onInit callback does not have a name. #428

@xSILENCEx

Description

@xSILENCEx

Description

The Component for the onInit callback does not have a name.

Steps To Reproduce

Steps to reproduce the behavior:

SizedBox(
  width: 200,
  height: 200,
  child: RiveAnimation.asset(
    'assets/rive/test3.riv',
    artboard: 'Artboard',
    animations: const ['Timeline 1'],
    onInit: (artboard) {
      artboard.forEachComponent(
        (child) {
          print(child.toString());
        },
      );
    },
  ),
),

No name in the output:

flutter: Instance of 'Shape' (1) ->
flutter: Instance of 'Rectangle' (2) ->
flutter: Instance of 'SolidColor' (3) ->
flutter: Instance of 'LayoutComponentStyle' (4) ->
flutter: Instance of 'SolidColor' (5) ->
flutter: Instance of 'Fill' (6) ->
flutter: Instance of 'Fill' (7) ->

Source .riv/.rev file

test3.riv.zip

Expected behavior

flutter: Instance of 'Shape' (1) -> name
flutter: Instance of 'Rectangle' (2) -> name
flutter: Instance of 'SolidColor' (3) -> name
flutter: Instance of 'LayoutComponentStyle' (4) -> name
flutter: Instance of 'SolidColor' (5) -> name
flutter: Instance of 'Fill' (6) -> name
flutter: Instance of 'Fill' (7) -> name

Screenshots

iShot_2024-10-21_16 06 30

Device & Versions (please complete the following information)

  • Device: [iPhone11 ,MacOS]
  • OS: [iOS 17.6.1, MacOS 15.0.1]
  • Flutter Version: Copy-paste the output of flutter --version
Flutter 3.24.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2663184aa7 (6 weeks ago) • 2024-09-11 16:27:48 -0500
Engine • revision 36335019a8
Tools • Dart 3.5.3 • DevTools 2.37.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions