Pad

pub package

Quick padding for Flutter with a short syntax. Instead of:

   const Padding(
      padding: EdgeInsets.only(top: 10.0),
      child: Text("Foo")
   )

You can use:

   const PadTop(10.0, child: Text("Foo"))

Usage

Directional padding

   const Pad(
      bottom: 10.0,
      top: 10.0,
      left: 10.0,
      right: 10.0,
      child: Text("Foo")
   )

All parameters are optional

Pad left

   const PadLeft(10.0, child: Text("Foo"))

Pad right

   const PadRight(10.0, child: Text("Foo"))

Pad top

   const PadTop(10.0, child: Text("Foo"))

Pad bottom

   const PadBottom(10.0, child: Text("Foo"))

Pad horizontal

   const PadHorizontal(10.0, child: Text("Foo"))

Pad vertical

   const PadVertical(10.0, child: Text("Foo"))

Pad all

   const PadAll(10.0, child: Text("Foo"))

Pad from LTRB

   const PadLTRB(
      10.0,
      15.0,
      10.0,
      15.0,
      child: Text("Foo")
   )

Libraries

pad

Dart

VM

dart:ffi
Foreign Function Interface for interoperability with the C programming language. [...]

Web

dart:html
HTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model). [...]
dart:js
Low-level support for interoperating with JavaScript. [...]
dart:js_util
Utility methods to efficiently manipulate typed JSInterop objects in cases where the name to call is not known at runtime. You should only use these methods when the same effect cannot be achieved with @JS annotations. These methods would be extension methods on JSObject if Dart supported extension methods.