Skip to content

Instantly share code, notes, and snippets.

@slightfoot
slightfoot / max_buttons.dart
Created January 30, 2020 14:12
getMaxActionButtons for Flutter/Dart
import 'package:flutter/material.dart';
int getMaxActionButtons(BuildContext context) {
final mediaQuery = MediaQuery.of(context);
final width = mediaQuery.size.width;
final height = mediaQuery.size.height;
final smallest = mediaQuery.size.shortestSide;
if (smallest > 600 || (width > 960 && height > 720) || (width > 720 && height > 960)) {
// For values-w600dp, values-sw600dp and values-xlarge.
return 5;
@AgentOak
AgentOak / youtube_formats.md
Last active July 24, 2024 11:20
Youtube Format IDs

Last updated: April 2021

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 MP4 WebM WebM WebM MP4 MP4