Skip to content

Instantly share code, notes, and snippets.

View azabcodes's full-sized avatar

Mahmoud Azab azabcodes

View GitHub Profile
@azabcodes
azabcodes / adaptive_form_factor.dart
Created December 21, 2024 19:59
adaptive_form_factor.dart
import 'package:flutter/material.dart';
extension AdaptiveCount on BuildContext {
T withFormFactor<T>({
required T onMobile,
required T onTablet,
required T onDesktop,
bool followDeviceOrientation = true,
}) {
final formFactor = this.formFactor(