mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-23 21:13:35 +00:00
feat: enable CherryPick cycle detection in debug mode and use safe root scope
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
import 'package:cherrypick/cherrypick.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:postly/app.dart';
|
||||
import 'di/app_module.dart';
|
||||
|
||||
void main() {
|
||||
// Включаем cycle-detection только в debug/test
|
||||
if (kDebugMode) {
|
||||
CherryPick.enableGlobalCycleDetection();
|
||||
CherryPick.enableGlobalCrossScopeCycleDetection();
|
||||
}
|
||||
|
||||
// Используем safe root scope для гарантии защиты
|
||||
CherryPick.openRootScope().installModules([$AppModule()]);
|
||||
runApp(MyApp());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user