Skip to content

Android renderer hotfix#445

Merged
n13 merged 4 commits intomainfrom
android-renderer-fix
Apr 9, 2026
Merged

Android renderer hotfix#445
n13 merged 4 commits intomainfrom
android-renderer-fix

Conversation

@n13
Copy link
Copy Markdown
Collaborator

@n13 n13 commented Apr 9, 2026

Android liquid glass renderer is broken

This replaces it with a fake glass renderer based on the fake renderer inside of the liquid_glass_renderer package

Fix Android rendering artifacts in glass components

The liquid_glass_renderer package uses GPU compositing layers (BackdropFilterLayer) that produce visual artifacts on Android -- tearing in glass buttons and icon buttons disappearing entirely during scroll.

This PR adds AndroidGlass, a pure-widget replacement that replicates the glass specular highlights using standard CustomPaint + ClipRRect, avoiding the problematic compositing layer. LiquidGlassBase now routes to AndroidGlass on Android while keeping the full LiquidGlass effect on iOS.

Changes:

  • liquid_glass_base.dart -- platform gate: iOS uses LiquidGlass, Android uses AndroidGlass
  • android_glass.dart (new) -- self-contained glass widget with specular highlight painter, no dependency on liquid_glass_renderer

Magic number explanation

0x1AFFFFFF isn't magic -- it's just your existing surfaceGlass theme color from app_colors.dart:

        surfaceGlass: const Color(0x1AFFFFFF),
        surfaceCard: const Color(0x0FFFFFFF),

It's white at 10% opacity. We use it as the fallback when callers pass Colors.transparent (the default), since a fully transparent glass wouldn't be visible without the backdrop blur that the real LiquidGlass provides.

n13 added 2 commits April 9, 2026 19:08
fixes severe rendering bugs
took fake glass rendering out of the liquid_glass_package, put it into our own file so we can use it.
format code
stickyAuth: true,
sensitiveTransaction: true,
),
options: const AuthenticationOptions(biometricOnly: false, stickyAuth: true, sensitiveTransaction: true),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny we have this formatting change

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDK i just run melos run format, it did this

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it was wrong before

Copy link
Copy Markdown
Collaborator

@dewabisma dewabisma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found one smell change, please see comment

Copy link
Copy Markdown
Collaborator

@dewabisma dewabisma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superb!

@n13 n13 merged commit cda19fc into main Apr 9, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants