size.dart 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 sideBarSm => 200 * hitScale;
  33. static double get sideBarMed => 240 * hitScale;
  34. static double get sideBarLg => 290 * hitScale;
  35. }
  36. class Corners {
  37. static double get btn => s5;
  38. static double get dialog => 12;
  39. /// Xs
  40. static double get s3 => 3;
  41. static BorderRadius get s3Border => BorderRadius.all(s3Radius);
  42. static Radius get s3Radius => Radius.circular(s3);
  43. /// Small
  44. static double get s5 => 5;
  45. static BorderRadius get s5Border => BorderRadius.all(s5Radius);
  46. static Radius get s5Radius => Radius.circular(s5);
  47. /// Medium
  48. static double get s8 => 8;
  49. static BorderRadius get s8Border => BorderRadius.all(s8Radius);
  50. static Radius get s8Radius => Radius.circular(s8);
  51. /// Large
  52. static double get s10 => 10;
  53. static BorderRadius get s10Border => BorderRadius.all(s10Radius);
  54. static Radius get s10Radius => Radius.circular(s10);
  55. }