draconian_utilities 0.0.1 copy "draconian_utilities: ^0.0.1" to clipboard
draconian_utilities: ^0.0.1 copied to clipboard

A simple collection of utilities to save myself seconds each day

Features #

A simple collections of utility functions that I find myself repeatedly having to implement with every project I start. I will add progressively more as I think of things and find the time. Admittedly, MediaQuery syntax just annoys me and every project I've worked on I create a simple utility. It takes me five minutes, five minutes I'd rather turn into 1.

Getting started #

Simply import the project, below will be a list of each utility with a code snippet on how to invoke and consume various utilities.

Usage #

To retrieve screen height or width use the below

  import 'package:draconian_utilities/dpi_util.dart';
      DpiUtil.getWidth(context);
      DpiUtil.getHeight(context);

To retrieve a percentage of the screen height or width, implement the below

  import 'package:draconian_utilities/dpi_util.dart';
  //percentOf will default to 100% if not provided
  DpiUtil.getPartialWidth(context, percentOf: .05);
  DpiUtil.getPartialHeight(context, percentOf: .05);
  

Additional information #

This is purely to save myself time; but I hope others will find it helpful.

1
likes
0
points
9
downloads

Publisher

unverified uploader

Weekly Downloads

A simple collection of utilities to save myself seconds each day

License

unknown (license)

Dependencies

flutter

More

Packages that depend on draconian_utilities