-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascript.uno
More file actions
44 lines (31 loc) · 840 Bytes
/
javascript.uno
File metadata and controls
44 lines (31 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using Uno;
using Uno.UX;
using Uno.Threading;
using Uno.Text;
using Uno.Platform;
using Uno.Compiler.ExportTargetInterop;
using Uno.Collections;
using Fuse;
using Fuse.Scripting;
using Fuse.Reactive;
namespace Fuse.PlaceAutocomplete
{
[UXGlobalModule]
public sealed class PlaceAutocompleModule: NativeModule{
static readonly PlaceAutocompleModule _instance;
public PlaceAutocompleModule()
{
if(_instance != null) return;
Uno.UX.Resource.SetGlobalKey(_instance = this, "PlaceAutocomplete");
AddMember(new NativePromise<string, string>("Launch", Launch));
}
Future<string> Launch(object[] args)
{
if defined(iOS){
return Autocomplete.Launch();
}else{
return new Fuse.PlaceAutocomplete.Launch();
}
}
}
}