style.dart 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import 'package:flutter/material.dart';
  2. import '../utils/index.dart';
  3. class DStyle {
  4. static const Size appBarHeight = Size.fromHeight(40);
  5. static Size appBarWithBottom(PreferredSizeWidget widget) {
  6. if(widget == null) return appBarHeight;
  7. return Size.fromHeight(appBarHeight.height + widget.preferredSize.height);
  8. }
  9. }
  10. class DColors {
  11. static const Main = Color.fromARGB(255, 253, 60, 60);
  12. static const back = Color.fromRGBO(243, 243, 243, 1);
  13. static const price = Color.fromRGBO(243, 0, 0, 1);
  14. }
  15. class DText {
  16. static const Main = TextStyle();
  17. static TextStyle appBar = TextStyle(fontSize: 16.px);
  18. static TextStyle search = TextStyle(fontSize: 16.px, color: Colors.black);
  19. static TextStyle price = TextStyle(color: DColors.price, fontWeight: FontWeight.bold, fontSize: 10.px);
  20. }
  21. class DShadow {
  22. static const top = [
  23. BoxShadow(
  24. color: Color.fromRGBO(223, 223, 223, 1),
  25. offset: Offset(0.0, -3.0), //阴影xy轴偏移量
  26. blurRadius: 2.0, //阴影模糊程度
  27. spreadRadius: 1.0 //阴影扩散程度
  28. )
  29. ];
  30. static const down = [
  31. BoxShadow(
  32. color: Color.fromRGBO(223, 223, 223, 1),
  33. offset: Offset(0.0, 3.0), //阴影xy轴偏移量
  34. blurRadius: 2.0, //阴影模糊程度
  35. spreadRadius: 1.0 //阴影扩散程度
  36. )
  37. ];
  38. }