gsy_style.dart 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. import 'package:flutter/material.dart';
  2. ///颜色
  3. class GSYColors {
  4. static const int primaryIntValue = 0xFF24292E;
  5. static const MaterialColor primarySwatch = const MaterialColor(
  6. primaryIntValue,
  7. const <int, Color>{
  8. 50: const Color(primaryIntValue),
  9. 100: const Color(primaryIntValue),
  10. 200: const Color(primaryIntValue),
  11. 300: const Color(primaryIntValue),
  12. 400: const Color(primaryIntValue),
  13. 500: const Color(primaryIntValue),
  14. 600: const Color(primaryIntValue),
  15. 700: const Color(primaryIntValue),
  16. 800: const Color(primaryIntValue),
  17. 900: const Color(primaryIntValue),
  18. },
  19. );
  20. static const String primaryValueString = "#24292E";
  21. static const String primaryLightValueString = "#42464b";
  22. static const String primaryDarkValueString = "#121917";
  23. static const String miWhiteString = "#ececec";
  24. static const String actionBlueString = "#267aff";
  25. static const String webDraculaBackgroundColorString = "#282a36";
  26. static const Color primaryValue = Color(0xFF24292E);
  27. static const Color primaryLightValue = Color(0xFF42464b);
  28. static const Color primaryDarkValue = Color(0xFF121917);
  29. static const Color cardWhite = Color(0xFFFFFFFF);
  30. static const Color textWhite = Color(0xFFFFFFFF);
  31. static const Color miWhite = Color(0xffececec);
  32. static const Color white = Color(0xFFFFFFFF);
  33. static const Color actionBlue = Color(0xff267aff);
  34. static const Color subTextColor = Color(0xff959595);
  35. static const Color subLightTextColor = Color(0xffc4c4c4);
  36. static const Color mainBackgroundColor = miWhite;
  37. static const Color mainTextColor = primaryDarkValue;
  38. static const Color textColorWhite = white;
  39. }
  40. ///文本样式
  41. class GSYConstant {
  42. static const String app_default_share_url =
  43. "https://github.com/CarGuo/gsy_github_app_flutter";
  44. static const lagerTextSize = 30.0;
  45. static const bigTextSize = 20.0;
  46. static const normalTextSize = 18.0;
  47. static const middleTextWhiteSize = 16.0;
  48. static const smallTextSize = 14.0;
  49. static const minTextSize = 12.0;
  50. static const minText = TextStyle(
  51. color: GSYColors.subLightTextColor,
  52. fontSize: minTextSize,
  53. );
  54. static const smallTextWhite = TextStyle(
  55. color: GSYColors.textColorWhite,
  56. fontSize: smallTextSize,
  57. );
  58. static const smallText = TextStyle(
  59. color: GSYColors.mainTextColor,
  60. fontSize: smallTextSize,
  61. );
  62. static const smallTextBold = TextStyle(
  63. color: GSYColors.mainTextColor,
  64. fontSize: smallTextSize,
  65. fontWeight: FontWeight.bold,
  66. );
  67. static const smallSubLightText = TextStyle(
  68. color: GSYColors.subLightTextColor,
  69. fontSize: smallTextSize,
  70. );
  71. static const smallActionLightText = TextStyle(
  72. color: GSYColors.actionBlue,
  73. fontSize: smallTextSize,
  74. );
  75. static const smallMiLightText = TextStyle(
  76. color: GSYColors.miWhite,
  77. fontSize: smallTextSize,
  78. );
  79. static const smallSubText = TextStyle(
  80. color: GSYColors.subTextColor,
  81. fontSize: smallTextSize,
  82. );
  83. static const middleText = TextStyle(
  84. color: GSYColors.mainTextColor,
  85. fontSize: middleTextWhiteSize,
  86. );
  87. static const middleTextWhite = TextStyle(
  88. color: GSYColors.textColorWhite,
  89. fontSize: middleTextWhiteSize,
  90. );
  91. static const middleSubText = TextStyle(
  92. color: GSYColors.subTextColor,
  93. fontSize: middleTextWhiteSize,
  94. );
  95. static const middleSubLightText = TextStyle(
  96. color: GSYColors.subLightTextColor,
  97. fontSize: middleTextWhiteSize,
  98. );
  99. static const middleTextBold = TextStyle(
  100. color: GSYColors.mainTextColor,
  101. fontSize: middleTextWhiteSize,
  102. fontWeight: FontWeight.bold,
  103. );
  104. static const middleTextWhiteBold = TextStyle(
  105. color: GSYColors.textColorWhite,
  106. fontSize: middleTextWhiteSize,
  107. fontWeight: FontWeight.bold,
  108. );
  109. static const middleSubTextBold = TextStyle(
  110. color: GSYColors.subTextColor,
  111. fontSize: middleTextWhiteSize,
  112. fontWeight: FontWeight.bold,
  113. );
  114. static const normalText = TextStyle(
  115. color: GSYColors.mainTextColor,
  116. fontSize: normalTextSize,
  117. );
  118. static const normalTextBold = TextStyle(
  119. color: GSYColors.mainTextColor,
  120. fontSize: normalTextSize,
  121. fontWeight: FontWeight.bold,
  122. );
  123. static const normalSubText = TextStyle(
  124. color: GSYColors.subTextColor,
  125. fontSize: normalTextSize,
  126. );
  127. static const normalTextWhite = TextStyle(
  128. color: GSYColors.textColorWhite,
  129. fontSize: normalTextSize,
  130. );
  131. static const normalTextMitWhiteBold = TextStyle(
  132. color: GSYColors.miWhite,
  133. fontSize: normalTextSize,
  134. fontWeight: FontWeight.bold,
  135. );
  136. static const normalTextActionWhiteBold = TextStyle(
  137. color: Colors.blue,
  138. fontSize: middleTextWhiteSize,
  139. fontWeight: FontWeight.bold,
  140. );
  141. static const normalTextLight = TextStyle(
  142. color: GSYColors.primaryLightValue,
  143. fontSize: normalTextSize,
  144. );
  145. static const smallTextLight = TextStyle(
  146. color: GSYColors.primaryLightValue,
  147. fontSize: smallTextSize,
  148. );
  149. static const normalTextBigWhiteBold = TextStyle(
  150. color: GSYColors.actionBlue,
  151. fontSize: bigTextSize,
  152. fontWeight: FontWeight.bold,
  153. );
  154. static const largeText = TextStyle(
  155. color: GSYColors.mainTextColor,
  156. fontSize: bigTextSize,
  157. );
  158. static const largeTextBold = TextStyle(
  159. color: GSYColors.mainTextColor,
  160. fontSize: bigTextSize,
  161. fontWeight: FontWeight.bold,
  162. );
  163. static const largeTextWhite = TextStyle(
  164. color: GSYColors.textColorWhite,
  165. fontSize: bigTextSize,
  166. );
  167. static const largeTextWhiteBold = TextStyle(
  168. color: GSYColors.textColorWhite,
  169. fontSize: bigTextSize,
  170. fontWeight: FontWeight.bold,
  171. );
  172. static const largeLargeTextWhite = TextStyle(
  173. color: GSYColors.textColorWhite,
  174. fontSize: lagerTextSize,
  175. fontWeight: FontWeight.bold,
  176. );
  177. static const largeLargeText = TextStyle(
  178. color: GSYColors.primaryValue,
  179. fontSize: lagerTextSize,
  180. fontWeight: FontWeight.bold,
  181. );
  182. }
  183. class GSYICons {
  184. static const String FONT_FAMILY = 'wxcIconFont';
  185. static const String DEFAULT_USER_ICON = 'static/images/logo.png';
  186. static const String DEFAULT_IMAGE = 'static/images/default_img.png';
  187. static const String DEFAULT_REMOTE_PIC =
  188. 'http://img.cdn.guoshuyu.cn/gsy_github_app_logo.png';
  189. static const IconData HOME =
  190. const IconData(0xe624, fontFamily: GSYICons.FONT_FAMILY);
  191. static const IconData MORE =
  192. const IconData(0xe674, fontFamily: GSYICons.FONT_FAMILY);
  193. static const IconData SEARCH =
  194. const IconData(0xe61c, fontFamily: GSYICons.FONT_FAMILY);
  195. static const IconData MAIN_DT =
  196. const IconData(0xe684, fontFamily: GSYICons.FONT_FAMILY);
  197. static const IconData MAIN_QS =
  198. const IconData(0xe818, fontFamily: GSYICons.FONT_FAMILY);
  199. static const IconData MAIN_MY =
  200. const IconData(0xe6d0, fontFamily: GSYICons.FONT_FAMILY);
  201. static const IconData MAIN_SEARCH =
  202. const IconData(0xe61c, fontFamily: GSYICons.FONT_FAMILY);
  203. static const IconData LOGIN_USER =
  204. const IconData(0xe666, fontFamily: GSYICons.FONT_FAMILY);
  205. static const IconData LOGIN_PW =
  206. const IconData(0xe60e, fontFamily: GSYICons.FONT_FAMILY);
  207. static const IconData REPOS_ITEM_USER =
  208. const IconData(0xe63e, fontFamily: GSYICons.FONT_FAMILY);
  209. static const IconData REPOS_ITEM_STAR =
  210. const IconData(0xe643, fontFamily: GSYICons.FONT_FAMILY);
  211. static const IconData REPOS_ITEM_FORK =
  212. const IconData(0xe67e, fontFamily: GSYICons.FONT_FAMILY);
  213. static const IconData REPOS_ITEM_ISSUE =
  214. const IconData(0xe661, fontFamily: GSYICons.FONT_FAMILY);
  215. static const IconData REPOS_ITEM_STARED =
  216. const IconData(0xe698, fontFamily: GSYICons.FONT_FAMILY);
  217. static const IconData REPOS_ITEM_WATCH =
  218. const IconData(0xe681, fontFamily: GSYICons.FONT_FAMILY);
  219. static const IconData REPOS_ITEM_WATCHED =
  220. const IconData(0xe629, fontFamily: GSYICons.FONT_FAMILY);
  221. static const IconData REPOS_ITEM_DIR = Icons.folder;
  222. static const IconData REPOS_ITEM_FILE =
  223. const IconData(0xea77, fontFamily: GSYICons.FONT_FAMILY);
  224. static const IconData REPOS_ITEM_NEXT =
  225. const IconData(0xe610, fontFamily: GSYICons.FONT_FAMILY);
  226. static const IconData USER_ITEM_COMPANY =
  227. const IconData(0xe63e, fontFamily: GSYICons.FONT_FAMILY);
  228. static const IconData USER_ITEM_LOCATION =
  229. const IconData(0xe7e6, fontFamily: GSYICons.FONT_FAMILY);
  230. static const IconData USER_ITEM_LINK =
  231. const IconData(0xe670, fontFamily: GSYICons.FONT_FAMILY);
  232. static const IconData USER_NOTIFY =
  233. const IconData(0xe600, fontFamily: GSYICons.FONT_FAMILY);
  234. static const IconData ISSUE_ITEM_ISSUE =
  235. const IconData(0xe661, fontFamily: GSYICons.FONT_FAMILY);
  236. static const IconData ISSUE_ITEM_COMMENT =
  237. const IconData(0xe6ba, fontFamily: GSYICons.FONT_FAMILY);
  238. static const IconData ISSUE_ITEM_ADD =
  239. const IconData(0xe662, fontFamily: GSYICons.FONT_FAMILY);
  240. static const IconData ISSUE_EDIT_H1 = Icons.filter_1;
  241. static const IconData ISSUE_EDIT_H2 = Icons.filter_2;
  242. static const IconData ISSUE_EDIT_H3 = Icons.filter_3;
  243. static const IconData ISSUE_EDIT_BOLD = Icons.format_bold;
  244. static const IconData ISSUE_EDIT_ITALIC = Icons.format_italic;
  245. static const IconData ISSUE_EDIT_QUOTE = Icons.format_quote;
  246. static const IconData ISSUE_EDIT_CODE = Icons.format_shapes;
  247. static const IconData ISSUE_EDIT_LINK = Icons.insert_link;
  248. static const IconData NOTIFY_ALL_READ =
  249. const IconData(0xe62f, fontFamily: GSYICons.FONT_FAMILY);
  250. static const IconData PUSH_ITEM_EDIT = Icons.mode_edit;
  251. static const IconData PUSH_ITEM_ADD = Icons.add_box;
  252. static const IconData PUSH_ITEM_MIN = Icons.indeterminate_check_box;
  253. }