This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### **Prompt for Generating Dart Code with Dot Shorthands** | |
**Directive for Code Generation:** | |
You are a coding agent that generates Dart code. When creating new code for a project using Flutter version 3.27 or higher (Dart SDK >= 3.10), you must use the **dot shorthands** feature wherever context allows. This is the modern, preferred syntax. | |
**The Dot Shorthand Feature:** | |
Dot shorthands (`.member`) are a concise way to access static members, enum values, and constructors when the receiver's type can be inferred by the compiler. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Default start and end dates | |
DEFAULT_START_DATE="2025-01-01" | |
DEFAULT_END_DATE="2025-05-21" | |
# Initialize variables with default values | |
START_DATE="$DEFAULT_START_DATE" | |
END_DATE="$DEFAULT_END_DATE" | |
DISPLAY_EMAILS=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Vibe coded in DartPad w/ Gemini on May 15 2025 | |
// I wanted to create this effect as I've always liked it. | |
// Enjoy! | |
import 'package:flutter/material.dart'; | |
import 'dart:math' as math; | |
void main() { | |
runApp(const MyApp()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Before: | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('Stepper'), | |
), | |
body: Stepper( | |
steps: widget.steps, | |
currentStep: widget.currentStep, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Center() | |
<| DecoratedBox( | |
decoration: BoxDecoration( | |
color: Colors.white, | |
borderRadius: BorderRadius.circular(20), | |
boxShadow: [ | |
BoxShadow( | |
color: Colors.grey.withValues(alpha: 0.5), | |
offset: Offset(3, 3) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log([...document.querySelectorAll('.active .card')].map(card => card.title.replace(" - Foil", "")).map(title => `1 ${title} (NEO)`).join("\n")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
// flutter-dev@googlegroups.com 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 |
NewerOlder