Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>ScreenUtil_HelperNew to Visual Studio Code? Get it now.
ScreenUtil_Helper

ScreenUtil_Helper

Mohamed Maher

|
38 installs
| (1) | Free
Automate the addition of .h, .w, .sp suffixes in Flutter projects for screen compatibility using Regular Expressions.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ScreenUtil Helper

Author: Mohamed Maher

Description

The ScreenUtil Helper is a VS Code extension designed to automate the addition of .h, .w, .sp, and .r suffixes in Flutter projects, ensuring screen compatibility with minimal effort. Using Regular Expressions, this extension helps save time by automatically applying the appropriate suffixes to height, width, fontSize, padding, and margin values.

Features

  • Adds .h to height values.
  • Adds .w to width values.
  • Adds .sp to font size values.
  • Replaces EdgeInsets.all with .r for responsive design.

This automation eliminates the need for manual editing, saving time and reducing errors in Flutter projects.

How to Use

  1. Open a Dart/Flutter project in VS Code.
  2. Run the command "Run ScreenUtil Helper" by pressing Ctrl+Shift+P (or Cmd+Shift+P on Mac).
  3. The extension will automatically search and replace the following patterns in your code:
    • height: <number> ➡️ height: <number>.h
    • width: <number> ➡️ width: <number>.w
    • fontSize: <number> ➡️ fontSize: <number>.sp
    • EdgeInsets.all(<number>) ➡️ EdgeInsets.all(<number>.r)

Example

Before running ScreenUtil Helper:

Container( height: 100, width: 200, fontSize: 16, padding: EdgeInsets.all(10), )

After running ScreenUtil Helper: Container( height: 100.h, width: 200.w, fontSize: 16.sp, padding: EdgeInsets.all(10.r), )

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft