Skip to content

Instantly share code, notes, and snippets.

View alexmercerind's full-sized avatar

Hitesh Kumar Saini alexmercerind

View GitHub Profile
@damywise
damywise / main.dart
Created April 10, 2023 16:43
fl_chart reveal animation
import 'dart:math';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
@loic-sharma
loic-sharma / tutorial.md
Last active April 8, 2023 04:49
How to debug the Flutter engine on Windows

How to debug the Flutter engine on Windows

Let's say your app is misbehaving because of a Flutter engine bug. Let's debug that!

Use Visual Studio to run your app

Let's open your app using Visual Studio:

  1. Run flutter build windows to ensure Flutter has generated a Visual Studio project for your app.
  2. Open ./build/windows/ALL_BUILD.vcxproj in Visual Studio. This project builds the native entry point for your Flutter app.
@erikas-taroza
erikas-taroza / set_display_name.dart
Last active July 26, 2022 12:49
Sets the display name of the Flutter app in Windows' mixer. Solves the issue of the name not changing in the mixer without setting the user agent (DartVLC).
import 'dart:ffi';
import 'package:ffi/ffi.dart';
import 'package:win32/win32.dart';
/// Documentation:
/// Dart Win32 Example - https://github.com/timsneath/win32/blob/main/example/wasapi.dart
///
/// Win32Api IMMDeviceEnumerator - https://docs.microsoft.com/en-us/windows/win32/api/mmdeviceapi/nn-mmdeviceapi-immdeviceenumerator
///
@justfoolingaround
justfoolingaround / socket_mpv.py
Created May 14, 2022 12:01
Windows MPV IPC Connection Client
import contextlib
import random
import sys
import threading
import time
from multiprocessing.connection import PipeConnection
import _winapi
import ujson
@rtybanana
rtybanana / marquee.dart
Created October 1, 2021 22:08
Marquee wrapper which only scrolls if the text is large enough
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:marquee/marquee.dart' as wrapped;
class Marquee extends StatelessWidget {
final String text;
final TextStyle? style;
final double? textScaleFactor;
final TextDirection textDirection;
final Axis scrollAxis;
@raitonoberu
raitonoberu / progressring.py
Last active March 24, 2021 20:40
Clone of the Fluent UI ProgressRing (pygame)
import pygame
import pygame.draw
import pygame.locals
from math import sin, cos, pi
FILLED_COLOR = (108, 88, 123)
UNFILLED_COLOR = (204, 204, 204)
deg2Rad = (2 * pi) / 360
@raitonoberu
raitonoberu / progressbar.py
Created March 23, 2021 10:35
Clone of the Fluent UI indeterminate ProgressBar (pygame)
import pygame
import pygame.draw
import pygame.locals
from math import cos, pi
FILLED_COLOR = (108, 88, 123)
UNFILLED_COLOR = (204, 204, 204)
class ProgressBar(object):
@daramkun
daramkun / memcpy_perf_measure.cpp
Created July 3, 2019 15:17
Memory Copy Performance Measure (memcpy, ID3D11DeviceContext::CopyResource)
#include <Windows.h>
#include <d3d11.h>
#include <atlbase.h>
#pragma comment (lib, "d3d11.lib")
#include <iostream>
#include <thread>
#include <chrono>
#include <memory>
#include <vector>
@Quasimondo
Quasimondo / sdl_opengl_player.cpp
Created June 27, 2019 09:11
Corrected version of VLC SDL OpenGL player example that is compatible with libvlc 4.0.0
//g++ sdl_opengl_player.cpp $(pkg-config --cflags --libs libvlc sdl2 gl)
/* Licence WTFPL */
/* Written by Pierre Lamot */
#include <stdio.h>
#include <stdlib.h>
#include <exception>
#include <mutex>
@aravindhkumar23
aravindhkumar23 / main.dart
Created May 3, 2019 13:12
Vertical scroll with alphabet scroll - Flutter
import 'package:flutter/material.dart';
import 'package:draggable_scrollbar/draggable_scrollbar.dart';
import 'package:flutter/foundation.dart';
import 'package:faker/faker.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override