Skip to content

Instantly share code, notes, and snippets.

View tunitowen's full-sized avatar

Tony Owen tunitowen

  • OwenTech Ltd
  • Leeds
View GitHub Profile
@tunitowen
tunitowen / GetPeople.kt
Created May 19, 2017 09:09
Room-GettingStarted-GetData
fun registerAllPersonListener() {
MyApp.database?.personDao()?.getAllPeople()
?.subscribeOn(Schedulers.io())
?.observeOn(AndroidSchedulers.mainThread())
?.subscribe { listOfPeople ->
view.personTableUpdated(listOfPeople)
}
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: FlareActor("assets/heart.flr", alignment:Alignment.center, fit:BoxFit.contain, animation: "heart",),
@tunitowen
tunitowen / main.dart
Created December 6, 2018 11:31
Multiple Flare Animations - Flutter
import 'package:flutter/material.dart';
import 'package:flare/flare_actor.dart';
const String ANIM_JUST_NIGHT = "just_night";
const String ANIM_NIGHT_TO_DAY = "night_to_day";
const String ANIM_DAY_TO_NIGHT = "day_to_night";
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
import 'package:flutter/material.dart';
import 'dart:math';
const SCALE_FRACTION = 0.7;
const FULL_SCALE = 1.0;
const PAGER_HEIGHT = 200.0;
class ItCrowdPage extends StatefulWidget {
@override
_ItCrowdPageState createState() => _ItCrowdPageState();