Skip to content

Commit

Permalink
First flutter app running in Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
hkbinaurics committed May 29, 2024
1 parent 6185a8c commit 1678a82
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ DartApiEntry_function FindFunctionPointer(const DartApiEntry* entries,
return NULL;
}

JVX_FLUTTER_LIB_BEGIN
void InitDartApiDL(void* data)
{
DartApi* dart_api_data = (DartApi*)data;
Expand Down Expand Up @@ -73,6 +74,7 @@ void InitDartApiDL(void* data)
const DartApiEntry* it = dart_api_function_pointers;

}
JVX_FLUTTER_LIB_END

// =========================================================================

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ target_link_libraries(${PLUGIN_NAME} PRIVATE

# This is the minimum package libs aggregation:
${AYF_CORE_PACK_LIB}
jvx-system-base_static
)

target_compile_features(${PLUGIN_NAME} PRIVATE cxx_std_17)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "ayf-sdk-local-headers.h"

#include "include/ayfcorepack/ayfcorepack_plugin.h"

#include <flutter_linux/flutter_linux.h>
Expand All @@ -9,7 +7,8 @@
#include <cstring>

#include <string>
extern std::string fileNameModule;
#include "../common/ayf-sdk-local-headers.h"
#include "jvx_platform.h"

#define AYFCOREPACK_PLUGIN(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), ayfcorepack_plugin_get_type(), \
Expand Down Expand Up @@ -44,10 +43,10 @@ static void ayfcorepack_plugin_handle_method_call(
g_autoptr(FlValue) mapReturn = fl_value_new_map();
//flutter::EncodableMap retMap;

std::string fNameModule = fileNameModule;

std::string externalAccessModuleName = JVX_GET_CURRENT_MODULE_PATH((void*)flutter_config_open);
fl_value_set(mapReturn, fl_value_new_string("loadedModule"),
fl_value_new_string("123"));//ayfcorepack::AyfcorepackPlugin::fileNameModule.c_str()));
fl_value_new_string(externalAccessModuleName.c_str()));
//ayfcorepack::AyfcorepackPlugin::fileNameModule.c_str()));
// retMap[flutter::EncodableValue("loadedModule")] = flutter::EncodableValue(ayfcorepack::AyfcorepackPlugin::fileNameModule);

fl_value_set(mapReturn, fl_value_new_string("moduleEntryAddress"), fl_value_new_int((intptr_t)flutter_config_open));
Expand Down
Empty file.

0 comments on commit 1678a82

Please sign in to comment.