المجلدات وأسماء حزم dart واستيراداتها: siro_rider → intaleq_rider siro_driver → intaleq_driver siro_admin → intaleq_admin siro_service → intaleq_service شمل ذلك `name:` في كل pubspec وكل `package:siro_*` في الاستيرادات (115 ملفاً في rider وحده)، وإشارات أسماء المجلدات في docs/ وتعليق في backend/Admin/notifications/broadcast.php. لم تبقَ إشارة واحدة (تحقّقت). + ضُمّت حزم get و get_storage داخل intaleq_driver/packages/ وحُوّلت مساراتها الثلاثة من `../../Intaleq/packages/*` إلى `./packages/*`. كانت تُحل عرضاً إلى مجلد App/Intaleq القديم المجاور — تبعية خارج المستودع تنكسر بأول نقل. لم يبقَ في أي تطبيق تبعية مسار خارج الشجرة. ⚠️ لم تُمسّ بعد: هويات المتاجر (applicationId · PRODUCT_BUNDLE_IDENTIFIER · shorebird app_id) ولا الألوان ولا النصوص المرئية ولا النطاقات — كل منها كوميت منفصل، والهويات تحتاج قرار المالك. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
78 lines
1.7 KiB
Dart
78 lines
1.7 KiB
Dart
import 'package:flutter/widgets.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
import 'utils/wrapper.dart';
|
|
|
|
void main() {
|
|
testWidgets("Test dispose dependencies with unnamed routes", (tester) async {
|
|
await tester.pumpWidget(
|
|
Wrapper(child: Container()),
|
|
);
|
|
|
|
expect(Get.isRegistered<Controller2>(), false);
|
|
expect(Get.isRegistered<Controller>(), false);
|
|
|
|
Get.to(const First());
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(find.byType(First), findsOneWidget);
|
|
|
|
expect(Get.isRegistered<Controller>(), true);
|
|
|
|
Get.to(const Second());
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(find.byType(Second), findsOneWidget);
|
|
|
|
expect(Get.isRegistered<Controller>(), true);
|
|
expect(Get.isRegistered<Controller2>(), true);
|
|
|
|
Get.back();
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(find.byType(First), findsOneWidget);
|
|
|
|
expect(Get.isRegistered<Controller>(), true);
|
|
expect(Get.isRegistered<Controller2>(), false);
|
|
|
|
Get.back();
|
|
|
|
await tester.pumpAndSettle();
|
|
|
|
expect(Get.isRegistered<Controller>(), false);
|
|
expect(Get.isRegistered<Controller2>(), false);
|
|
});
|
|
}
|
|
|
|
class Controller extends GetxController {}
|
|
|
|
class Controller2 extends GetxController {}
|
|
|
|
class First extends StatelessWidget {
|
|
const First({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Get.put(Controller());
|
|
return const Center(
|
|
child: Text("first"),
|
|
);
|
|
}
|
|
}
|
|
|
|
class Second extends StatelessWidget {
|
|
const Second({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Get.put(Controller2());
|
|
return const Center(
|
|
child: Text("second"),
|
|
);
|
|
}
|
|
}
|