useOwnLayer property

bool useOwnLayer
final

Whether to create its own layer or use grouped glass within an existing layer.

  • false (default): Uses LiquidGlass.grouped, must be inside a LiquidGlassLayer. This is more performant when you have multiple glass elements that can share the same rendering context.

  • true: Uses LiquidGlass.withOwnLayer, can be used anywhere. Creates an independent glass rendering context for this button.

Defaults to false.

Implementation

final bool useOwnLayer;