Skip to content

Instantly share code, notes, and snippets.

View loic-sharma's full-sized avatar

Loïc Sharma loic-sharma

View GitHub Profile
using System.Net.Http.Json;
public class CurrencyRepo : RepoBase, ICurrencyRepo
{
private readonly HttpClient _http;
private readonly string _baseUrl;
public CurrencyRepo(
HttpClient http,
string baseUrl)
@loic-sharma
loic-sharma / main.dart
Last active May 1, 2023 16:55
CallbackShortcuts widget of the week example
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
@loic-sharma
loic-sharma / README.md
Last active April 21, 2023 22:31
Flutter SDK size analysis

Flutter SDK size analysis

The Windows Flutter SDK v3.7.12-stable.zip is 873MB. Here are the top 100 largest compressed items:

file: compressed file size
flutter/.pub-preload-cache/flutter_gallery_assets-1.0.2.tar.gz: 82.5MB
flutter/.git/objects/pack/pack-c596e5cc21ec5194eeaf69bf7115fb05e1a47638.pack: 69.8MB
flutter/bin/cache/artifacts/engine/windows-x64/flutter_windows.dll.pdb: 50.7MB
flutter/bin/cache/artifacts/engine/windows-x64-profile/flutter_windows.dll.pdb: 46.6MB
@loic-sharma
loic-sharma / update-semantics-abi.md
Last active February 9, 2023 18:45
Embedder API goof

ABI stability for the update semantics API

Background

In Flutter 3.7 we introduced a new embedder API for semantics update (flutter/engine#37129):

/// A batch of updates to semantics nodes and custom actions.
typedef struct {
  /// The size of the struct. Must be sizeof(FlutterSemanticsUpdate).
@loic-sharma
loic-sharma / feedback.md
Last active February 13, 2023 20:50
Perfetto feedback

Perfetto trace viewer feedback

Release notes

I got a What's new in DevTools popup. It has a picture of the Perfetto trace viewer, but that picture is really small:

Pasted image 20230207111052

Is there a picture that would work better in this small space?

@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.
@loic-sharma
loic-sharma / all_issue_reactions.graphql
Last active October 7, 2022 00:10
Grab a timeline of reactions for a repository's issues
{
repository(owner: "nuget", name: "home") {
issues(
first: 20
filterBy: {states: [OPEN]}
orderBy: {field: CREATED_AT, direction: DESC}
) {
pageInfo {
endCursor
}
@loic-sharma
loic-sharma / uwp-issues.md
Last active October 5, 2022 18:02
UWP issues
@loic-sharma
loic-sharma / fix.patch
Last active September 19, 2022 21:13
ANGLE fix for unbalanced COM closing
diff --git a/src/libANGLE/renderer/d3d/d3d11/converged/CompositorNativeWindow11.cpp b/src/libANGLE/renderer/d3d/d3d11/converged/CompositorNativeWindow11.cpp
index a2b190f38..bac68d5d0 100644
--- a/src/libANGLE/renderer/d3d/d3d11/converged/CompositorNativeWindow11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/converged/CompositorNativeWindow11.cpp
@@ -305,8 +305,13 @@ RoHelper::RoHelper()
auto result = RoInitialize(RO_INIT_MULTITHREADED);
- if (SUCCEEDED(result) || result == S_FALSE || result == RPC_E_CHANGED_MODE)
+ if (SUCCEEDED(result) || result == RPC_E_CHANGED_MODE)
@loic-sharma
loic-sharma / bug.patch
Last active September 19, 2022 20:49
ANGLE closes COM incorrectly
diff --git a/samples/gles1/HelloTriangle.cpp b/samples/gles1/HelloTriangle.cpp
index 0220b9678..2896ec547 100644
--- a/samples/gles1/HelloTriangle.cpp
+++ b/samples/gles1/HelloTriangle.cpp
@@ -13,6 +13,8 @@
// URLs: http://safari.informit.com/9780321563835
// http://www.opengles-book.com
+#include <objbase.h>
+