Skip to content

Instantly share code, notes, and snippets.

View ybakos's full-sized avatar
💭
the machine stops the machine stops the machine stops

Yong Joseph Bakos ybakos

💭
the machine stops the machine stops the machine stops
View GitHub Profile
@ybakos
ybakos / main.ino
Last active November 30, 2020 15:34
CS 160 SparkFun Sandbox Project
// Project: Code controls circuitry.
// Outputs: lights
// Inputs: sensors (slider, microphone, light sensor)
//
// This program has three components:
// - light detection
// - temperature detection
// - sound detection
@ybakos
ybakos / dropdown_rating_form_field.dart
Last active March 1, 2020 21:10
A StatefulWidget that Wraps a DropdownButtonFormField so that the selected value displays
// (c) 2020 Yong Joseph Bakos. Use this freely.
// https://github.com/flutter/flutter/issues/27821
// Usage:
// DropdownRatingFormField(
// maxRating: 4,
// validator: (value) { /* ... */ },
// onSaved: (value) { /* ... */ }
// );
import 'package:flutter/material.dart';
@ybakos
ybakos / main.dart
Created February 17, 2020 04:01
CS 492 Week 8 Exploration 5 Exercise SQLite
// Week 8 Exploration 5
void main() {
runApp(App());
}
class App {
}
@ybakos
ybakos / main.dart
Created February 17, 2020 04:00
CS 492 Week 8 Exploration 4 Exercise Files
// Week 8 Exploration 4
void main() {
runApp(App());
}
class App {
}
@ybakos
ybakos / main.dart
Created February 17, 2020 03:59
CS 492 Week 8 Exploration 3 Exercise Shared Preferences
// Week 8 Exploration 3
void main() {
runApp(App());
}
class App {
}
@ybakos
ybakos / main.dart
Last active February 24, 2020 01:35
CS 492 Week 8 Exploration 2 Exercise Async
void main() {
print('a');
// TODO: Do the same work, but without the use of `go`.
go().then( (value) {
print(value);
});
print('b');
}
Future<int> go() {
@ybakos
ybakos / main.dart
Last active February 24, 2020 07:50
CS 492 Week 8 Exploration 1 Exercise State
import 'package:flutter/material.dart';
void main() => runApp(App());
class App extends StatelessWidget { // TODO: Convert to StatefulWidget
Widget build(BuildContext context) {
return MaterialApp(
title: 'Example',
@ybakos
ybakos / main.dart
Last active February 14, 2020 19:23
CS 492 Week 7 Exploration 2 Exercise Navigation
import 'package:flutter/material.dart';
void main() => runApp(App());
class App extends StatelessWidget {
// TODO: Declare a Map containing two routes,
// one for Exercise and one for Alpha.
@ybakos
ybakos / main.dart
Last active February 14, 2020 19:48
CS 492 Week 7 Exploration 3 Exercise Forms
import 'package:flutter/material.dart';
void main() => runApp(App());
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
@ybakos
ybakos / main.dart
Last active February 14, 2020 20:40
CS 492 Week 7 Exploration 4 Exercise ListView
import 'package:flutter/material.dart';
void main() => runApp(App());
class App extends StatefulWidget {
@override
State createState() => AppState();
}
class AppState extends State<App> {