Files
alan 9551eceaed Complete Material-only APIs and fixtures
Remove obsolete control-family flags and icon metadata across all callers, dead alternate themes and host helpers, obsolete test setup, and the unused icon-font dependency. Preserve native Material Back transitions. Make navigation fixtures independent of update plugins and answer auxiliary shell snapshots so the complete application suite can run deterministically.
2026-11-11 21:55:39 +00:00

41 lines
1.4 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/ui/theme/app_theme.dart';
void main() {
test('dark mode is a near-black gray, with lighter layers above it', () {
final scheme = appDarkTheme().colorScheme;
expect(scheme.surface, const Color(0xFF141416));
expect(appDarkTheme().scaffoldBackgroundColor, scheme.surface);
final steps = [
scheme.surface,
scheme.surfaceContainerLow,
scheme.surfaceContainer,
scheme.surfaceContainerHigh,
scheme.surfaceContainerHighest,
].map((color) => color.computeLuminance()).toList();
for (var i = 1; i < steps.length; i++) {
expect(steps[i], greaterThan(steps[i - 1]));
}
});
test('page backgrounds use their Material surface roles', () {
final dark = appDarkTheme();
final light = appLightTheme();
expect(dark.scaffoldBackgroundColor, dark.colorScheme.surface);
expect(light.scaffoldBackgroundColor, light.colorScheme.surface);
expect(dark.colorScheme.surface, isNot(const Color(0xFF000000)));
});
test('Android pages retain native predictive Back in both themes', () {
expect(
appDarkTheme().pageTransitionsTheme.builders[TargetPlatform.android],
isA<PredictiveBackPageTransitionsBuilder>(),
);
expect(
appLightTheme().pageTransitionsTheme.builders[TargetPlatform.android],
isA<PredictiveBackPageTransitionsBuilder>(),
);
});
}