gsy_style.dart 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  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 = 39.0;
  45. static const bigTextSize = 20.0;
  46. static const normalTextSize = 18.0;
  47. static const middleTextWhiteSize = 16.0;
  48. static const TextSize15 = 15.0;
  49. static const smallTextSize = 14.0;
  50. static const minTextSize = 12.0;
  51. static const minText = TextStyle(
  52. color: GSYColors.subLightTextColor,
  53. fontSize: minTextSize,
  54. );
  55. static const smallTextWhite = TextStyle(
  56. color: GSYColors.textColorWhite,
  57. fontSize: smallTextSize,
  58. );
  59. static const smallText = TextStyle(
  60. color: GSYColors.mainTextColor,
  61. fontSize: smallTextSize,
  62. );
  63. static const smallTextBold = TextStyle(
  64. color: GSYColors.mainTextColor,
  65. fontSize: smallTextSize,
  66. fontWeight: FontWeight.bold,
  67. );
  68. static const smallSubLightText = TextStyle(
  69. color: GSYColors.subLightTextColor,
  70. fontSize: smallTextSize,
  71. );
  72. static const smallActionLightText = TextStyle(
  73. color: GSYColors.actionBlue,
  74. fontSize: smallTextSize,
  75. );
  76. static const smallMiLightText = TextStyle(
  77. color: GSYColors.miWhite,
  78. fontSize: smallTextSize,
  79. );
  80. static const smallSubText = TextStyle(
  81. color: GSYColors.subTextColor,
  82. fontSize: smallTextSize,
  83. );
  84. static const middleText = TextStyle(
  85. color: GSYColors.mainTextColor,
  86. fontSize: middleTextWhiteSize,
  87. );
  88. static const middleTextWhite = TextStyle(
  89. color: GSYColors.textColorWhite,
  90. fontSize: middleTextWhiteSize,
  91. );
  92. static const middleSubText = TextStyle(
  93. color: GSYColors.subTextColor,
  94. fontSize: middleTextWhiteSize,
  95. );
  96. static const middleSubLightText = TextStyle(
  97. color: GSYColors.subLightTextColor,
  98. fontSize: middleTextWhiteSize,
  99. );
  100. static const middleTextBold = TextStyle(
  101. color: GSYColors.mainTextColor,
  102. fontSize: middleTextWhiteSize,
  103. fontWeight: FontWeight.bold,
  104. );
  105. static const middleTextWhiteBold = TextStyle(
  106. color: GSYColors.textColorWhite,
  107. fontSize: middleTextWhiteSize,
  108. fontWeight: FontWeight.bold,
  109. );
  110. static const middleSubTextBold = TextStyle(
  111. color: GSYColors.subTextColor,
  112. fontSize: middleTextWhiteSize,
  113. fontWeight: FontWeight.bold,
  114. );
  115. static const normalText = TextStyle(
  116. color: GSYColors.mainTextColor,
  117. fontSize: normalTextSize,
  118. );
  119. static const normalTextBold = TextStyle(
  120. color: GSYColors.mainTextColor,
  121. fontSize: normalTextSize,
  122. fontWeight: FontWeight.bold,
  123. );
  124. static const normalSubText = TextStyle(
  125. color: GSYColors.subTextColor,
  126. fontSize: normalTextSize,
  127. );
  128. static const normalTextWhite = TextStyle(
  129. color: GSYColors.textColorWhite,
  130. fontSize: normalTextSize,
  131. );
  132. static const normalTextMitWhiteBold = TextStyle(
  133. color: GSYColors.miWhite,
  134. fontSize: normalTextSize,
  135. fontWeight: FontWeight.bold,
  136. );
  137. static const normalTextActionWhiteBold = TextStyle(
  138. color: Colors.blue,
  139. fontSize: middleTextWhiteSize,
  140. fontWeight: FontWeight.bold,
  141. );
  142. static const normalTextLight = TextStyle(
  143. color: GSYColors.primaryLightValue,
  144. fontSize: normalTextSize,
  145. );
  146. static const smallTextLight = TextStyle(
  147. color: GSYColors.primaryLightValue,
  148. fontSize: smallTextSize,
  149. );
  150. static const textLight = TextStyle(
  151. color: GSYColors.primaryLightValue,
  152. fontSize: TextSize15,
  153. );
  154. static const normalTextBigWhiteBold = TextStyle(
  155. color: GSYColors.actionBlue,
  156. fontSize: bigTextSize,
  157. fontWeight: FontWeight.bold,
  158. );
  159. static const largeText = TextStyle(
  160. color: GSYColors.mainTextColor,
  161. fontSize: bigTextSize,
  162. );
  163. static const largeTextBold = TextStyle(
  164. color: GSYColors.mainTextColor,
  165. fontSize: bigTextSize,
  166. fontWeight: FontWeight.bold,
  167. );
  168. static const largeTextWhite = TextStyle(
  169. color: GSYColors.textColorWhite,
  170. fontSize: bigTextSize,
  171. );
  172. static const largeTextWhiteBold = TextStyle(
  173. color: GSYColors.textColorWhite,
  174. fontSize: bigTextSize,
  175. fontWeight: FontWeight.bold,
  176. );
  177. static const largeLargeTextWhite = TextStyle(
  178. color: GSYColors.textColorWhite,
  179. fontSize: lagerTextSize,
  180. fontWeight: FontWeight.bold,
  181. );
  182. static const largeLargeText = TextStyle(
  183. color: GSYColors.primaryValue,
  184. fontSize: lagerTextSize,
  185. fontWeight: FontWeight.bold,
  186. );
  187. }
  188. class GSYICons {
  189. static const String FONT_FAMILY = 'wxcIconFont';
  190. static const String DEFAULT_USER_ICON = 'static/images/logo.png';
  191. static const String DEFAULT_IMAGE = 'static/images/default_img.png';
  192. static const String DEFAULT_REMOTE_PIC =
  193. 'http://img.cdn.guoshuyu.cn/gsy_github_app_logo.png';
  194. static const IconData HOME =
  195. const IconData(0xe624, fontFamily: GSYICons.FONT_FAMILY);
  196. static const IconData MORE =
  197. const IconData(0xe674, fontFamily: GSYICons.FONT_FAMILY);
  198. static const IconData SEARCH =
  199. const IconData(0xe61c, fontFamily: GSYICons.FONT_FAMILY);
  200. static const IconData MAIN_DT =
  201. const IconData(0xe684, fontFamily: GSYICons.FONT_FAMILY);
  202. static const IconData MAIN_QS =
  203. const IconData(0xe818, fontFamily: GSYICons.FONT_FAMILY);
  204. static const IconData MAIN_MY =
  205. const IconData(0xe6d0, fontFamily: GSYICons.FONT_FAMILY);
  206. static const IconData MAIN_SEARCH =
  207. const IconData(0xe61c, fontFamily: GSYICons.FONT_FAMILY);
  208. static const IconData LOGIN_USER =
  209. const IconData(0xe666, fontFamily: GSYICons.FONT_FAMILY);
  210. static const IconData LOGIN_PW =
  211. const IconData(0xe60e, fontFamily: GSYICons.FONT_FAMILY);
  212. static const IconData REPOS_ITEM_USER =
  213. const IconData(0xe63e, fontFamily: GSYICons.FONT_FAMILY);
  214. static const IconData REPOS_ITEM_STAR =
  215. const IconData(0xe643, fontFamily: GSYICons.FONT_FAMILY);
  216. static const IconData REPOS_ITEM_FORK =
  217. const IconData(0xe67e, fontFamily: GSYICons.FONT_FAMILY);
  218. static const IconData REPOS_ITEM_ISSUE =
  219. const IconData(0xe661, fontFamily: GSYICons.FONT_FAMILY);
  220. static const IconData REPOS_ITEM_STARED =
  221. const IconData(0xe698, fontFamily: GSYICons.FONT_FAMILY);
  222. static const IconData REPOS_ITEM_WATCH =
  223. const IconData(0xe681, fontFamily: GSYICons.FONT_FAMILY);
  224. static const IconData REPOS_ITEM_WATCHED =
  225. const IconData(0xe629, fontFamily: GSYICons.FONT_FAMILY);
  226. static const IconData REPOS_ITEM_DIR = Icons.folder;
  227. static const IconData REPOS_ITEM_FILE =
  228. const IconData(0xea77, fontFamily: GSYICons.FONT_FAMILY);
  229. static const IconData REPOS_ITEM_NEXT =
  230. const IconData(0xe610, fontFamily: GSYICons.FONT_FAMILY);
  231. static const IconData USER_ITEM_COMPANY =
  232. const IconData(0xe63e, fontFamily: GSYICons.FONT_FAMILY);
  233. static const IconData USER_ITEM_LOCATION =
  234. const IconData(0xe7e6, fontFamily: GSYICons.FONT_FAMILY);
  235. static const IconData USER_ITEM_LINK =
  236. const IconData(0xe670, fontFamily: GSYICons.FONT_FAMILY);
  237. static const IconData USER_NOTIFY =
  238. const IconData(0xe600, fontFamily: GSYICons.FONT_FAMILY);
  239. static const IconData ISSUE_ITEM_ISSUE =
  240. const IconData(0xe661, fontFamily: GSYICons.FONT_FAMILY);
  241. static const IconData ISSUE_ITEM_COMMENT =
  242. const IconData(0xe6ba, fontFamily: GSYICons.FONT_FAMILY);
  243. static const IconData ISSUE_ITEM_ADD =
  244. const IconData(0xe662, fontFamily: GSYICons.FONT_FAMILY);
  245. static const IconData ISSUE_EDIT_H1 = Icons.filter_1;
  246. static const IconData ISSUE_EDIT_H2 = Icons.filter_2;
  247. static const IconData ISSUE_EDIT_H3 = Icons.filter_3;
  248. static const IconData ISSUE_EDIT_BOLD = Icons.format_bold;
  249. static const IconData ISSUE_EDIT_ITALIC = Icons.format_italic;
  250. static const IconData ISSUE_EDIT_QUOTE = Icons.format_quote;
  251. static const IconData ISSUE_EDIT_CODE = Icons.format_shapes;
  252. static const IconData ISSUE_EDIT_LINK = Icons.insert_link;
  253. static const IconData NOTIFY_ALL_READ =
  254. const IconData(0xe62f, fontFamily: GSYICons.FONT_FAMILY);
  255. static const IconData PUSH_ITEM_EDIT = Icons.mode_edit;
  256. static const IconData PUSH_ITEM_ADD = Icons.add_box;
  257. static const IconData PUSH_ITEM_MIN = Icons.indeterminate_check_box;
  258. }