This file contains 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
import React, { Component, Globals } from '/libs/erbium'; | |
import { View, Image, Label, TableView, TableViewSection, TableViewRow } from '/libs/erbium-ui'; | |
import Theme from '/themes/ThemeOne'; | |
import WeatherAPI from '/components/WeatherAPI'; | |
import moment from '/libs/moment'; | |
class ForecastList extends Component { | |
componentWillMount(){ | |
this.api = new WeatherAPI(); |
This file contains 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
/** | |
* Testing Hyperloop in Erbium ES6 franework | |
* | |
* This uses the Hyperloop example from the Axway blog post | |
* https://www.appcelerator.com/blog/2016/08/hyperloop-working-with-native-controls-in-ios/ | |
* | |
* But it has been updated to use ES6 | |
* 28 July 2017 | |
*/ | |
import UIButton from 'UIKit/UIButton'; |
This file contains 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
{ | |
"name": "erbium", | |
"version": "1.0.0", | |
"description": "Erbium ES6 framework for Titanium Development", | |
"project" :{ | |
"name": "", | |
"theme": "" | |
}, | |
"ti" :{ | |
"appId": "uk.spiralarm.", |
This file contains 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() { | |
List myList = List(); | |
myList.add({'title' :"Chocolate", 'isFavorite': true}); | |
myList.add({'title' :"Cucumber", 'isFavorite': false}); | |
myList.forEach( (item) { | |
print('${item['title']} ${(item['isFavorite'])?"is my favourite": "is not my favourite"}'); | |
}); | |
} |
This file contains 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
/// This gist assumes that Flutter Blue (https://github.com/pauldemarco/flutter_blue) is used to connect to a BBC Micro:bit | |
/// and is listening to the [device.onValueChanged] for the correct characteristic ("E95DCA4B-251D-470A-A062FA1922DFA9A8") | |
/// | |
/// this will be something similar to | |
/// | |
/// device.onValueChanged( (accChar).listen( (value){ convertRawData(value)})); | |
/// | |
/// the 'raw' listen value is a List<int> of length 6 this needs to be converted into the X,Y and Z values from the | |
/// accelerometer and is done with the function below | |
/// |
This file contains 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
/// Demo of using the oscilloscope package | |
/// This uses the output from the Acceleromter on a device | |
import 'package:flutter/material.dart'; | |
import 'package:oscilloscope/oscilloscope.dart'; | |
import 'package:sensors/sensors.dart'; | |
void main() => runApp(new MyApp()); |