This setup is only for MacOS. I don't have a windows/linux machine to test.
cd ~
git clone https://github.com/google/flutter-desktop-embedding
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:text="Hello World"/> |
package com.myapp; | |
import android.app.Activity; | |
import android.os.Bundle; | |
public class MainActivity extends Activity { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.myapp"> | |
<application | |
android:label="AppNameInSettings" | |
android:theme="@android:style/Theme.Light.NoTitleBar"> | |
<activity | |
android:name=".MainActivity" | |
android:label="AppNameInLauncher" > |
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="black_1000">#000000</color> | |
<color name="white_1000">#FFFFFF</color> | |
<color name="red_50">#FFEBEE</color> | |
<color name="red_100">#FFCDD2</color> | |
<color name="red_200">#EF9A9A</color> | |
<color name="red_300">#E57373</color> |
<script src="ticker.js"></script> | |
<script> | |
var ticker = new KiteTicker({api_key: "api_key", access_token: "access_token"}); | |
ticker.connect(); | |
ticker.on("ticks", onTicks); | |
ticker.on("connect", subscribe); | |
function onTicks(ticks) { |
''' | |
Hi traders, | |
Here is a simple generic example for implementing a postback mechanism. You can host this in a remote server or in your local server itself. | |
Run Locally | |
=========== | |
1. Install ngrok from https://ngrok.com/ |
import 'package:flutter/material.dart'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyAppState createState() => new _MyAppState(); | |
} | |
class _MyAppState extends State<MyApp> with TickerProviderStateMixin { |
import 'package:flutter/material.dart'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyAppState createState() => new _MyAppState(); | |
} | |
class _MyAppState extends State<MyApp> with SingleTickerProviderStateMixin { |