Skip to content

Instantly share code, notes, and snippets.

View loic-sharma's full-sized avatar
🙃

Loïc Sharma loic-sharma

🙃
View GitHub Profile
@loic-sharma
loic-sharma / main.cpp
Created January 10, 2025 20:44
Headless Flutter Windows app
#include <flutter/dart_project.h>
#include <flutter/flutter_view_controller.h>
#include <flutter/generated_plugin_registrant.h>
#include <windows.h>
#include "flutter_window.h"
#include "utils.h"
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
_In_ wchar_t *command_line, _In_ int show_command) {
@loic-sharma
loic-sharma / main.dart
Last active October 17, 2024 23:17
Flutter decorators using callables
class Key {}
class Size {}
class Widget {}
// Decorator uses Dart callable magic
// https://dart.dev/language/callable-objects
class SizedBoxDecorator {
SizedBoxDecorator(this.child);
final Widget child;
@loic-sharma
loic-sharma / main.dart
Created September 30, 2024 18:03
Dart base64 encode
import 'dart:convert';
void main() {
String text = "This string will be base64 encoded!";
print(base64Encode(utf8.encode(text)));
}
@loic-sharma
loic-sharma / 0 - README.md
Created July 18, 2024 20:27
Package sources

To generate top_200_popular_packages_20240718.json:

.mode list
.output sources/top_200_popular_packages_20240605.txt

SELECT
  lower_id
FROM 'tables/package_scores.json'
ORDER BY popularity_score DESC
@loic-sharma
loic-sharma / archive.md
Created July 9, 2024 18:24
Flutter design docs archive
@loic-sharma
loic-sharma / About.md
Last active October 26, 2024 03:22
Pub's migration to Swift Package Manager (2024-10-06)

Pub's migration to Swift Package Manager (2024-10-06)

These reports track the Pub ecosystem's migration from CocoaPods to Swift Package Manager.

This data was generated on 2024-10-06 using pub insights: https://github.com/loic-sharma/pub_insights

Results

  1. 10,900 packages contain a .podspec file.
  2. 444 packages contain a .modulemap file.
@loic-sharma
loic-sharma / error.md
Last active May 17, 2024 00:24
Shadowed submodule error

Shadowed submodule error

Problem

I am adding Swift Package Manager support to the camera_avfoundation package. See: flutter/packages#6710

However, the Mac_x64 ios_build_all_packages master check fails:

Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
@loic-sharma
loic-sharma / readme.md
Last active March 18, 2024 16:35
Android link error

Android link error reactions each day

flutter/flutter#83596

Data ranges from July 18, 2021 to March 3, 2024.

image

Week New reactions
@loic-sharma
loic-sharma / rfw_json.md
Last active February 26, 2024 17:58
RFW JSON format strawman

Given the following RFW text:

import core.widgets;

widget root = Row(
  children: [
    ...for city in args.cities:
      switch args.showCities {
        true: City(),