Skip to content

Instantly share code, notes, and snippets.

View callmephil's full-sized avatar
🏠
Working from home

Phil callmephil

🏠
Working from home
View GitHub Profile
@callmephil
callmephil / infinite_tic_tac_toe.dart
Created December 4, 2025 11:26
Infinite Tic - Tac - Toe (Deep Seek)
import 'dart:math';
import 'package:flutter/material.dart';
// ============= CONSTANTS =============
class _AppColors {
static const Color primary = Color(0xFFFFD700);
static const Color scaffoldBackground = Color(0xFF1A1A1A);
static const Color deviceColor = Color(0xFFFFCC00);
static const Color boardBackground = Color(0xFF000000);
static const Color cellBorder = Color(0xFF2A2A2A);
@callmephil
callmephil / TwoFingerScrollDetector.dart
Last active November 16, 2025 18:38
TwoFingerScrollDetector
import 'dart:math';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
enum ScrollDirection { up, down, left, right, none }
typedef TwoFingerScrollCallback =
void Function(ScrollDirection direction, double speed, Offset delta);
@callmephil
callmephil / analysis_options.yaml
Created May 24, 2025 11:24
dart analysis options
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:very_good_analysis/analysis_options.yaml
import 'dart:math';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@callmephil
callmephil / velocity_rendering.dart
Created May 12, 2025 17:49
velocity rendering sliver flutter
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'dart:async';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@callmephil
callmephil / particle_cloud.dart
Created May 10, 2025 03:28
3D Particle Cloud (Gemini)
import 'dart:math';
import 'package:flutter/material.dart';
// Main function to run the Flutter application
void main() {
runApp(const ParticleApp());
}
// Root widget of the application
class ParticleApp extends StatelessWidget {
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
/// Global Chat Overlay Manager
class ChatOverlayService {
static final navigatorKey = GlobalKey<NavigatorState>();
static final _chatKey = GlobalKey<_ChatContainerState>();
@callmephil
callmephil / animated_constraints.dart
Created May 8, 2025 10:41
Animated Constraint (Instead of AnimatedContainer)
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class AnimatedConstraints extends ImplicitlyAnimatedWidget {
const AnimatedConstraints({
super.key,
required this.constraints,
required super.duration,
super.curve,
@callmephil
callmephil / base_firestore_service.dart
Created April 21, 2025 07:05
Base Firestore Service
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/foundation.dart';
/// Base service class for handling CRUD operations with Firestore
abstract class BaseFirestoreService<T> {
/// Constructor
BaseFirestoreService(String collectionPath) {
_collection = _firestore.collection(collectionPath);
}
@callmephil
callmephil / fireworks.dart
Last active April 5, 2025 11:34
flutter fireworks (gemini)
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'dart:math';
import 'dart:async';
import 'dart:ui' as ui;
import 'dart:typed_data';
const bool kDebugMode = false;
const int kLaunchIntervalBaseMs = 400;