Skip to content

Instantly share code, notes, and snippets.

@vijaybheda
Created February 13, 2022 08:17
Show Gist options
  • Select an option

  • Save vijaybheda/2a6ce673a9319a8520120d859de8a3f7 to your computer and use it in GitHub Desktop.

Select an option

Save vijaybheda/2a6ce673a9319a8520120d859de8a3f7 to your computer and use it in GitHub Desktop.
Dart - get Responsive Size for all UI
import 'package:flutter/material.dart';
import 'package:get/get.dart';
double getSize(double px) {
return px * ((MediaQuery.of(Get.context!).size.width) / 375);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment