mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: add custom folder prompt (#3961)
* chore: add custom folder prompt * chore: zip collab db * chore: fix test * chore: add test * chore: fmt * chore: fmt * chore: fmt
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
export 'package:async/async.dart';
|
||||
import 'dart:io';
|
||||
import 'dart:async';
|
||||
import 'package:appflowy_backend/rust_stream.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -27,12 +26,11 @@ class FlowySDK {
|
||||
|
||||
void dispose() {}
|
||||
|
||||
Future<void> init(Directory sdkDir, String env) async {
|
||||
Future<void> init(String configuration) async {
|
||||
final port = RustStreamReceiver.shared.port;
|
||||
ffi.set_stream_port(port);
|
||||
|
||||
ffi.store_dart_post_cobject(NativeApi.postCObject);
|
||||
ffi.set_env(env.toNativeUtf8());
|
||||
ffi.init_sdk(sdkDir.path.toNativeUtf8());
|
||||
ffi.init_sdk(configuration.toNativeUtf8());
|
||||
}
|
||||
}
|
||||
|
@ -20,8 +20,7 @@ DynamicLibrary _open() {
|
||||
return DynamicLibrary.open('${prefix}/libdart_ffi.so');
|
||||
if (Platform.isMacOS)
|
||||
return DynamicLibrary.open('${prefix}/libdart_ffi.dylib');
|
||||
if (Platform.isIOS)
|
||||
return DynamicLibrary.open('${prefix}/libdart_ffi.a');
|
||||
if (Platform.isIOS) return DynamicLibrary.open('${prefix}/libdart_ffi.a');
|
||||
if (Platform.isWindows)
|
||||
return DynamicLibrary.open('${prefix}/dart_ffi.dll');
|
||||
} else {
|
||||
@ -78,9 +77,9 @@ typedef _invoke_sync_Dart = Pointer<Uint8> Function(
|
||||
|
||||
/// C function `init_sdk`.
|
||||
int init_sdk(
|
||||
Pointer<ffi.Utf8> path,
|
||||
Pointer<ffi.Utf8> data,
|
||||
) {
|
||||
return _init_sdk(path);
|
||||
return _init_sdk(data);
|
||||
}
|
||||
|
||||
final _init_sdk_Dart _init_sdk =
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int64_t init_sdk(char *path);
|
||||
int64_t init_sdk(char *data);
|
||||
|
||||
void async_event(int64_t port, const uint8_t *input, uintptr_t len);
|
||||
|
||||
|
Reference in New Issue
Block a user