mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-27 14:44:00 +01:00
Flutter 3.50 deprecates its built-in Material and Cupertino libraries in favour of the material_ui and cupertino_ui packages. The imports move with the official fix (dart fix, migrate_design_widgets); the app's old two-library theme bridge collapses into one Theme type. - MaterialExpressiveScope keeps the complete host theme nearest its child. The reduced copy made for the expressive widgets now shares the app's Theme type and would hide component themes and extensions. - LegacyThemeBrightness hands the brightness to the glass package, which still reads Flutter's built-in theme. - appLocalizationsDelegates lists the material_ui localization delegates; the generated list still names the built-in ones. - Tests: findByTooltip and pageBack replace the flutter_test helpers that only know the built-in widgets, and several tests that had gone stale against earlier app changes are repaired.
24 lines
746 B
Dart
24 lines
746 B
Dart
import 'package:cupertino_ui/cupertino_ui.dart'
|
|
show CupertinoNavigationBarBackButton;
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
import 'tooltip_finder.dart';
|
|
|
|
/// Taps the back button, as `tester.pageBack()` does.
|
|
///
|
|
/// `pageBack()` only knows the back buttons of Flutter's built-in Material
|
|
/// and Cupertino libraries, so it misses the `material_ui` and `cupertino_ui`
|
|
/// ones the app builds.
|
|
Future<void> pageBack(WidgetTester tester) async {
|
|
var backButton = findByTooltip('Back');
|
|
if (backButton.evaluate().isEmpty) {
|
|
backButton = find.byType(CupertinoNavigationBarBackButton);
|
|
}
|
|
expect(
|
|
backButton,
|
|
findsOneWidget,
|
|
reason: 'One back button expected on screen',
|
|
);
|
|
await tester.tap(backButton);
|
|
}
|