AppFlowy Docs
Search…
Initialize
FlowySDK works as the AppFlowy application Back-end. It will be initialized before the application launch. Check out the initialization sequence diagram shown below.
file : flowy_sdk.plantuml
  1. 1.
    FlowyRunner will get called when the entry point, the main function, got called.
  2. 2.
    FlowyRunner call initialize function on each task that registers as a LaunchTask one by one.
  3. 3.
    InitRustSDKTask calls the init function and passes the working directory into FlowySDK.
    1
    getIt<FlowySDK>().init(directory)
    Copied!
    The directory is different according to the IntegrationMode, which means running AppFlowy on developing mode will not alter the data on release mode.
    1. 1.
      IntegrationMode.release
    1
    Directory documentsDir = await getApplicationDocumentsDirectory();
    2
    final directory = Directory('${documentsDir.path}/flowy')
    Copied!
    1. 1.
      IntegrationMode.develop
    1
    Directory documentsDir = await getApplicationDocumentsDirectory();
    2
    final directory = Directory('${documentsDir.path}/flowy_dev')
    Copied!
    1. 1.
      IntegrationMode.test
    1
    final directory = Directory("${Directory.current.path}/.sandbox")
    Copied!
  4. 4.
    InitAppWidgetTask initialize the ApplicationWidget and call runApp function.
  5. 5.
    InitPlatformServiceTask start the NetworkListener.

WIP

typing...πŸ’¬οΈ
Last modified 20d ago
Copy link
Contents
WIP