Skip to content

Instantly share code, notes, and snippets.

Working From Home

Rody Davis rodydavis

Working From Home
View GitHub Profile
View flutter_adaptive_markdown_source.dart
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
Widget build(BuildContext context) {
return const MaterialApp(
rodydavis / flutter_github_ci.yml
Last active March 18, 2023 02:22
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
- master
- master
rodydavis / riverpod_flutter_widgets.dart
Created March 12, 2023 02:55
Using Riverpod for Widget generation
View riverpod_flutter_widgets.dart
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
part 'generated.g.dart';
class GeneratedWidget extends _$GeneratedWidget {
rodydavis / flutter_search.dart
Created August 14, 2018 14:50
Very Fast Search for Flutter with Custom Object
View flutter_search.dart
import 'dart:async';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:date_format/date_format.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_analytics/observer.dart';
import 'package:flutter/material.dart';
import 'package:native_widgets/native_widgets.dart';
import 'package:songlist_pro/util/globals.dart' as globals;
import 'package:tonic/tonic.dart';
rodydavis / run.dart
Last active February 2, 2023 15:51
Cross platform Flutter compute method
View run.dart
export '' if (dart.library.html) 'run.web.dart';
rodydavis / flutter-multi-touch-canvas-demo.dart
Last active January 27, 2023 18:05
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 / flutter_infinite_canvas.dart
Last active January 13, 2023 23:52
Flutter infinite canvas with InteractiveViewer + CustomMultiChildLayout
View flutter_infinite_canvas.dart
import 'package:flutter/material.dart';
import 'package:vector_math/vector_math_64.dart' hide Colors;
void main() {
final controller = WidgetCanvasController([
key: UniqueKey(),
size: const Size(400, 800),
child: Scaffold(
rodydavis / dart_to_dart.dart
Created January 10, 2023 02:41
Dart ast to dart export
View dart_to_dart.dart
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/ast/token.dart';
import 'package:analyzer/src/dart/ast/ast.dart';
import 'package:meta/meta.dart';
/// A visitor used to write a source representation of a visited AST node (and
rodydavis / flutter_canvas_demo.dart
Last active December 23, 2022 23:18
Flutter Canvas Demo
View flutter_canvas_demo.dart
import 'package:flutter/material.dart';
void main() {
runApp(const StoryBoardExample());
class StoryBoardExample extends StatelessWidget {
const StoryBoardExample({super.key});
rodydavis / adaptive_scaffold.dart
Created April 7, 2020 05:39
Flutter Adaptive Scaffold
View adaptive_scaffold.dart
import 'package:flutter/material.dart';
const kTabletBreakpoint = 720.0;
const kDesktopBreakpoint = 1200.0;
const kSideMenuWidth = 250.0;
class AdaptiveScaffold extends StatelessWidget {
final List<TabItem> tabs;
final int selectedIndex;
final ValueChanged<int> onSelectionChanged;