Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlatformIconButton in PlatformTabScaffold's trailingActions not using actionsIconTheme IconThemeData #458

Open
martin-braun opened this issue May 20, 2024 · 0 comments

Comments

@martin-braun
Copy link

In my theme, I have:

      appBarTheme: base.appBarTheme.copyWith(
        backgroundColor: colorScheme.primary,
        titleTextStyle: textTheme.displaySmall!.copyWith(
          color: colorScheme.onPrimary,
        ),
        centerTitle: false,
        titleSpacing: textTheme.displaySmall!.fontSize! / 4,
        actionsIconTheme: IconThemeData(
          color: envPrimaryContrastColor,
          size: textTheme.displaySmall!.fontSize,
          applyTextScaling: true,
        ),
      ),

Then within my HomeScreen:

  Widget build(BuildContext context) {
    return PlatformTabScaffold(
      appBarBuilder: (_, index) => PlatformAppBar(
        title: Text(widget.title),
        trailingActions: [
          IconButton(
            icon: const Icon(Icons.signal_cellular_alt),
            onPressed: () {},
          ),
        ],
// ...

This works:

image

However, when using the PlatformIconButton:

  Widget build(BuildContext context) {
    return PlatformTabScaffold(
      appBarBuilder: (_, index) => PlatformAppBar(
        title: Text(widget.title),
        trailingActions: [
          PlatformIconButton(
            icon: const Icon(Icons.signal_cellular_alt),
          ),
        ],
// ...

It does not work:

image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant