Skip to content

Instantly share code, notes, and snippets.

View slightfoot's full-sized avatar
💙
Fluttering

Simon Lightfoot slightfoot

💙
Fluttering
View GitHub Profile
@slightfoot
slightfoot / main.dart
Created November 20, 2024 19:17 — forked from yeasin50/main.dart
3D listTIle
/// 3D tile wip
/// Fixme: proper tap/hover area
import 'dart:math';
import 'package:flutter/material.dart';
void main() {
runApp(
const MaterialApp(
@slightfoot
slightfoot / custom_magic_circle_button.dart
Created November 13, 2024 19:39
Custom Magic Circle Button - by Simon Lightfoot :: #HumpdayQandA on 13th November 2024 :: https://www.youtube.com/watch?v=Y46EE-C4HL8
// MIT License
//
// Copyright (c) 2024 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@slightfoot
slightfoot / main.dart
Last active November 6, 2024 19:52 — forked from mg3994/main.dart
Fade animation for newly added text chunks - solved by Simon Lightfoot on #HumpdayQandA - 6th November 2024 :: https://www.youtube.com/watch?v=txmWGhgPKuU
/// Reference (https://github.com/FilledStacks/markdown_fade_bounty/pull/6)
/// This widget, `FadeRevealMarkdownDifference`, is designed to display a series of markdown versions,
/// highlighting the differences between them. The issue being encountered is that the `previousText` is
/// currently showing a pulse animation, which is not required or expected behavior. The pulse effect
/// should only apply to the newly added portion of the text (`newText`). The goal is to have `previousText`
/// remain static while only the new changes (`newText`) fade in or animate.
///
/// The expected behavior is for `previousText` to remain static and unanimated, and only `newText`
/// should be subject to the fade-in effect.
///
@slightfoot
slightfoot / main.dart
Last active November 6, 2024 19:42 — forked from JohanScheepers/main.dart
SecretPage page tap - solved by Simon Lightfoot on #HumpdayQandA - 6th November 2024 :: https://www.youtube.com/watch?v=txmWGhgPKuU
// Please solve this one.
//
// If I tap on any one of the eight areas app navigate to “PageTwo()”
//
// If I tap on four of the areas simultaneous
// (I use four fingers to tap with), I want to navigate the “SecretPage()“.
//
// Lets pick “One”, “Two”, “Five” and “Six” as the as the secrete tap areas.
import 'package:flutter/foundation.dart';
@slightfoot
slightfoot / server.dart
Last active October 25, 2024 19:13
Start of a HTTP/2 Server implementation in Dart - by Simon Lightfoot
// MIT License
//
// Copyright (c) 2024 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@slightfoot
slightfoot / main.dart
Last active October 23, 2024 18:30 — forked from dumazy/main.dart
Updating PopScope based on inner Navigator
// MIT License
//
// Copyright (c) 2022 Fré Dumazy & Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@slightfoot
slightfoot / common.dart
Created October 8, 2024 20:53
Common Widgets - by Simon Lightfoot
// ignore_for_file: public_member_api_docs
// MIT License
//
// Copyright (c) 2024 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@slightfoot
slightfoot / dialog_carousel.dart
Created October 2, 2024 18:50
Dialog Carousel - by Simon Lightfoot - Humpday Q&A :: 2nd October 2024 #Flutter #Dart - https://www.youtube.com/watch?v=RX6cS7TdIy0
@slightfoot
slightfoot / pie_progress_indicator.dart
Created September 25, 2024 19:52
Pie Progress Indicator :: by Simon Lightfoot - Humpday Q&A/AMA 25th September 2024 :: https://www.youtube.com/watch?v=QiLPSsD9kRc
import 'dart:math' as math;
import 'dart:ui';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const ExampleApp());
}
@slightfoot
slightfoot / win32_window.cpp
Created September 25, 2024 18:19
Flutter Windows Desktop - Client Area Adjustment :: by Simon Lightfoot - 25th September 2024 :: https://www.youtube.com/watch?v=QiLPSsD9kRc
bool Win32Window::Create(const std::wstring& title,
const Point& origin,
const Size& size) {
Destroy();
const wchar_t* window_class =
WindowClassRegistrar::GetInstance()->GetWindowClass();
const POINT target_point = {static_cast<LONG>(origin.x),
static_cast<LONG>(origin.y)};