add function channel

This commit is contained in:
ekibun
2020-08-15 14:52:53 +08:00
parent 2731f97c63
commit 7b35868c5c
12 changed files with 313 additions and 52 deletions

View File

@@ -3,7 +3,7 @@
* @Author: ekibun
* @Date: 2020-07-18 23:28:55
* @LastEditors: ekibun
* @LastEditTime: 2020-08-08 17:38:48
* @LastEditTime: 2020-08-15 14:01:09
*/
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
@@ -48,6 +48,8 @@ class _TestPageState extends State<TestPage> {
case "http":
Response response = await Dio().get(arg[0]);
return response.data;
case "hello":
return await arg[0](["hello: "]);
default:
}
};

View File

@@ -32,7 +32,7 @@ add_definitions(-DUNICODE -D_UNICODE)
# Compilation settings that should be applied to most targets.
function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_17)
target_compile_options(${TARGET} PRIVATE /W4 /WX- /wd"4100")
target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
target_compile_options(${TARGET} PRIVATE /EHsc)
target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
target_compile_definitions(${TARGET} PRIVATE "$<$<CONFIG:Debug>:_DEBUG>")