glass_testing library

Widget-test support for apps that use adaptive_liquid_glass.

Under flutter test the package's shaders do not load and the iOS plugin is absent, so the rendering path depends on the host machine. GlassTesting pins it:

import 'package:adaptive_liquid_glass/glass_testing.dart';

setUp(() => GlassTesting.setUp(iosMajorVersion: 18));
tearDown(GlassTesting.reset);

testWidgets('shows the glass button', (tester) async {
  ...
}, variant: TargetPlatformVariant.only(TargetPlatform.iOS));

Classes

GlassTesting
Pins the device facts the package reads, for widget tests.