Skip to content

Instantly share code, notes, and snippets.

View orestesgaolin's full-sized avatar
🍪
hello worlds

Dominik Roszkowski orestesgaolin

🍪
hello worlds
View GitHub Profile

This step by step guide uses issue RegEx: add a way to get the positions of groups #42307 as a concrete example. You can also watch associated videos:

Step 0: Ask the team

Ask Dart team before jumping into the implementation. The best place to ask is on the issue tracker, you can also try hackers-dart channel on Flutter Discord or one of the channels on Dart Community discord - but most SDK developers are not on either of them.

Why ask the team?

@rayliverified
rayliverified / shake_utils.dart
Created May 25, 2020 18:13
Flutter Shake Detection Attempt (algorithm doesn't filter events well)
import 'dart:async';
import 'package:rxdart/rxdart.dart';
import 'package:sensors/sensors.dart';
Stream<bool> isShaking() {
final timeout = Duration(milliseconds: 300);
final accelerationThreshold = 3;
final sampleInterval = Duration(milliseconds: 50);
final moveCountThreshold = 5;
@jeroen-meijer
jeroen-meijer / fluttercleanrecursive.sh
Created September 15, 2019 13:00
Flutter Clean Recursive - Clear up space on your hard drive by cleaning your Flutter projects. This script searches for all Flutter projects in this directory and all subdirectories and runs 'flutter clean'. Note: may take a long time for folders with large amounts of projects.
#!/bin/sh
# To run, download the script or copy the code to a '.sh' file (for example 'fluttercleanrecursive.sh') and run like any other script:
# sh ./fluttercleanrecursive.sh
# or
# sudo sh fluttercleanrecursive.sh
echo "Flutter Clean Recursive (by jeroen-meijer on GitHub Gist)"
echo "Looking for projects... (may take a while)"
@slightfoot
slightfoot / multi_select.dart
Last active January 11, 2025 08:28
Multi Select GridView in Flutter - by Simon Lightfoot (Drag to select multiple items) Try now here: https://dartpad.dev/?id=a002dd1e031f5f012f810c6d5da14a11
// MIT License
//
// Copyright (c) 2019 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 / always_scrollbar.dart
Created March 4, 2019 18:20
Always Visible Scrollbar for Flutter - 4th March 2019
import 'package:flutter/gestures.dart' show DragStartBehavior;
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
primaryColor: Colors.indigo,
@LynoDesu
LynoDesu / AndroidHelpers.cs
Created June 20, 2018 19:04
Disable ShiftMode in Xamarin.Forms Android BottomNavigationView
using System;
using Android.Support.Design.Internal;
using Android.Support.Design.Widget;
namespace MyProject.App.Droid.Helpers
{
public static class AndroidHelpers
{
public static void SetShiftMode(this BottomNavigationView bottomNavigationView, bool enableShiftMode, bool enableItemShiftMode)
{
@marcin-chwedczuk
marcin-chwedczuk / dotnetomaniak-1.md
Created June 8, 2018 19:33
Kiedy unikać async/await w wyrażeniach lambda

Od pewnego czasu do pisania testów jednostkowych używam bibliotek XUnit, NSubstitute oraz NFluent. Zwłaszcza ta ostatnia przypadła mi do gustu.

Jedną z metod oferowanych przez NFluent jest Check.ThatAsyncCode(...), na przykład:

Check
    .ThatAsyncCode(() => Task.Delay(0))
    .DoesNotThrow();
@kuhlenh
kuhlenh / .editorconfig
Last active October 4, 2021 04:56
Roslyn .NET OSS (WIP)
###############################
# Core EditorConfig Options #
###############################
root = true
# All files
[*]
indent_style = space
# Code files
@timothystewart6
timothystewart6 / oh-my-zsh-windows.md
Last active July 6, 2018 17:31
Install oh my zsh on bash on Ubuntu (Linux Subsystem)