Skip to content

Selection Handle Color #35

Description

@TEGRAXD

I'm having an issue that using styled toast globally, this widget changing selection handle (droplet-like shape cursor under selected text) color that does not match with app theme. Yet StyledToast does not have option to changing its theme.

return StyledToast(
      locale: const Locale('en', 'US'),
      toastAnimation: StyledToastAnimation.slideFromTopFade,
      reverseAnimation: StyledToastAnimation.slideToTopFade,
      animDuration: const Duration(milliseconds: 350),
      duration: const Duration(milliseconds: 2500),
      child: MaterialApp(
      // ...
);

While changing textSelectionTheme or cupertinoOverrideTheme in ThemeData.textSelectionTheme will not fix this issue.

theme: ThemeData(
          colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
          textSelectionTheme: TextSelectionThemeData(
            // ...
            selectionHandleColor: Colors.red,
          ),
          cupertinoOverrideTheme: CupertinoThemeData(
            primaryColor: Colors.red,
          ),
        ),
        // ...

Expected Output

Color of the selection handle match with app theme color. (Dark blue)

Actual Output

Color of the selection handle changed to purple.
image

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