Skip to content

Instantly share code, notes, and snippets.

View branflake2267's full-sized avatar
🏠
Working from home

Brandon Donnelson branflake2267

🏠
Working from home
View GitHub Profile
@branflake2267
branflake2267 / main.dart
Last active February 20, 2024 08:57
Flutter - The Hero Animation - YouTube episode source code...
import 'package:flutter/material.dart';
void main() {
runApp(new MyApp());
}
/// Root MaterialApp
class MyApp extends StatelessWidget {
var _routes = <String, WidgetBuilder>{
"/anotherPage": (BuildContext context) =>
@branflake2267
branflake2267 / main.dart
Created March 3, 2018 21:32
Flutter - Using the future builder with infinite list view.
import 'dart:async';
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
@branflake2267
branflake2267 / Explorer.gwt.xml
Last active November 14, 2023 10:28
GXT 4 permutations, setting specific build properties.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.7.0//EN"
"http://gwtproject.org/doctype/2.7.0/gwt-module.dtd">
<module rename-to='explorer'>
<inherits name='com.google.gwt.activity.Activity' />
<inherits name='com.google.gwt.place.Place' />
<inherits name="com.google.gwt.inject.Inject" />
<inherits name='com.sencha.gxt.examples.resources.Resources' />
<inherits name='com.sencha.gxt.chart.Chart' />
@branflake2267
branflake2267 / AppDelegate.m
Created April 15, 2018 21:02
Flutter - Native Platform Interactions - Code for the youtube video.
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
FlutterViewController* controller = (FlutterViewController*)self.window.rootViewController;
@branflake2267
branflake2267 / Elemental2CanvasCircleExample.java
Created February 24, 2017 15:58
GWT Elemental 2 Canvas and 2d Context use. (casting from NativeObject).
import elemental2.CanvasRenderingContext2D;
import elemental2.Document;
import elemental2.Global;
import elemental2.HTMLBodyElement;
import elemental2.HTMLCanvasElement;
/**
* <inherits name="elemental2"/>
*/
public class Elemental2CanvasCircleExample implements EntryPoint {
@branflake2267
branflake2267 / main.dart
Last active December 11, 2022 16:33
Flutter - Getting data with firebase. I show two ways to get dat in the initState, 1. get data once and 2. and get updates in a stream.
import 'dart:async';
import 'package:firebase_database/firebase_database.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
void main() {
runApp(new MyApp());
}
@branflake2267
branflake2267 / main.dart
Created March 10, 2018 05:28
Flutter - Swap Widgets. Easily swap widgets using internal or external state variables in Flutter.
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
@branflake2267
branflake2267 / main.dart
Created March 31, 2018 06:36
Flutter - Display the SnackBar using the GlobalKey
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
@branflake2267
branflake2267 / web.xml
Created June 1, 2020 20:55
Sencha Cmd Reverse Proxy Servlet [project]/WEB-INF/web.xml, sencha app watch -j
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
metadata-complete="true"
version="2.5">
<!-- Cmd CLI Reverse HTTP Proxy Configuration -->
@branflake2267
branflake2267 / database.dart
Last active July 27, 2022 17:37
Flutter - Firebase Realtime Database Persistence
import 'dart:async';
import 'package:firebase_database/firebase_database.dart';
import 'package:intl/intl.dart';
class Database {
static Future<String> createMountain() async {
String accountKey = await _getAccountKey();