size.dart 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. import 'package:flutter/material.dart';
  2. class PageBreaks {
  3. static double get largePhone => 550;
  4. static double get tabletPortrait => 768;
  5. static double get tabletLandscape => 1024;
  6. static double get desktop => 1440;
  7. }
  8. class Insets {
  9. static double gutterScale = 1;
  10. static double scale = 1;
  11. /// Dynamic insets, may get scaled with the device size
  12. static double get mGutter => m * gutterScale;
  13. static double get lGutter => l * gutterScale;
  14. static double get xs => 2 * scale;
  15. static double get sm => 6 * scale;
  16. static double get m => 12 * scale;
  17. static double get l => 24 * scale;
  18. static double get xl => 36 * scale;
  19. }
  20. class FontSizes {
  21. static double get scale => 1;
  22. static double get s11 => 11 * scale;
  23. static double get s12 => 12 * scale;
  24. static double get s14 => 14 * scale;
  25. static double get s16 => 16 * scale;
  26. static double get s18 => 18 * scale;
  27. }
  28. class Sizes {
  29. static double hitScale = 1;
  30. static double get hit => 40 * hitScale;
  31. static double get iconMed => 20;
  32. static double get sideBarMed => 225 * hitScale;
  33. static double get sideBarLg => 290 * hitScale;
  34. }
  35. class Corners {
  36. static double get btn => s5;
  37. static double get dialog => 12;
  38. /// Xs
  39. static double get s3 => 3;
  40. static BorderRadius get s3Border => BorderRadius.all(s3Radius);
  41. static Radius get s3Radius => Radius.circular(s3);
  42. /// Small
  43. static double get s5 => 5;
  44. static BorderRadius get s5Border => BorderRadius.all(s5Radius);
  45. static Radius get s5Radius => Radius.circular(s5);
  46. /// Medium
  47. static double get s8 => 8;
  48. static BorderRadius get s8Border => BorderRadius.all(s8Radius);
  49. static Radius get s8Radius => Radius.circular(s8);
  50. /// Large
  51. static double get s10 => 10;
  52. static BorderRadius get s10Border => BorderRadius.all(s10Radius);
  53. static Radius get s10Radius => Radius.circular(s10);
  54. }