1+ import 'dart:ui' ;
2+
13import 'package:flutter/material.dart' ;
24import 'package:gsy_github_app_flutter/common/config/config.dart' ;
35import 'package:gsy_github_app_flutter/common/model/Repository.dart' ;
@@ -43,7 +45,9 @@ class _ReposHeaderItemState extends State<ReposHeaderItem> {
4345 child: new GSYIConText (
4446 icon,
4547 text,
46- GSYConstant .smallSubLightText,
48+ GSYConstant .smallSubLightText.copyWith (shadows: [
49+ BoxShadow (color: Colors .grey, offset: Offset (0.5 , 0.5 ))
50+ ]),
4751 Color (GSYColors .subLightTextColor),
4852 15.0 ,
4953 padding: 3.0 ,
@@ -75,7 +79,9 @@ class _ReposHeaderItemState extends State<ReposHeaderItem> {
7579 ),
7680 child: new Text (
7781 item,
78- style: GSYConstant .smallSubLightText,
82+ style: GSYConstant .smallSubLightText.copyWith (shadows: [
83+ BoxShadow (color: Colors .grey, offset: Offset (0.5 , 0.5 ))
84+ ]),
7985 ),
8086 ));
8187 }
@@ -123,26 +129,31 @@ class _ReposHeaderItemState extends State<ReposHeaderItem> {
123129 @override
124130 void didUpdateWidget (ReposHeaderItem oldWidget) {
125131 super .didUpdateWidget (oldWidget);
132+
126133 ///如果没有tag列表,不需要处理
127134 /*if(layoutTopicContainerKey.currentContext == null || layoutLastTopicKey.currentContext == null) {
128135 return;
129136 }*/
137+
130138 ///如果存在tag,根据tag去判断,修复溢出
131- new Future .delayed (Duration (seconds: 0 ), (){
139+ new Future .delayed (Duration (seconds: 0 ), () {
132140 /// tag 所在 container
133- RenderBox renderBox2 = layoutTopicContainerKey.currentContext? .findRenderObject ();
141+ RenderBox renderBox2 =
142+ layoutTopicContainerKey.currentContext? .findRenderObject ();
143+
134144 /// 最后面的一个tag
135- RenderBox renderBox3 = layoutLastTopicKey.currentContext? .findRenderObject ();
145+ RenderBox renderBox3 =
146+ layoutLastTopicKey.currentContext? .findRenderObject ();
136147 double overflow = ((renderBox3? .localToGlobal (Offset .zero)? .dy ?? 0 ) -
137- (renderBox2? .localToGlobal (Offset .zero)? .dy ?? 0 )) -
148+ (renderBox2? .localToGlobal (Offset .zero)? .dy ?? 0 )) -
138149 (layoutLastTopicKey.currentContext? .size? .height ?? 0 );
139150 var newSize;
140- if (overflow > 0 ) {
141- newSize = layoutKey.currentContext.size.height + overflow;
151+ if (overflow > 0 ) {
152+ newSize = layoutKey.currentContext.size.height + overflow;
142153 } else {
143- newSize = layoutKey.currentContext.size.height + 10.0 ;
154+ newSize = layoutKey.currentContext.size.height + 10.0 ;
144155 }
145- if (Config .DEBUG ) {
156+ if (Config .DEBUG ) {
146157 print ("newSize $newSize overflow $overflow " );
147158 }
148159 if (widgetHeight != newSize && newSize > 0 ) {
@@ -171,11 +182,9 @@ class _ReposHeaderItemState extends State<ReposHeaderItem> {
171182 GSYICons .DEFAULT_REMOTE_PIC ),
172183 ),
173184 ),
174- child: new Container (
175- ///透明黑色遮罩
176- decoration: new BoxDecoration (
177- color: Color (GSYColors .primaryDarkValue & 0xA0FFFFFF ),
178- ),
185+ child: new BackdropFilter (
186+ ///高斯模糊
187+ filter: ImageFilter .blur (sigmaX: 8.0 , sigmaY: 8.0 ),
179188 child: new Padding (
180189 padding: new EdgeInsets .only (
181190 left: 10.0 , top: 0.0 , right: 10.0 , bottom: 10.0 ),
@@ -194,42 +203,76 @@ class _ReposHeaderItemState extends State<ReposHeaderItem> {
194203 context, widget.reposHeaderViewModel.ownerName);
195204 },
196205 child: new Text (widget.reposHeaderViewModel.ownerName,
197- style: GSYConstant .normalTextActionWhiteBold),
206+ style: GSYConstant .normalTextActionWhiteBold
207+ .copyWith (shadows: [
208+ BoxShadow (
209+ color: Colors .black,
210+ offset: Offset (0.5 , 0.5 ))
211+ ])),
198212 ),
199- new Text (" /" ,
200- style: GSYConstant .normalTextMitWhiteBold),
213+ new Text (" / " ,
214+ style: GSYConstant .normalTextMitWhiteBold.copyWith (
215+ shadows: [
216+ BoxShadow (
217+ color: Colors .black,
218+ offset: Offset (0.5 , 0.5 ))
219+ ])),
201220
202221 ///仓库名
203- new Text (
204- " " + widget.reposHeaderViewModel.repositoryName,
205- style: GSYConstant .normalTextMitWhiteBold),
222+ new Text (widget.reposHeaderViewModel.repositoryName,
223+ style: GSYConstant .normalTextMitWhiteBold.copyWith (
224+ shadows: [
225+ BoxShadow (
226+ color: Colors .black,
227+ offset: Offset (0.5 , 0.5 ))
228+ ])),
206229 ],
207230 ),
208231 new Row (
209232 children: < Widget > [
210233 ///仓库语言
211234 new Text (
212235 widget.reposHeaderViewModel.repositoryType ?? "--" ,
213- style: GSYConstant .smallSubLightText),
236+ style: GSYConstant .smallSubLightText.copyWith (
237+ shadows: [
238+ BoxShadow (
239+ color: Colors .grey,
240+ offset: Offset (0.5 , 0.5 ))
241+ ])),
214242 new Container (width: 5.3 , height: 1.0 ),
215243
216244 ///仓库大小
217245 new Text (
218246 widget.reposHeaderViewModel.repositorySize ?? "--" ,
219- style: GSYConstant .smallSubLightText),
247+ style: GSYConstant .smallSubLightText.copyWith (
248+ shadows: [
249+ BoxShadow (
250+ color: Colors .grey,
251+ offset: Offset (0.5 , 0.5 ))
252+ ])),
220253 new Container (width: 5.3 , height: 1.0 ),
221254
222255 ///仓库协议
223256 new Text (widget.reposHeaderViewModel.license ?? "--" ,
224- style: GSYConstant .smallSubLightText),
257+ style: GSYConstant .smallSubLightText.copyWith (
258+ shadows: [
259+ BoxShadow (
260+ color: Colors .grey,
261+ offset: Offset (0.5 , 0.5 ))
262+ ])),
225263 ],
226264 ),
227265
228266 ///仓库描述
229267 new Container (
230268 child: new Text (
231269 widget.reposHeaderViewModel.repositoryDes ?? "---" ,
232- style: GSYConstant .smallSubLightText,
270+ style: GSYConstant .smallSubLightText.copyWith (
271+ shadows: [
272+ BoxShadow (
273+ color: Colors .grey,
274+ offset: Offset (0.5 , 0.5 ))
275+ ]),
233276 maxLines: 3 ,
234277 overflow: TextOverflow .ellipsis,
235278 ),
@@ -257,8 +300,18 @@ class _ReposHeaderItemState extends State<ReposHeaderItem> {
257300 const BoxConstraints (minWidth: 0.0 , minHeight: 0.0 ),
258301 child: new Text (_getInfoText (context),
259302 style: widget.reposHeaderViewModel.repositoryIsFork
260- ? GSYConstant .smallActionLightText
261- : GSYConstant .smallSubLightText),
303+ ? GSYConstant .smallActionLightText.copyWith (
304+ shadows: [
305+ BoxShadow (
306+ color: Colors .grey,
307+ offset: Offset (0.5 , 0.5 ))
308+ ])
309+ : GSYConstant .smallSubLightText.copyWith (
310+ shadows: [
311+ BoxShadow (
312+ color: Colors .grey,
313+ offset: Offset (0.5 , 0.5 ))
314+ ])),
262315 ),
263316 ),
264317 new Divider (
@@ -289,11 +342,19 @@ class _ReposHeaderItemState extends State<ReposHeaderItem> {
289342 },
290343 ),
291344
292- ///fork状态
293345 new Container (
294- width: 0.3 ,
295- height: 25.0 ,
296- color: Color (GSYColors .subLightTextColor)),
346+ width: 0.3 ,
347+ height: 25.0 ,
348+ decoration: BoxDecoration (
349+ color: Color (GSYColors .subLightTextColor),
350+ boxShadow: [
351+ BoxShadow (
352+ color: Colors .grey,
353+ offset: Offset (0.5 , 0.5 ))
354+ ]),
355+ ),
356+
357+ ///fork状态
297358 _getBottomItem (
298359 GSYICons .REPOS_ITEM_FORK ,
299360 widget.reposHeaderViewModel.repositoryFork,
@@ -310,11 +371,19 @@ class _ReposHeaderItemState extends State<ReposHeaderItem> {
310371 },
311372 ),
312373
313- ///订阅状态
314374 new Container (
315- width: 0.3 ,
316- height: 25.0 ,
317- color: Color (GSYColors .subLightTextColor)),
375+ width: 0.3 ,
376+ height: 25.0 ,
377+ decoration: BoxDecoration (
378+ color: Color (GSYColors .subLightTextColor),
379+ boxShadow: [
380+ BoxShadow (
381+ color: Colors .grey,
382+ offset: Offset (0.5 , 0.5 ))
383+ ]),
384+ ),
385+
386+ ///订阅状态
318387 _getBottomItem (
319388 GSYICons .REPOS_ITEM_WATCH ,
320389 widget.reposHeaderViewModel.repositoryWatch,
@@ -331,11 +400,19 @@ class _ReposHeaderItemState extends State<ReposHeaderItem> {
331400 },
332401 ),
333402
334- ///issue状态
335403 new Container (
336- width: 0.3 ,
337- height: 25.0 ,
338- color: Color (GSYColors .subLightTextColor)),
404+ width: 0.3 ,
405+ height: 25.0 ,
406+ decoration: BoxDecoration (
407+ color: Color (GSYColors .subLightTextColor),
408+ boxShadow: [
409+ BoxShadow (
410+ color: Colors .grey,
411+ offset: Offset (0.5 , 0.5 ))
412+ ]),
413+ ),
414+
415+ ///issue状态
339416 _getBottomItem (
340417 GSYICons .REPOS_ITEM_ISSUE ,
341418 widget.reposHeaderViewModel.repositoryIssue,
0 commit comments