styles.dart 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/gestures.dart';
  3. import 'package:flutter/material.dart';
  4. import 'package:flutter_screenutil/flutter_screenutil.dart';
  5. import '../module/browser/browser_page.dart';
  6. import '../resource/colors.gen.dart';
  7. class Styles {
  8. Styles._();
  9. static Decoration getActivateButtonDecoration(double radius) {
  10. return ShapeDecoration(
  11. gradient: LinearGradient(
  12. colors: [const Color(0xFF7D46FC), const Color(0xFFBC87FF)],
  13. ),
  14. shape: RoundedRectangleBorder(
  15. borderRadius: BorderRadius.circular(radius),
  16. ),
  17. );
  18. }
  19. static Decoration getInactiveButtonDecoration(double radius) {
  20. return ShapeDecoration(
  21. color: const Color(0xFF7D46FC).withAlpha(100),
  22. shape: RoundedRectangleBorder(
  23. borderRadius: BorderRadius.circular(radius),
  24. ),
  25. );
  26. }
  27. static TextStyle getTextStyleBlack204W400(double? sp) {
  28. return TextStyle(
  29. color: Colors.black.withAlpha(204),
  30. fontSize: sp,
  31. fontWeight: FontWeight.w400,
  32. );
  33. }
  34. static TextStyle getTextStyleBlack204W500(double? sp) {
  35. return TextStyle(
  36. color: Colors.black.withAlpha(204),
  37. fontSize: sp,
  38. fontWeight: FontWeight.w500,
  39. );
  40. }
  41. static TextStyle getTextStyleWhiteW500(double? sp) {
  42. return TextStyle(
  43. color: Colors.white,
  44. fontSize: sp,
  45. fontWeight: FontWeight.w500,
  46. );
  47. }
  48. static TextStyle getTextStyleWhiteW400(double? sp) {
  49. return TextStyle(
  50. color: Colors.white,
  51. fontSize: sp,
  52. fontWeight: FontWeight.w400,
  53. );
  54. }
  55. static TextStyle getTextStyleFF663300W700(double? sp) {
  56. return TextStyle(
  57. color: const Color(0xFF663300),
  58. fontSize: sp,
  59. fontWeight: FontWeight.w700,
  60. );
  61. }
  62. static TextStyle getTextStyleFF663300W500(double? sp) {
  63. return TextStyle(
  64. color: const Color(0xFF663300),
  65. fontSize: sp,
  66. fontWeight: FontWeight.w500,
  67. );
  68. }
  69. static TextStyle getTextStyleFF663300W400(double? sp) {
  70. return TextStyle(
  71. color: const Color(0xFF663300),
  72. fontSize: sp,
  73. fontWeight: FontWeight.w400,
  74. );
  75. }
  76. static TextStyle getTextStyle99673300W400(double? sp) {
  77. return TextStyle(
  78. color: const Color(0x99673300),
  79. fontSize: sp,
  80. fontWeight: FontWeight.w400,
  81. );
  82. }
  83. static TextStyle getTextStyleFFECBBW500(double? sp) {
  84. return TextStyle(
  85. color: const Color(0xFFFFECBB),
  86. fontSize: sp,
  87. fontWeight: FontWeight.w500,
  88. );
  89. }
  90. static TextStyle getTextStyleFF7F14W500(double? sp) {
  91. return TextStyle(
  92. color: const Color(0xFFFF7F14),
  93. fontSize: sp,
  94. fontWeight: FontWeight.w500,
  95. );
  96. }
  97. }