Skip to content

Instantly share code, notes, and snippets.

View sethladd's full-sized avatar

Seth Ladd sethladd

View GitHub Profile
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
@sethladd
sethladd / not_serious.dart
Created April 27, 2025 21:10
performance art
import 'package:flutter/material.dart'; // Or wherever ActionStateType comes from
// --- State Pattern Implementation ---
// 0. Define the result type (e.g., an enum) if needed for UI logic
enum ActionStateType { ready, answering, complete }
// 1. Define the State Interface (or abstract class)
abstract class GameState {
// Method for the state to determine what the *current* state should be
#!/bin/bash
# Script to automate Flutter SDK installation and setup for iOS development on macOS.
# Corrected URL finding logic for Intel vs Arm. V1.5
# --- Configuration ---
FLUTTER_INSTALL_PARENT_DIR="${HOME}/development" # Default parent directory for Flutter SDK FOLDER
FLUTTER_DOCS_URL="https://docs.flutter.dev/get-started/install/macos/mobile-ios"
SCRIPT_VERSION="1.5" # Updated Version
REPORT_FILE="/tmp/flutter_setup_report_$(date +%s).txt"
@sethladd
sethladd / another case.dart
Last active February 3, 2025 05:44
Wild ideas
//Before:
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Stepper'),
),
body: Stepper(
steps: widget.steps,
currentStep: widget.currentStep,
Center()
<| DecoratedBox(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: Colors.grey.withValues(alpha: 0.5),
offset: Offset(3, 3)
)
@sethladd
sethladd / export_mtgen.js
Created April 17, 2022 16:24
Export MTG proxies from mtgen.net
console.log([...document.querySelectorAll('.active .card')].map(card => card.title.replace(" - Foil", "")).map(title => `1 ${title} (NEO)`).join("\n"))
@sethladd
sethladd / flutter_localized_title.dart
Last active July 29, 2021 08:05
Flutter example of a localized title
// Copyright 2017 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.
// Note: I'm not the original author, I'm sharing via Gist to make
// it easy for folks to check it out. Please email
// [email protected] if you have questions about that.
// A simple "rough and ready" example of localizing a Flutter app.
// Spanish and English (locale language codes 'en' and 'es') are
return new SingleChildScrollView(
child: new Container(
margin: const EdgeInsets.all(16.0),
child: new Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new Expanded(child: new LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints){
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="widgets library API docs, for the Dart programming language.">
<title>widgets library - Dart API</title>
<!-- required because all the links are pseudo-absolute -->
<!doctype html>
<html>
<head>
<style>
html,
body {
margin: 0;
padding: 0;
height: 100%;