Skip to content

Instantly share code, notes, and snippets.

View ajinasokan's full-sized avatar
💻
Building Flutter apps

Ajin Asokan ajinasokan

💻
Building Flutter apps
View GitHub Profile
@ajinasokan
ajinasokan / flutter_desktop_macos.md
Last active November 22, 2019 14:38
Run Flutter apps in MacOS with IDE support and hot reloading

This setup is only for MacOS. I don't have a windows/linux machine to test.

Clone FDE repo

cd ~
git clone https://github.com/google/flutter-desktop-embedding

Switch to flutter master

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 {
@ajinasokan
ajinasokan / example.dart
Last active November 26, 2019 10:06
Futter nested TabBarView bug
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 {
@ajinasokan
ajinasokan / app.py
Last active October 7, 2022 09:40
KiteConnect postback example
'''
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/
@ajinasokan
ajinasokan / kitetickersample.html
Last active June 20, 2024 16:27
Kite Ticker Pure JS Example
<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) {
@ajinasokan
ajinasokan / md_colors.xml
Last active November 3, 2016 06:19
Material Design Colors XML Resource File. How to use: https://apkchef.net/material-design-colors-xml/
<?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>
<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" >
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);
<?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"/>