Skip to content

Instantly share code, notes, and snippets.

View JoseAlba's full-sized avatar

Jose Alba JoseAlba

View GitHub Profile
@JoseAlba
JoseAlba / main.dart
Created September 2, 2020 13:09
FocusableActionDetector Focus and Hover support
// Flutter code sample for FocusableActionDetector
// This example shows how keyboard interaction can be added to a custom control
// that changes color when hovered and focused, and can toggle a light when
// activated, either by touch or by hitting the `X` key on the keyboard when
// the "And Me" button has the keyboard focus (be sure to use TAB to move the
// focus to the "And Me" button before trying it out).
//
// This example defines its own key binding for the `X` key, but in this case,
// there is also a default key binding for [ActivateAction] in the default key
@JoseAlba
JoseAlba / main.dart
Last active September 16, 2020 13:05
Focusable Action Detector
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
void main() {
runApp(MaterialApp(home: FAD()));
}
class FAD extends StatefulWidget {
FAD({Key key}) : super(key: key);
@JoseAlba
JoseAlba / main.dart
Created August 31, 2020 09:31
SecondaryValueSlider
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
void main() => runApp(RunSlider());
class RunSlider extends StatefulWidget {
@override
_RunSliderState createState() => _RunSliderState();
}
@JoseAlba
JoseAlba / main.dart
Last active July 30, 2023 16:41
Dartpad, Gist, and iFrames
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
@JoseAlba
JoseAlba / main.dart
Created February 17, 2020 09:48
CompositedTransformTarget, CompositedTransformFollower, and LayerLink math example
import 'dart:math' as math;
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(home: Slide()));
}
class Indicator extends StatelessWidget {
Indicator({ Key key, this.link, this.offset }) : super(key: key);
@JoseAlba
JoseAlba / main.dart
Created February 17, 2020 09:46
CompositedTransformTarget, CompositedTransformFollower, and LayerLink
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(home: Slide()));
}
class Indicator extends StatelessWidget {
Indicator({ Key key, this.link, this.offset }) : super(key: key);
final LayerLink link;
var pizzaApi = require('dominos');
var util = require('util');
// ID 10532, represents a Dominos store in the Kitchener/Waterloo area.
// You have to find the store ID close to you.
var myStore = new pizzaApi.Store(
{
ID: 10532,
}
);
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class robotFollower : MonoBehaviour {
public int playerSpeed;
public GameObject player;
// Use this for initialization
void Start () {