| 
									
										
										
										
											2023-11-25 01:18:31 -08:00
										 |  |  | import 'dart:async'; | 
					
						
							| 
									
										
										
										
											2022-02-19 23:19:33 +08:00
										 |  |  | import 'dart:io'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-29 12:55:13 -08:00
										 |  |  | import 'package:appflowy/env/cloud_env.dart'; | 
					
						
							| 
									
										
										
										
											2023-07-02 23:37:30 +08:00
										 |  |  | import 'package:appflowy/workspace/application/settings/prelude.dart'; | 
					
						
							| 
									
										
										
										
											2023-01-08 12:10:53 +08:00
										 |  |  | import 'package:appflowy_backend/appflowy_backend.dart'; | 
					
						
							| 
									
										
										
										
											2022-02-20 09:58:25 +08:00
										 |  |  | import 'package:flutter/foundation.dart'; | 
					
						
							| 
									
										
										
										
											2021-06-19 23:41:19 +08:00
										 |  |  | import 'package:flutter/material.dart'; | 
					
						
							|  |  |  | import 'package:get_it/get_it.dart'; | 
					
						
							| 
									
										
										
										
											2024-01-03 11:41:29 +08:00
										 |  |  | import 'package:package_info_plus/package_info_plus.dart'; | 
					
						
							| 
									
										
										
										
											2022-12-20 11:14:42 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | import 'deps_resolver.dart'; | 
					
						
							| 
									
										
										
										
											2023-08-17 23:46:39 +08:00
										 |  |  | import 'entry_point.dart'; | 
					
						
							| 
									
										
										
										
											2022-12-20 11:14:42 +08:00
										 |  |  | import 'launch_configuration.dart'; | 
					
						
							|  |  |  | import 'plugin/plugin.dart'; | 
					
						
							|  |  |  | import 'tasks/prelude.dart'; | 
					
						
							| 
									
										
										
										
											2021-06-19 23:41:19 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | final getIt = GetIt.instance; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-12 22:19:59 +08:00
										 |  |  | abstract class EntryPoint { | 
					
						
							| 
									
										
										
										
											2022-12-20 11:14:42 +08:00
										 |  |  |   Widget create(LaunchConfiguration config); | 
					
						
							| 
									
										
										
										
											2021-06-19 23:41:19 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-02 23:37:30 +08:00
										 |  |  | class FlowyRunnerContext { | 
					
						
							|  |  |  |   final Directory applicationDataDirectory; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   FlowyRunnerContext({required this.applicationDataDirectory}); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-12-26 02:03:42 +08:00
										 |  |  | Future<void> runAppFlowy({bool isAnon = false}) async { | 
					
						
							|  |  |  |   if (kReleaseMode) { | 
					
						
							|  |  |  |     await FlowyRunner.run( | 
					
						
							|  |  |  |       AppFlowyApplication(), | 
					
						
							|  |  |  |       integrationMode(), | 
					
						
							|  |  |  |       isAnon: isAnon, | 
					
						
							|  |  |  |     ); | 
					
						
							|  |  |  |   } else { | 
					
						
							|  |  |  |     // When running the app in integration test mode, we need to
 | 
					
						
							|  |  |  |     // specify the mode to run the app again.
 | 
					
						
							|  |  |  |     await FlowyRunner.run( | 
					
						
							|  |  |  |       AppFlowyApplication(), | 
					
						
							|  |  |  |       FlowyRunner.currentMode, | 
					
						
							|  |  |  |       didInitGetItCallback: IntegrationTestHelper.didInitGetItCallback, | 
					
						
							|  |  |  |       rustEnvsBuilder: IntegrationTestHelper.rustEnvsBuilder, | 
					
						
							|  |  |  |       isAnon: isAnon, | 
					
						
							|  |  |  |     ); | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2023-08-17 23:46:39 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-20 16:10:50 +08:00
										 |  |  | class FlowyRunner { | 
					
						
							| 
									
										
										
										
											2023-12-26 02:03:42 +08:00
										 |  |  |   // This variable specifies the initial mode of the app when it is launched for the first time.
 | 
					
						
							|  |  |  |   // The same mode will be automatically applied in subsequent executions when the runAppFlowy()
 | 
					
						
							|  |  |  |   // method is called.
 | 
					
						
							| 
									
										
										
										
											2023-11-27 18:54:31 -08:00
										 |  |  |   static var currentMode = integrationMode(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-02 23:37:30 +08:00
										 |  |  |   static Future<FlowyRunnerContext> run( | 
					
						
							| 
									
										
										
										
											2023-06-15 22:43:07 +08:00
										 |  |  |     EntryPoint f, | 
					
						
							|  |  |  |     IntegrationMode mode, { | 
					
						
							| 
									
										
										
										
											2023-11-27 18:54:31 -08:00
										 |  |  |     // This callback is triggered after the initialization of 'getIt',
 | 
					
						
							|  |  |  |     // which is used for dependency injection throughout the app.
 | 
					
						
							|  |  |  |     // If your functionality depends on 'getIt', ensure to register
 | 
					
						
							|  |  |  |     // your callback here to execute any necessary actions post-initialization.
 | 
					
						
							| 
									
										
										
										
											2023-11-28 15:49:47 -08:00
										 |  |  |     Future Function()? didInitGetItCallback, | 
					
						
							| 
									
										
										
										
											2023-11-27 18:54:31 -08:00
										 |  |  |     // Passing the envs to the backend
 | 
					
						
							|  |  |  |     Map<String, String> Function()? rustEnvsBuilder, | 
					
						
							|  |  |  |     // Indicate whether the app is running in anonymous mode.
 | 
					
						
							|  |  |  |     // Note: when the app is running in anonymous mode, the user no need to
 | 
					
						
							|  |  |  |     // sign in, and the app will only save the data in the local storage.
 | 
					
						
							|  |  |  |     bool isAnon = false, | 
					
						
							| 
									
										
										
										
											2022-12-20 11:14:42 +08:00
										 |  |  |   }) async { | 
					
						
							| 
									
										
										
										
											2023-11-27 18:54:31 -08:00
										 |  |  |     currentMode = mode; | 
					
						
							| 
									
										
										
										
											2023-12-26 02:03:42 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Only set the mode when it's not release mode
 | 
					
						
							|  |  |  |     if (!kReleaseMode) { | 
					
						
							|  |  |  |       IntegrationTestHelper.didInitGetItCallback = didInitGetItCallback; | 
					
						
							|  |  |  |       IntegrationTestHelper.rustEnvsBuilder = rustEnvsBuilder; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-20 11:14:42 +08:00
										 |  |  |     // Clear all the states in case of rebuilding.
 | 
					
						
							|  |  |  |     await getIt.reset(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-27 18:54:31 -08:00
										 |  |  |     final config = LaunchConfiguration( | 
					
						
							|  |  |  |       isAnon: isAnon, | 
					
						
							|  |  |  |       rustEnvs: rustEnvsBuilder?.call() ?? {}, | 
					
						
							|  |  |  |     ); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-03 11:41:29 +08:00
										 |  |  |     if (!mode.isUnitTest) { | 
					
						
							|  |  |  |       // Unit test can't use the package_info_plus plugin
 | 
					
						
							|  |  |  |       config.rustEnvs["APP_VERSION"] = | 
					
						
							|  |  |  |           await PackageInfo.fromPlatform().then((value) => value.version); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2021-11-19 10:23:58 +03:00
										 |  |  |     // Specify the env
 | 
					
						
							| 
									
										
										
										
											2023-11-24 11:54:47 +08:00
										 |  |  |     await initGetIt(getIt, mode, f, config); | 
					
						
							| 
									
										
										
										
											2023-11-28 15:49:47 -08:00
										 |  |  |     await didInitGetItCallback?.call(); | 
					
						
							| 
									
										
										
										
											2023-11-25 01:18:31 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-02 23:37:30 +08:00
										 |  |  |     final applicationDataDirectory = | 
					
						
							|  |  |  |         await getIt<ApplicationDataStorage>().getPath().then( | 
					
						
							|  |  |  |               (value) => Directory(value), | 
					
						
							|  |  |  |             ); | 
					
						
							| 
									
										
										
										
											2023-05-21 18:53:59 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-06-19 23:41:19 +08:00
										 |  |  |     // add task
 | 
					
						
							| 
									
										
										
										
											2023-05-17 11:03:33 +08:00
										 |  |  |     final launcher = getIt<AppLauncher>(); | 
					
						
							|  |  |  |     launcher.addTasks( | 
					
						
							|  |  |  |       [ | 
					
						
							| 
									
										
										
										
											2023-07-09 10:03:22 +07:00
										 |  |  |         // this task should be first task, for handling platform errors.
 | 
					
						
							|  |  |  |         // don't catch errors in test mode
 | 
					
						
							|  |  |  |         if (!mode.isUnitTest) const PlatformErrorCatcherTask(), | 
					
						
							| 
									
										
										
										
											2023-11-26 15:10:48 +08:00
										 |  |  |         // this task should be second task, for handling memory leak.
 | 
					
						
							|  |  |  |         // there's a flag named _enable in memory_leak_detector.dart. If it's false, the task will be ignored.
 | 
					
						
							|  |  |  |         MemoryLeakDetectorTask(), | 
					
						
							| 
									
										
										
										
											2023-12-27 11:11:14 +08:00
										 |  |  |         const DebugTask(), | 
					
						
							| 
									
										
										
										
											2024-01-11 13:26:25 +07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-17 11:03:33 +08:00
										 |  |  |         // localization
 | 
					
						
							|  |  |  |         const InitLocalizationTask(), | 
					
						
							|  |  |  |         // init the app window
 | 
					
						
							|  |  |  |         const InitAppWindowTask(), | 
					
						
							|  |  |  |         // Init Rust SDK
 | 
					
						
							| 
									
										
										
										
											2023-11-20 20:54:47 +08:00
										 |  |  |         InitRustSDKTask(customApplicationPath: applicationDataDirectory), | 
					
						
							| 
									
										
										
										
											2023-05-17 11:03:33 +08:00
										 |  |  |         // Load Plugins, like document, grid ...
 | 
					
						
							|  |  |  |         const PluginLoadTask(), | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         // init the app widget
 | 
					
						
							|  |  |  |         // ignore in test mode
 | 
					
						
							| 
									
										
										
										
											2023-07-02 23:37:30 +08:00
										 |  |  |         if (!mode.isUnitTest) ...[ | 
					
						
							| 
									
										
										
										
											2024-01-11 13:26:25 +07:00
										 |  |  |           // The DeviceOrApplicationInfoTask should be placed before the AppWidgetTask to fetch the app information.
 | 
					
						
							|  |  |  |           // It is unable to get the device information from the test environment.
 | 
					
						
							|  |  |  |           const DeviceOrApplicationInfoTask(), | 
					
						
							| 
									
										
										
										
											2023-05-17 11:03:33 +08:00
										 |  |  |           const HotKeyTask(), | 
					
						
							| 
									
										
										
										
											2023-11-29 12:55:13 -08:00
										 |  |  |           if (isSupabaseEnabled) InitSupabaseTask(), | 
					
						
							|  |  |  |           if (isAppFlowyCloudEnabled) InitAppFlowyCloudTask(), | 
					
						
							| 
									
										
										
										
											2023-05-17 11:03:33 +08:00
										 |  |  |           const InitAppWidgetTask(), | 
					
						
							| 
									
										
										
										
											2023-11-14 22:33:07 +08:00
										 |  |  |           const InitPlatformServiceTask(), | 
					
						
							| 
									
										
										
										
											2023-05-17 11:03:33 +08:00
										 |  |  |         ], | 
					
						
							|  |  |  |       ], | 
					
						
							|  |  |  |     ); | 
					
						
							|  |  |  |     await launcher.launch(); // execute the tasks
 | 
					
						
							| 
									
										
										
										
											2023-07-02 23:37:30 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     return FlowyRunnerContext( | 
					
						
							|  |  |  |       applicationDataDirectory: applicationDataDirectory, | 
					
						
							|  |  |  |     ); | 
					
						
							| 
									
										
										
										
											2021-06-19 23:41:19 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2021-10-11 13:15:41 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | Future<void> initGetIt( | 
					
						
							|  |  |  |   GetIt getIt, | 
					
						
							| 
									
										
										
										
											2023-08-22 15:40:22 +08:00
										 |  |  |   IntegrationMode mode, | 
					
						
							| 
									
										
										
										
											2022-02-20 08:35:52 +08:00
										 |  |  |   EntryPoint f, | 
					
						
							| 
									
										
										
										
											2022-12-20 11:14:42 +08:00
										 |  |  |   LaunchConfiguration config, | 
					
						
							| 
									
										
										
										
											2021-10-11 13:15:41 +08:00
										 |  |  | ) async { | 
					
						
							| 
									
										
										
										
											2022-02-20 08:35:52 +08:00
										 |  |  |   getIt.registerFactory<EntryPoint>(() => f); | 
					
						
							| 
									
										
										
										
											2023-12-27 11:42:39 +08:00
										 |  |  |   getIt.registerLazySingleton<FlowySDK>( | 
					
						
							|  |  |  |     () { | 
					
						
							|  |  |  |       return FlowySDK(); | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     dispose: (sdk) async { | 
					
						
							|  |  |  |       await sdk.dispose(); | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   ); | 
					
						
							| 
									
										
										
										
											2022-12-20 11:14:42 +08:00
										 |  |  |   getIt.registerLazySingleton<AppLauncher>( | 
					
						
							|  |  |  |     () => AppLauncher( | 
					
						
							|  |  |  |       context: LaunchContext( | 
					
						
							|  |  |  |         getIt, | 
					
						
							| 
									
										
										
										
											2023-08-22 15:40:22 +08:00
										 |  |  |         mode, | 
					
						
							| 
									
										
										
										
											2022-12-20 11:14:42 +08:00
										 |  |  |         config, | 
					
						
							|  |  |  |       ), | 
					
						
							|  |  |  |     ), | 
					
						
							| 
									
										
										
										
											2023-10-24 23:13:51 +08:00
										 |  |  |     dispose: (launcher) async { | 
					
						
							|  |  |  |       await launcher.dispose(); | 
					
						
							|  |  |  |     }, | 
					
						
							| 
									
										
										
										
											2022-12-20 11:14:42 +08:00
										 |  |  |   ); | 
					
						
							| 
									
										
										
										
											2022-02-28 22:38:53 +08:00
										 |  |  |   getIt.registerSingleton<PluginSandbox>(PluginSandbox()); | 
					
						
							| 
									
										
										
										
											2021-10-11 13:15:41 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-22 15:40:22 +08:00
										 |  |  |   await DependencyResolver.resolve(getIt, mode); | 
					
						
							| 
									
										
										
										
											2021-10-11 13:15:41 +08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2022-02-19 13:52:52 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | class LaunchContext { | 
					
						
							|  |  |  |   GetIt getIt; | 
					
						
							| 
									
										
										
										
											2022-02-20 16:34:15 +08:00
										 |  |  |   IntegrationMode env; | 
					
						
							| 
									
										
										
										
											2022-12-20 11:14:42 +08:00
										 |  |  |   LaunchConfiguration config; | 
					
						
							|  |  |  |   LaunchContext(this.getIt, this.env, this.config); | 
					
						
							| 
									
										
										
										
											2022-02-19 13:52:52 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | enum LaunchTaskType { | 
					
						
							|  |  |  |   dataProcessing, | 
					
						
							|  |  |  |   appLauncher, | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /// The interface of an app launch task, which will trigger
 | 
					
						
							|  |  |  | /// some nonresident indispensable task in app launching task.
 | 
					
						
							|  |  |  | abstract class LaunchTask { | 
					
						
							| 
									
										
										
										
											2023-05-17 11:03:33 +08:00
										 |  |  |   const LaunchTask(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-19 13:52:52 +08:00
										 |  |  |   LaunchTaskType get type => LaunchTaskType.dataProcessing; | 
					
						
							| 
									
										
										
										
											2023-05-17 11:03:33 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-19 13:52:52 +08:00
										 |  |  |   Future<void> initialize(LaunchContext context); | 
					
						
							| 
									
										
										
										
											2023-10-24 23:13:51 +08:00
										 |  |  |   Future<void> dispose(); | 
					
						
							| 
									
										
										
										
											2022-02-19 13:52:52 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class AppLauncher { | 
					
						
							| 
									
										
										
										
											2023-05-17 11:03:33 +08:00
										 |  |  |   AppLauncher({ | 
					
						
							|  |  |  |     required this.context, | 
					
						
							|  |  |  |   }); | 
					
						
							| 
									
										
										
										
											2022-02-19 13:52:52 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-20 11:14:42 +08:00
										 |  |  |   final LaunchContext context; | 
					
						
							| 
									
										
										
										
											2023-05-17 11:03:33 +08:00
										 |  |  |   final List<LaunchTask> tasks = []; | 
					
						
							| 
									
										
										
										
											2022-02-19 13:52:52 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   void addTask(LaunchTask task) { | 
					
						
							|  |  |  |     tasks.add(task); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-17 11:03:33 +08:00
										 |  |  |   void addTasks(Iterable<LaunchTask> tasks) { | 
					
						
							|  |  |  |     this.tasks.addAll(tasks); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-19 17:12:44 +08:00
										 |  |  |   Future<void> launch() async { | 
					
						
							| 
									
										
										
										
											2023-05-17 11:03:33 +08:00
										 |  |  |     for (final task in tasks) { | 
					
						
							| 
									
										
										
										
											2022-02-19 13:52:52 +08:00
										 |  |  |       await task.initialize(context); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2023-10-24 23:13:51 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   Future<void> dispose() async { | 
					
						
							|  |  |  |     for (final task in tasks) { | 
					
						
							|  |  |  |       await task.dispose(); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     tasks.clear(); | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2022-02-19 13:52:52 +08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2022-02-19 23:19:33 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-20 16:34:15 +08:00
										 |  |  | enum IntegrationMode { | 
					
						
							| 
									
										
										
										
											2022-02-19 23:19:33 +08:00
										 |  |  |   develop, | 
					
						
							|  |  |  |   release, | 
					
						
							| 
									
										
										
										
											2023-07-02 23:37:30 +08:00
										 |  |  |   unitTest, | 
					
						
							|  |  |  |   integrationTest; | 
					
						
							| 
									
										
										
										
											2022-02-19 23:19:33 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-02 23:37:30 +08:00
										 |  |  |   // test mode
 | 
					
						
							|  |  |  |   bool get isTest => isUnitTest || isIntegrationTest; | 
					
						
							|  |  |  |   bool get isUnitTest => this == IntegrationMode.unitTest; | 
					
						
							|  |  |  |   bool get isIntegrationTest => this == IntegrationMode.integrationTest; | 
					
						
							| 
									
										
										
										
											2023-06-15 22:43:07 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-02 23:37:30 +08:00
										 |  |  |   // release mode
 | 
					
						
							|  |  |  |   bool get isRelease => this == IntegrationMode.release; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // develop mode
 | 
					
						
							|  |  |  |   bool get isDevelop => this == IntegrationMode.develop; | 
					
						
							| 
									
										
										
										
											2022-02-19 23:19:33 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-22 15:40:22 +08:00
										 |  |  | IntegrationMode integrationMode() { | 
					
						
							| 
									
										
										
										
											2022-02-19 23:19:33 +08:00
										 |  |  |   if (Platform.environment.containsKey('FLUTTER_TEST')) { | 
					
						
							| 
									
										
										
										
											2023-07-02 23:37:30 +08:00
										 |  |  |     return IntegrationMode.unitTest; | 
					
						
							| 
									
										
										
										
											2022-02-19 23:19:33 +08:00
										 |  |  |   } | 
					
						
							| 
									
										
										
										
											2022-02-20 09:58:25 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   if (kReleaseMode) { | 
					
						
							| 
									
										
										
										
											2022-02-20 16:34:15 +08:00
										 |  |  |     return IntegrationMode.release; | 
					
						
							| 
									
										
										
										
											2022-02-19 23:19:33 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-20 16:34:15 +08:00
										 |  |  |   return IntegrationMode.develop; | 
					
						
							| 
									
										
										
										
											2022-02-19 23:19:33 +08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2023-12-26 02:03:42 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | /// Only used for integration test
 | 
					
						
							|  |  |  | class IntegrationTestHelper { | 
					
						
							|  |  |  |   static Future Function()? didInitGetItCallback; | 
					
						
							|  |  |  |   static Map<String, String> Function()? rustEnvsBuilder; | 
					
						
							|  |  |  | } |