Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Working From Home

Rody Davis rodydavis

:octocat:
Working From Home
View GitHub Profile
View flutter_resize_panel.dart
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
enum SplitMode { normal, leftExpand, rightExpand }
@rodydavis
rodydavis / flutter_github_ci.yml
Last active Jun 30, 2022
Flutter Github Actions Build and Deploy Web to Firebase Hosting, iOS to Testflight, Android to Google Play (fastlane)
View flutter_github_ci.yml
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_web:
@rodydavis
rodydavis / flutter_web_github_workflow.yml
Last active Jun 19, 2022
Build and Deploy Flutter Website to Flirebase Hosting
View flutter_web_github_workflow.yml
name: Build and Deploy Website
on: push
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
View draggable_custom_painter.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Draggable Custom Painter',
home: Scaffold(
@rodydavis
rodydavis / flutter_xcode_cloud_script.sh
Created Jun 6, 2022
flutter script to build app on Xcode Cloud ci_scripts/ci_post_install.sh
View flutter_xcode_cloud_script.sh
#!/bin/sh
# Install CocoaPods using Homebrew.
brew install cocoapods
# Install Flutter
brew install --cask flutter
# Run Flutter doctor
flutter doctor
@rodydavis
rodydavis / flutter_master_detail.dart
Last active Apr 9, 2022
Flutter Master Detail View
View flutter_master_detail.dart
import 'package:flutter/material.dart';
class MasterDetail<T> extends StatefulWidget {
const MasterDetail({
Key? key,
required this.listBuilder,
required this.detailBuilder,
required this.onPush,
this.emptyBuilder,
}) : super(key: key);
View theme-adapter.css
:root {
--mdc-theme-primary: var(--md-sys-color-primary);
--mdc-theme-on-primary: var(--md-sys--coloron-primary);
--mdc-theme-background: var(--md-sys--colorbackground);
--mdc-theme-on-background: var(--md-sys--coloron-background);
--mdc-theme-on-surface-variant: var(--md-sys--coloron-surface-variant);
--mdc-theme-surface-variant: var(--md-sys--colorsurface-variant);
--mdc-theme-on-surface: var(--md-sys--coloron-surface);
--mdc-theme-surface: var(--md-sys--colorsurface);
--mdc-theme-text-primary-on-background: var(--md-sys--coloron-surface-variant);
@rodydavis
rodydavis / material_outlined_card.dart
Created Mar 9, 2022
Flutter Material Outlined Card
View material_outlined_card.dart
import 'package:flutter/material.dart';
class OutlinedCard extends StatefulWidget {
const OutlinedCard({
Key? key,
required this.child,
}) : super(key: key);
final Widget child;
@rodydavis
rodydavis / flutter-multi-touch-canvas-demo.dart
Last active Mar 19, 2022
Flutter Multi Touch Canvas Demo
View flutter-multi-touch-canvas-demo.dart
import 'dart:async';
import 'dart:math' as math;
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@rodydavis
rodydavis / controller.ts
Last active Mar 1, 2022
HTML Canvas Controls with painting, zoom at cursor, clicking and keyboard shortcuts
View controller.ts
import { drawInfiniteGrid } from "./infinite-grid";
import {
CanvasTransformer,
CanvasTransformerOptions,
defaultOptions,
} from "./transformer";
import { color } from "./utils";
export class CanvasController<
T extends CanvasWidget