This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ReceivePort main_receive; // "RecievePort" for main(/root) thread | |
| SendPort remote_sender; // "SendPort" of main_receive | |
| void initIsolate() { | |
| // create a "RecievePort" for current thread, which is main thread at this point | |
| main_receive = new ReceivePort(); | |
| // listen to upcoming messages | |
| main_receive.listen((payload) { | |
| if (remote_sender is SendPort) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() { | |
| String t1 = '''[交易價格]:面交3300 / 全家3400 | |
| [其他備註]:'''; | |
| String t2 = '''[交易價格]:9000 | |
| [其他備註]:'''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void firebase_demo() { | |
| // creating a firebase database reference | |
| Firebase firebaseRef = new Firebase("https://lab-of-pai.firebaseio.com/"); | |
| // writing data | |
| firebaseRef.set({"hello": "world"}).then((_) { | |
| // after data is set | |
| print("after data is set"); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Example: | |
| * | |
| * var gauge:Gauge = new Gauge( YourFgTextureHere , YourBgTextureHere); | |
| * addChild(gauge); | |
| **/ | |
| package starling.extensions | |
| { | |
| import flash.geom.Point; | |