Skip to content

WidgetSpan error in flutter web #42086

@taoszu

Description

@taoszu

the code like this:

{
    final rich = Text.rich(
       TextSpan(
          children: <InlineSpan>[
           TextSpan(text: 'Flutter is'),
           WidgetSpan(
            child: SizedBox(
              width: 120,
                height: 50,
               child: Card(
                 child: Center(
                     child: Text('Hello World!')
                 )
                ),
             )
             ),
             TextSpan(text: 'the best!'),
         ],
         )
      );

    return Scaffold(
        body: SingleChildScrollView(
          padding: EdgeInsets.all(12),
      child: rich,
    ));
  }

in the mobile platform, it is right. But, run with web, it is error,

error message:

The following NoSuchMethodError was thrown during performLayout():
js_primitives.dart:30 ''
js_primitives.dart:30 method not found
js_primitives.dart:30 Receiver: null
js_primitives.dart:30 Arguments: []

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: typographyText rendering, possibly libtxtc: crashStack traces logged to the consolec: parityWorks on one platform but not anotherengineflutter/engine related. See also e: labels.found in release: 1.21Found to occur in 1.21platform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions