styles.dart 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:flutter_screenutil/flutter_screenutil.dart';
  4. import '../resource/colors.gen.dart';
  5. class Styles {
  6. Styles._();
  7. static Decoration getActivateButtonDecoration(double radius) {
  8. return ShapeDecoration(
  9. gradient: LinearGradient(
  10. colors: [const Color(0xFF7D46FC), const Color(0xFFBC87FF)],
  11. ),
  12. shape: RoundedRectangleBorder(
  13. borderRadius: BorderRadius.circular(radius),
  14. ),
  15. );
  16. }
  17. static Decoration getInactiveButtonDecoration(double radius) {
  18. return ShapeDecoration(
  19. color: const Color(0xFF7D46FC).withAlpha(100),
  20. shape: RoundedRectangleBorder(
  21. borderRadius: BorderRadius.circular(radius),
  22. ),
  23. );
  24. }
  25. static TextStyle getTextStyleBlack204W400(double? sp) {
  26. return TextStyle(
  27. color: Colors.black.withAlpha(204),
  28. fontSize: sp,
  29. fontWeight: FontWeight.w400,
  30. );
  31. }
  32. static TextStyle getTextStyleBlack204W500(double? sp) {
  33. return TextStyle(
  34. color: Colors.black.withAlpha(204),
  35. fontSize: sp,
  36. fontWeight: FontWeight.w500,
  37. );
  38. }
  39. static TextStyle getTextStyleWhiteW500(double? sp) {
  40. return TextStyle(
  41. color: Colors.white,
  42. fontSize: sp,
  43. fontWeight: FontWeight.w500,
  44. );
  45. }
  46. static TextStyle getTextStyleWhiteW400(double? sp) {
  47. return TextStyle(
  48. color: Colors.white,
  49. fontSize: sp,
  50. fontWeight: FontWeight.w400,
  51. );
  52. }
  53. }