GlassProxy.replace constructor

const GlassProxy.replace({
  1. Key? key,
  2. required Widget child,
  3. required GlassProxyPainter? painter,
})

See GlassProxyRole.replace. child still lays out and still paints into the real frame; only the proxy sees painter instead.

GlassProxy.replace(
  painter: const GradientProxyPainter(LinearGradient(colors: <Color>[Color(0xFF0B3D2E), Color(0xFF6FA8DC)])),
  child: Texture(textureId: cameraTextureId),
)

Implementation

const GlassProxy.replace({super.key, required Widget super.child, required this.painter})
  : role = GlassProxyRole.replace;