Skip to content

Instantly share code, notes, and snippets.

Jetpack Compose Modifier Cheat Sheet

A categorized overview of the most commonly used Modifier extension functions across
Compose UI, Foundation, Material 3, and Shared Element / Shadow APIs.


📦 Core UI Modifiers (androidx.compose.ui.Modifier)

Layout

Jetpack Compose Modifier Cheat Sheet

A categorized overview of the most commonly used Modifier extension functions across
Compose UI, Foundation, and Material 3.


📦 Core UI Modifiers (androidx.compose.ui.Modifier)

Layout

@MaherSafadii
MaherSafadii / gist:a65220fa89052568e22146fecedc58d6
Created November 18, 2025 20:13
Flutter decorating solution notes
Flutter decorating solution
General notes:
- If the reason to not go with a solution is because of “we have to get used to it” or “it’s hard to get used to it”, the reason is discarded, because this can be said about anything in any framework.
- why are we even planning to use a new solution for decorating widgets when things work fine? things currently work but there are flaws than can be improved by a lot, Flutter is always known (made fun of by Flutter haters) for the heavy nesting and tons of parenthesis and commas everywhere, you might ask, well devs can get used to these problems? This is true, I currently use Flutter and navigate and write code flawlessly, but for incoming devs, it might reduce Flutters appeal to them.
- Flutter has a problem which is called “Everything is a widget”, it sounds like a good concept but it really isn’t, I remember when I first tried Flutter years ago when trying to apply padding, there turns out to be a specific widget that adds padding which I found odd, I saw it
//
// ContentView.swift
// Aurora Weather
//
// Created by maher safadi on 18/10/2023.
//
import AlertKit
import ColorfulX
import CoreLocation
@MaherSafadii
MaherSafadii / new_ios_ui.dart
Created March 14, 2025 20:50
iOS 19 leaks inspired UI in Flutter
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:ios_19_example/new_ios_ui.dart';
void main() {
runApp(const MainApp());
}
@MaherSafadii
MaherSafadii / notes.txt
Last active February 14, 2025 15:43
Cupertino fidelity notes
1. The new CupertinoSliverNavigationbar.search searchfield bar has incorrect horizontal padding and placement.
2. The Cupertino wheel picker doesn't have the fade out effect for the items when they go out of view like with native.
3. The Cupertino wheel picker doesn't make the native tick sound effect when the selected item is changed, i tried playing aroung once to try and fix it, turns out the tick sound is a system sound that you can play using the AudioToolBox (iOS framework), you play the sound by running udioServicesPlaySystemSoundWithCompletion(1157, nil), 1157 is the id of the system sound.
4. There isn't a proper up-to-date toolbar API, instead we only have just trailing and leading for Cupertino nav bars, on native there is a extensive API that allows you to specify that widgets location, including on the bottom of the screen not just the top navigation bar, since the bottom is also considered a toolbar.
5. Adding widgets to CupertinoNavigationBar's leading and trailing is a painful chore, on na
@MaherSafadii
MaherSafadii / flutter_cupertino_example.dart
Last active August 23, 2025 01:46
Flutter Cupertino Example
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:native_ios_dialog/native_ios_dialog.dart';
import 'package:pull_down_button/pull_down_button.dart';
ValueNotifier<Brightness> brightness = ValueNotifier(Brightness.light);
ValueNotifier<Color> accentColor = ValueNotifier(CupertinoColors.activeBlue);
void main() {
runApp(MainApp());
@MaherSafadii
MaherSafadii / cupertino_modal_sheet.dart
Created January 13, 2025 10:39
Flutter's official iOS 13 modal sheet
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/cupertino.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/services.dart';
// Tween for animating a Cupertino sheet onto the screen.
//
@MaherSafadii
MaherSafadii / gist:1747777e35fe83726b99d78b6ae1187c
Created January 13, 2025 10:38
official_cupertino_modal_sheet
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/cupertino.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/services.dart';
// Tween for animating a Cupertino sheet onto the screen.
//
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
// Offset from offscreen below to stopping below the top of the screen.
final Animatable<Offset> _kBottomUpTween = Tween<Offset>(
begin: const Offset(0.0, 1.0),