Skip to content

Instantly share code, notes, and snippets.

@ClementBeal
ClementBeal / py
Created April 5, 2024 07:32
Optimize flutter web build
from collections import Counter
from decimal import Decimal
import gzip
from pathlib import Path
import re
from fractions import Fraction
file_data = Path(r"./my_app/build/web/main.dart.js").read_text()
initial_file_size = len(file_data)
@timnew
timnew / IndexedTrackingScrollController.dart
Last active January 2, 2024 13:54
Flutter Scrollable Controller which jump to given index
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'package:timnew_reader/features/App/common.dart';
class IndexedTrackingScrollController extends TrackingScrollController {
final GlobalKey sliverListKey = GlobalKey();
@gokulkrishh
gokulkrishh / media-query.css
Last active July 16, 2024 10:52
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */