Package to select layout per orientation or device size like mobile vs tablet layouts or portrait vs landscape

Overview

proxy_layout

pub package

Package to select layout per orientation or device size like mobile vs tablet layouts or portrait vs landscape

Usage

You have two widgets at your disposal, DeviceProxy to use different widget for mobile and tablet devices, OrientationProxy to use different device depending of the device orientation.

DeviceProxy

DeviceProxy(
        mobileBuilder: (context) => Text('Mobile widget'),
        tabletBuilder: (context) => Text('Tablet widget'),
      ),

The threshold to separate Mobile and Tablet devices is 600, you can override it by setting the threshold attribute.

If you don't want to specify mobile and tablet you can use builder attribute that will let you know if you are on tablet or mobile with DeviceProxyType enum.

The is isMobile and isTablet static methods available if you need to know at some point the device type to tweak some attributes.

OrientationProxy

OrientationProxy(
          landscapeBuilder: (context) => Text('Landscape widget'),
          portraitBuilder: (context) => Text('Portrait widget'),
        ),

If you don't want to specify portrait and landscape you can use builder attribute that will let you know which orientation you are with DeviceOrientationType enum.

The is isPortrait and isLandscape static methods available if you need to know at some point the orientation to just tweak some attributes.

LayoutProxy

LayoutProxy help you manage device and orientation at once, check this out:

LayoutProxy(
          tabletPortraitBuilder: (context) => Text('Tablet portrait widget'),
          tabletLandscapeBuilder: (context) => Text('Tablet landscape widget'),
          mobilePortraitBuilder: (context) => Text('Mobile portrait widget'),
          mobileLandscapeBuilder: (context) => Text('Mobile landscape widget'),
        ),

The threshold to separate Mobile and Tablet devices is 600, you can override it by setting the threshold attribute.

You might also like...

Responsive Scaffold - On mobile it shows a list and pushes to details and on tablet it shows the List and the selected item. Maintainer: @rodydavis

Responsive Scaffold - On mobile it shows a list and pushes to details and on tablet it shows the List and the selected item. Maintainer: @rodydavis

responsive_scaffold View the online demo here! On mobile it shows a list and pushes to details and on tablet it shows the List and the selected item.

Dec 2, 2022

A pixel perfect dashboard for mobile, tablet and desktop.

A pixel perfect dashboard for mobile, tablet and desktop.

Dec 27, 2022

Example implementation of Responsive Screen for Mobile, Tablet, Web, and Desktop in Flutter

flutter_responsive A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you start

Oct 12, 2022

A WallpaperWalaApp is a Simple Wallpaper app🏞️ developed in Flutter 💙 , with responsive UI✨ for Mobile📱 and Tablet 💻

A WallpaperWalaApp is a Simple Wallpaper app🏞️ developed in Flutter 💙 , with responsive UI✨ for Mobile📱 and Tablet 💻

WallpaperWalaApp A WallpaperWalaApp is a Simple Wallpaper app 🏞️ developed in Flutter 💙 , with responsive UI ✨ for Mobile 📱 and Tablet 💻 . Fetch d

Sep 16, 2022

In this repo you'll find how to responsive any screen whether it's for mobile, tablet and desktop

This repo is all about responsiveness of screen using flutter: By cloning and giving this repo a star you can get the concept of responsiveness of screen whether the screen is for mobile, tablet and desktop.

Aug 29, 2022

SSH no ports provides ssh to a remote Linux device with out that device having any ports open

Ssh! No ports ssh no ports provides a way to ssh to a remote linux host/device without that device having any open ports (not even 22) on external int

Dec 21, 2022

Flutter-pinbox - UI for enter a PIN on flutter/dart, one digit per textField box.

Flutter-pinbox - UI for enter a PIN on flutter/dart, one digit per textField box.

flutter-pinbox This is a library for enter a PIN on flutter/dart. You can enter one digit per textField box. The detail The library locate at path lib

Feb 26, 2022

Apply values per media breakpoints. Breakpoints are similar to the breakpoints used in bootstrap css framework.

Apply values per media breakpoints. Breakpoints are similar to the breakpoints used in bootstrap css framework.

Apply values per media breakpoints. Breakpoints are similar to the breakpoints used in bootstrap css framework.

Mar 26, 2021

Additional alignments to help make your layouts more readable (TopLeft, TopRight, etc)

extra alignments Why should Center get all the love? This package adds additional alignments to help make your layouts more readable. The full set inc

Jan 6, 2023
Comments
  • Why two Proxies instead of one?

    Why two Proxies instead of one?

    Hi, I was just wondering if it wouldn't be better to have one proxy that offers all 4 combinations of orientation and size because if I already care for different sizes I probably also want to handle orientation.

    enhancement 
    opened by escamoteur 1
Owner
Jimmy Aumard
Open source enthousiaste !
Jimmy Aumard
A flutter library for loading images from network, resizing as per container size and caching while being memory sensitive.

Optimized Cached Image A flutter library for loading images from network, resizing and caching them for memory sensitivity. This resizes and stores th

Anvith Bhat 76 Dec 20, 2022
A responsive scaffold widget that adjusts to your device size, for your flutter mobile and web apps.

scaffold_responsive A responsive scaffold widget that adjusts to your device size, for your flutter mobile and web apps. Check out the Live demo here

Tushar Sadhwani 9 Sep 27, 2022
MetaFlutter - A tool to build Flutter layouts on-device

MetaFlutter MetaFlutter is a project to create Flutter layouts on device. Learn, explore and experiment with Flutter widgets directly on your phone. M

Deven Joshi 162 Nov 22, 2022
The definitive landscape virtual keyboard for flutter projects that can't support regular virtual keyboards

VK Flutter Virtual Keyboard The definitive landscape virtual keyboard for flutte

Mohammad Taha Bin Firoz 13 Dec 13, 2022
Flutter application for latest news by top newspapers . And allow for share articles with friends. Now available in night mode. Also landscape mode is available

Breaking News Latest news for almost 55 country. Feature of saving article and search ariticles. Used API https://newsapi.org/ Note: if data is not ge

null 7 Oct 24, 2022
A grid-based layout system for Flutter, inspired by CSS Grid Layout

Flutter Layout Grid A powerful grid layout system for Flutter, optimized for complex user interface design. Click images to see their code ✨ Featuring

Felt 307 Dec 24, 2022
Custom calendar dialog widget for flutter with (multi select, single select, date range) mode

some calendar Custom calendar with Multi-select & range configurable calendar New Features Added View Mode Somecalendar #15 Help Maintenance I've take

Irvan Lutfi Gunawan 69 Jan 3, 2023
A grid-based layout system for Flutter, inspired by CSS Grid Layout

Flutter Layout Grid A powerful grid layout system for Flutter, optimized for complex user interface design. Click images to see their code ✨ Featuring

Felt 307 Dec 24, 2022
Flutter After Layout - Brings functionality to execute code after the first layout of a widget has been performed

Flutter After Layout - Brings functionality to execute code after the first layout of a widget has been performed, i.e. after the first frame has been displayed. Maintainer: @slightfoot

Flutter Community 432 Jan 3, 2023
System info plus - A Flutter plugin to get device Random Access Memory (RAM) size

system_info_plus A Flutter plugin to get device Random Access Memory (RAM) size.

Sebghatullah Yusuf 2 Aug 21, 2022