Scale the entire UI design proportionally. Button, image, font, everything is scaled automatically

Overview

Scale the entire UI design proportionally.

Button, image, font, everything is scaled automatically.

Before:

  • 250x250 square is the same size across devices

Screenshots of the same design before scaling

After:

  • 250x250 square is two thirds the screen width across devices

Screenshots of the same design after scaling

  • if we resize the screenshots above to be the same width
  • then everything appears the same size as below

Resized screenshots of the same design after scaling

Features

Use this package in your Flutter app when:

  • the UI design is fixed-width
  • you want to scale the entire UI, not just part of it

Getting Started

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  scaled_app: ^0.2.1

For projects using Flutter 2.x.x, add the following dependency:

dependencies:
  ...
  scaled_app:
    git:
      url: https://github.com/LastMonopoly/scaled_app.git
      ref: flutter_2.x.x

Import it:

import 'package:scaled_app/scaled_app.dart';

Usage

Replace runApp with runAppScaled

void main() {
  // 1st way to use this package
  // baseWidth is the screen width used for your UI design
  runAppScaled(const MyApp(), baseWidth: 375);
}

Or, replace WidgetsFlutterBinding with ScaledWidgetsFlutterBinding

void main() {
  // 2nd way to use this package
  // Scaling will be applied when [applyScaling] returns true
  ScaledWidgetsFlutterBinding.ensureInitialized(
    baseWidth: 375,
    applyScaling: (deviceWidth) => deviceWidth > 300 && deviceWidth < 400,
  );
  runAppScaled(const MyApp());
}

Known Issues

This package currently won't work in Android release build.

You might also like...

Create bulk instagram quotes posts with custom background, style, font, size. built using flutter

Create bulk instagram quotes posts with custom background, style, font, size. built using flutter

Mini Canva minicanva.com Bulk Image Generator from given list of quotes, lines 🌈 Purpose Etsy is an E-commerce platform where we can sell digital goo

Oct 29, 2022

DDC Font App for iOS

DDC Font App for iOS

DDC Font App for iOS This is the project code for DDC Font app. Do check out locally and update or refector the code with suitable message. Note on iO

Aug 31, 2022

A better font for golden tests.

A better font for golden tests.

A better font for golden tests. This project is a Flutter Bounty Hunters proof-of-concept. Want font adjustments? Fund a milestone today! Golden Brick

Dec 14, 2022

A flutter package that developers have pretty logs instead just printing everything like a newbie

A flutter package that developers have pretty logs instead just printing everything like a newbie. Features Makes it easy to log to console without us

Nov 28, 2021

An app to show everything bus related in Singapore, including arrival times and a directory

An app to show everything bus related in Singapore, including arrival times and a directory

NextBus SG An app to show everything bus related in Singapore, including bus arrival times and a directory, with extra features. 🎆 Gallery Click here

Sep 13, 2022

Aris imageexmii - Learn everything about images such as adding filters, borders & different shapes

Aris imageexmii - Learn everything about images such as adding filters, borders & different shapes

Flutter Tutorial - 2/2 Image - Deep Dive Learn everything about images such as a

Dec 29, 2021

Ever want to create a quick form without wiring everything up? This might be the library for you.

Ever want to create a quick form without wiring everything up? This might be the library for you.

Sep 13, 2022

Riverpod State Mgmt for Flutter. StateProviders, StateNotifierProviders, FutureProviders, StreamProviders, autodisposed and families, and everything in-between.

Riverpod State Mgmt for Flutter. StateProviders, StateNotifierProviders, FutureProviders, StreamProviders, autodisposed and families, and everything in-between.

Flutter Riverpod Learning/Reference zone A Null-Safety flutter project acting as a learning/code reference zone Based on Riverpod (v1/v2) Page Transit

Dec 24, 2022
Comments
Releases(v0.2.3)
Owner
Wildcard
Wildcard
A widget that shows an image which can be scaled and dragged using gestures.

[DISCONTINUED] - 24.05.2021 While this widget was useful in the early days of Flutter, the Flutter team introduced an own way to zoom and pan, see Int

EPNW 15 May 3, 2022
FLUTTER API: Video Editor allows trim, crop, rotate and scale video with a super flexible UI Design

video_editor My other APIs Scroll Navigation Video Viewer Helpers Features Super flexible UI Design. Support actions: Crop Trim Scale Rotate Cover sel

Luis Felipe Murguia Ramos 214 Dec 26, 2022
⚖️ A Flutter Architecture for small/medium/large/big large scale using Provider as State Management with Get It!

Flutter Provider Architecture Mobile Application Developed in Flutter. Running on both mobile platforms, Android ?? & iOS ?? . About this app This app

Samuel Matias 82 Jan 4, 2023
GetX Architecture for large scale project, This project include - pagination, pull to refresh, localization, network call and advance error handling

GetX Architecture for large scale project, This project include - pagination, pull to refresh, localization, network call and advance error handling

Wai Han Ko 5 Nov 29, 2022
Swipeable button view - Create Ripple Animated Pages With Swipeable Button View

swipeable_button_view You can create ripple animated pages with swipeable_button

cemreonur 3 Apr 22, 2022
A font catalogue app made with flutter

Fontina An app which showcases a personally curated collection of fonts. Written in flutter, cross-platform and responsive. Uses the Fontgen API to di

Shreeyans Bahadkar 54 Nov 22, 2022
A font loader to download, cache and load web fonts in flutter with support for Firebase Cloud Storage.

Dynamic Cached Fonts A simple, easy to use yet customizable font loader to use web fonts. Demo: https://sidrao2006.github.io/dynamic_cached_fonts ?? I

Aneesh Rao 18 Dec 21, 2022
Flutter screen adaptation, font adaptation, get screen information

flutter_screenutil A flutter plugin for adapting screen and font size.Let your UI display a reasonable layout on different screen sizes! Note: This pl

OpenFlutter 3.4k Jan 6, 2023
The Font Awesome Icon pack available as Flutter Icons

font_awesome_flutter The Font Awesome Icon pack available as set of Flutter Icons. Based on Font Awesome 5.15.4. Includes all free icons: Regular Soli

Flutter Community 731 Dec 28, 2022