SHARE
TWEET

Untitled

a guest Jul 18th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // This is a modified excerpt from Flutter library source code
  2.  
  3. // We have a class called EdgeInsets
  4.  
  5. class EdgeInsets extends EdgeInsetsGeometry {
  6. //   The first constructor
  7.   const EdgeInsets.fromLTRB(this.left, this.top, this.right, this.bottom);
  8. //   The second constrctor
  9. //   Notice: There's a colon following the signature, which resembles the form in C++
  10.   const EdgeInsets.all(double value)
  11.     : left = value,
  12.       top = value,
  13.       right = value,
  14.       bottom = value;
  15. //   The third constructor
  16. //   Notice: how named arguments are used
  17.   const EdgeInsets.only({
  18.     this.left = 0.0,
  19.     this.top = 0.0,
  20.     this.right = 0.0,
  21.     this.bottom = 0.0,
  22.   });
  23. //   .....
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top