Files
buzz/mobile/test/shared/theme/utility_surface_theme_test.dart
klopez4212 ed11c8d8bf Refresh mobile utility surfaces and theme picker (#6944)
## Summary

- invert mobile utility surfaces so pages and sheets use the softer page
background with raised containers
- rebuild the community theme picker around swipeable Home/Chat
previews, accent and appearance controls, and native iOS glass
interactions
- align shared sheet/profile spacing and radii, and move Theme into the
Community settings card

### Related issue

None found.

### Testing

- `just mobile-check`
- `just mobile-test` (1,871 tests)
- signed iOS Release build installed on a physical iPhone

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: Kenny Lopez <klopez4212@gmail.com>
Signed-off-by: Princess Donut <b238ea756dee4d98afa5883fc7f1de61eeabe65bf700e3a5a5a80db5e42e2c2b@buzz.block.builderlab.xyz>
Co-authored-by: Princess Donut <b238ea756dee4d98afa5883fc7f1de61eeabe65bf700e3a5a5a80db5e42e2c2b@buzz.block.builderlab.xyz>
2026-08-28 18:56:42 +01:00

47 lines
1.6 KiB
Dart

import 'package:buzz/shared/theme/theme.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
test('utility containers use the stronger grouped-surface radius', () {
expect(Radii.container, 22);
expect(Radii.card, Radii.container);
});
test('exchanges utility canvas and container surface roles once', () {
const pageSurface = Color(0xFFEEEEEE);
const containerSurface = Color(0xFFFFFFFF);
final base = AppTheme.light(
colorScheme: lightColorScheme.copyWith(
surface: containerSurface,
surfaceContainerHighest: pageSurface,
),
);
final utility = utilitySurfaceThemeData(base);
expect(utility.scaffoldBackgroundColor, pageSurface);
expect(utility.colorScheme.surface, pageSurface);
expect(utility.colorScheme.surfaceContainerHighest, containerSurface);
expect(utility.cardTheme.color, containerSurface);
expect(
(utility.cardTheme.shape! as RoundedRectangleBorder).borderRadius,
BorderRadius.circular(Radii.container),
);
for (final border in [
utility.inputDecorationTheme.border,
utility.inputDecorationTheme.enabledBorder,
utility.inputDecorationTheme.focusedBorder,
utility.inputDecorationTheme.errorBorder,
utility.inputDecorationTheme.focusedErrorBorder,
]) {
expect(
(border! as OutlineInputBorder).borderRadius,
BorderRadius.circular(Radii.container),
);
}
expect(utility.bottomSheetTheme.backgroundColor, pageSurface);
expect(utilitySurfaceThemeData(utility), same(utility));
});
}