Skip to content

Throws a 'Null check operator used on a null value' exception when the text is an Arabic letters or numbers #6

Open
@devmuaz

Description

@devmuaz

Hi @deniscolak how are you,
I recently had this exception when I attempted to use it with Arabic letters or even numbers, I couldn't figure it out until I removed the Arabic letters and worked just fine.

Here's a sample:

Code:

class TestApp extends StatelessWidget {
  const TestApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('اهلا'),
      ),
      body: Center(
        child: TextAvatar(
          text: 'مرحبا',
          shape: Shape.Circular,
          upperCase: true,
        ),
      ),
    );
  }
}

Exception:

════════ Exception caught by widgets library ═══════════════════════════════════

The following _CastError was thrown building TextAvatar(dirty):

Null check operator used on a null value

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