initializeWorkflowPlatformAdapter function
void
initializeWorkflowPlatformAdapter()
Initialize the appropriate platform adapter based on the current platform
Implementation
void initializeWorkflowPlatformAdapter() {
if (kIsWeb) {
// Web platform
WorkflowPlatformAdapter.instance = web_adapter.createWebAdapter();
} else if (defaultTargetPlatform == TargetPlatform.windows) {
// Windows platform
WorkflowPlatformAdapter.instance = windows_adapter.createWindowsAdapter();
} else if (defaultTargetPlatform == TargetPlatform.linux) {
// Linux platform
WorkflowPlatformAdapter.instance = linux_adapter.createLinuxAdapter();
} else {
// Mobile/desktop platforms using method channels
WorkflowPlatformAdapter.instance = MethodChannelWorkflowAdapter();
}
}