@@ -14,6 +14,22 @@ class ReposHeaderItem extends StatelessWidget {
1414
1515 ReposHeaderItem (this .reposHeaderViewModel) : super ();
1616
17+ _getBottomItem (IconData icon, String text) {
18+ return new Expanded (
19+ child: new Center (
20+ child: new GSYIConText (
21+ icon,
22+ text,
23+ GSYConstant .middleSubText,
24+ Color (GSYColors .subTextColor),
25+ 15.0 ,
26+ padding: 3.0 ,
27+ mainAxisAlignment: MainAxisAlignment .center,
28+ ),
29+ ),
30+ );
31+ }
32+
1733 @override
1834 Widget build (BuildContext context) {
1935 String createStr = reposHeaderViewModel.repositoryIsFork
@@ -74,61 +90,10 @@ class ReposHeaderItem extends StatelessWidget {
7490 crossAxisAlignment: CrossAxisAlignment .center,
7591 mainAxisAlignment: MainAxisAlignment .center,
7692 children: < Widget > [
77- new Expanded (
78- child: new Center (
79- child: new GSYIConText (
80- GSYICons .REPOS_ITEM_STAR ,
81- reposHeaderViewModel.repositoryStar,
82- GSYConstant .middleSubText,
83- Color (GSYColors .subTextColor),
84- 15.0 ,
85- padding: 3.0 ,
86- mainAxisAlignment: MainAxisAlignment .center,
87- ),
88- ),
89- ),
90- new Container (width: 0.3 , height: 30.0 , color: Color (GSYColors .subLightTextColor)),
91- new Expanded (
92- child: new Center (
93- child: new GSYIConText (
94- GSYICons .REPOS_ITEM_FORK ,
95- reposHeaderViewModel.repositoryFork,
96- GSYConstant .middleSubText,
97- Color (GSYColors .subTextColor),
98- 15.0 ,
99- padding: 3.0 ,
100- mainAxisAlignment: MainAxisAlignment .center,
101- ),
102- ),
103- ),
104- new Container (width: 0.3 , height: 30.0 , color: Color (GSYColors .subLightTextColor)),
105- new Expanded (
106- child: new Center (
107- child: new GSYIConText (
108- GSYICons .REPOS_ITEM_ISSUE ,
109- reposHeaderViewModel.repositoryWatch,
110- GSYConstant .middleSubText,
111- Color (GSYColors .subTextColor),
112- 15.0 ,
113- padding: 3.0 ,
114- mainAxisAlignment: MainAxisAlignment .center,
115- ),
116- ),
117- ),
118- new Container (width: 0.3 , height: 30.0 , color: Color (GSYColors .subLightTextColor)),
119- new Expanded (
120- child: new Center (
121- child: new GSYIConText (
122- GSYICons .REPOS_ITEM_ISSUE ,
123- reposHeaderViewModel.repositoryIssue,
124- GSYConstant .middleSubText,
125- Color (GSYColors .subTextColor),
126- 15.0 ,
127- padding: 3.0 ,
128- mainAxisAlignment: MainAxisAlignment .center,
129- ),
130- ),
131- ),
93+ _getBottomItem (GSYICons .REPOS_ITEM_STAR , reposHeaderViewModel.repositoryStar),
94+ _getBottomItem (GSYICons .REPOS_ITEM_FORK , reposHeaderViewModel.repositoryFork),
95+ _getBottomItem (GSYICons .REPOS_ITEM_WATCH , reposHeaderViewModel.repositoryWatch),
96+ _getBottomItem (GSYICons .REPOS_ITEM_ISSUE , reposHeaderViewModel.repositoryIssue),
13297 ],
13398 )),
13499 ],
0 commit comments