Skip to content

Instantly share code, notes, and snippets.

View selectable_sqlite_async.dart
import 'package:sqlite3/sqlite3.dart';
import 'package:sqlite_async/sqlite_async.dart';
typedef RowParser<T> = T Function(Row row);
extension SqliteDatabaseUtils on SqliteDatabase {
Selectable<T> select<T>(
String sql, {
List<Object?> parameters = const [],
Set<String> tables = const {},
rodydavis / podcast_rss_feed.xml
Created April 27, 2020 22:22
Podcast RSS Feed Example
View podcast_rss_feed.xml
<?xml version="1.0" encoding="UTF-8" ?>
<rss xmlns:googleplay="" xmlns:itunes="" xmlns:atom="" xmlns:rawvoice="" xmlns:content="" version="2.0">
<title>Creative Engineering</title>
<googleplay:author>Rody Davis, Norbert Kozsir</googleplay:author>
<rawvoice:location>San Francisco, California</rawvoice:location>
<author>Rody Davis, Norbert Kozsir</author>
<itunes:author>Rody Davis, Norbert Kozsir</itunes:author>
View signals_fullname_example.dart
import 'package:flutter/material.dart';
import 'package:signals/signals_flutter.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
Widget build(BuildContext context) => const MaterialApp(
View signals.dart
import 'package:flutter/material.dart';
final brightness = signal(Brightness.light);
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
View preact_signals.dart
// ignore_for_file: public_member_api_docs, constant_identifier_names
const _maxCallDepth = 100;
void cycleDetected() {
throw Exception('Cycle detected');
void mutationDetected() {
throw Exception('Computed cannot have side-effects');
rodydavis / flutter_github_ci.yml
Last active November 10, 2023 21:10
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
View flutter_native_http.dart
import 'package:cronet_http/cronet_http.dart';
import 'package:cupertino_http/cupertino_http.dart';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:fetch_client/fetch_client.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart';
import 'package:platform_info/platform_info.dart';
import 'package:flutter/foundation.dart';
void main() async {
rodydavis / flutter_stream_widget.dart
Created November 2, 2023 23:16
Render a widget as a stream instead of a single funciton
View flutter_stream_widget.dart
import 'dart:async';
import 'package:flutter/widgets.dart';
abstract class StreamWidget extends StatefulWidget {
const StreamWidget({Key? key}) : super(key: key);
Stream<Widget> build(BuildContext context);
void initState() {}
rodydavis / input_output_preview.dart
Created November 1, 2023 22:01
Flutter input, output, preview
View input_output_preview.dart
import 'package:flutter/material.dart';
import 'two_pane.dart';
class InputOutputPreview extends StatefulWidget {
const InputOutputPreview({
required this.title,
required this.input,
required this.output,
rodydavis / flutter-multi-touch-canvas-demo.dart
Last active September 27, 2023 06:47
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 {