Skip to content

Instantly share code, notes, and snippets.

View rydmike's full-sized avatar

Rydmike rydmike

View GitHub Profile
@rydmike
rydmike / analysis_options.yaml
Last active February 10, 2026 06:52
RydMike lints v2.6.0 - Personal preferences and starting point for Dart & Flutter linter rules setup.
# RydMike LINTER Preferences v2.6.0
#
# Get this file here: https://gist.github.com/rydmike/fdb53ddd933c37d20e6f3188a936cd4c
#
# We include and activate all_lint_rules, then below we disable the not used or desired ones.
# You can find a list of all lint rules to put in your all_lint_rules.yaml file here:
# https://dart.dev/tools/linter-rules/all
#
# This version is updated for Flutter 3.38 and Dart 3.10.
#
@TahaTesser
TahaTesser / Flutter Network.md
Last active December 25, 2025 10:01
A collection of active Flutter YouTube content creators, newsletters and blogs, personalities, and platforms. If you've suggestions for active content creators, please comment below.
@rydmike
rydmike / proposal.md
Created November 25, 2025 22:04
Feature Request: Decoration-Aware ShapeBorder for Material Components

Feature Request: Decoration-Aware ShapeBorder for Material Components

Summary

Enable Material components (Card, Dialog, TextField, Chip, etc.) to render full decoration styling (gradients, multiple shadows, inner shadows, images) through their existing shape property by introducing a new ShapeBorder subclass that carries decoration data and modifying the Material widget to render it.


Use Case

@craiglabenz
craiglabenz / chat_message_render_box.dart
Last active November 11, 2025 11:22
Demonstrates a custom RenderObject that draws chat messages like WhatsApp, where the `sentAt` timestamp is tucked into the last line if it fits
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@rydmike
rydmike / platform_is.dart
Last active February 4, 2025 14:40
Flutter Universal Platform Check - That Works on Web too
import 'universal_platform_web.dart'
if (dart.library.io) 'universal_platform_vm.dart';
/// A universal platform checker.
///
/// Can be used to check active physical Flutter platform on all platforms.
///
/// To check what host platform the app is running on use:
///
/// * PlatformIs.android
@slightfoot
slightfoot / smooth_scroll.dart
Created July 14, 2022 17:35
Correct smooth scroll for Flutter Web - by Simon Lightfoot - 14th July 2022
// MIT License
//
// Copyright (c) 2022 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:
@jogboms
jogboms / RegistryBenchMarks.md
Last active October 21, 2023 17:28
Registry benchmarks
@rydmike
rydmike / svg_asset_image.dart
Created March 27, 2021 12:06
Change the main color of the color used in Undraw SVG images.
import 'dart:async' show Future;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart' show rootBundle;
import 'package:flutter_svg/flutter_svg.dart';
/// Displays an SVG image provided in the applications asset bundle.
///
/// The [assetName] is the path and name of the SVG file in the asset bundle.
/// This SVG asset display widget is tuned for usage with the Undraw images
class CustomTrianglePainter extends CustomPainter {
final Color color;
late Paint _paint;
CustomTrianglePainter(this.color) {
_paint = Paint()
..color = color
..style = PaintingStyle.fill;
}
@lukepighetti
lukepighetti / README.md
Last active December 6, 2022 10:43
sync_async_io

sync_async_io

This gist demonstrates jank observed during a large filesystem operation. There is a lint called avoid_slow_async_io that recommends people not use async io methods. These methods are definitely slower than the sync methods, but they provide concurrency which is critical to a Flutter application. We are exploring if the linter recommendation introduces jank in a flutter app or not.

Findings

If you use sync io methods that are of moderate to large size, it will freeze the ui.

If you use the linter recommendations, the result is nearly identical to using async methods as a default. I have seen some dropped frames on Simulator but it's barely noticable.