fix: event item tapable revert

This commit is contained in:
Rongjian Zhang 2019-02-12 00:31:06 +08:00
parent d25b979138
commit 5b4ff92138
2 changed files with 46 additions and 49 deletions

View File

@ -126,16 +126,16 @@ TextSpan createLinkSpan(BuildContext context, String text, Function handle) {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
// decoration: TextDecoration.underline, // decoration: TextDecoration.underline,
), ),
// recognizer: TapGestureRecognizer() recognizer: TapGestureRecognizer()
// ..onTap = () { ..onTap = () {
// Navigator.of(context).push( Navigator.of(context).push(
// CupertinoPageRoute( CupertinoPageRoute(
// builder: (context) { builder: (context) {
// return handle(); return handle();
// }, },
// ), ),
// ); );
// }, },
); );
} }

View File

@ -66,48 +66,45 @@ class EventItem extends StatelessWidget {
]; ];
_spans.addAll(spans); _spans.addAll(spans);
return Link( return Container(
screenBuilder: screenBuilder, padding: EdgeInsets.all(8),
child: Container( child: Column(
padding: EdgeInsets.all(8), crossAxisAlignment: CrossAxisAlignment.start,
child: Column( children: <Widget>[
crossAxisAlignment: CrossAxisAlignment.start, Row(
children: <Widget>[ children: <Widget>[
Row( Avatar(login: event.actorLogin, url: event.actorAvatarUrl),
children: <Widget>[ Padding(padding: EdgeInsets.only(left: 10)),
Avatar(login: event.actorLogin, url: event.actorAvatarUrl), Expanded(
Padding(padding: EdgeInsets.only(left: 10)), child: RichText(
Expanded( text: TextSpan(
child: RichText( style: TextStyle(
text: TextSpan( color: Colors.black, height: 1.3, fontSize: 15),
style: TextStyle( children: _spans,
color: Colors.black, height: 1.3, fontSize: 15),
children: _spans,
),
), ),
), ),
Padding(padding: EdgeInsets.only(left: 8)), ),
Icon(iconData, color: Colors.black45, size: 22), Padding(padding: EdgeInsets.only(left: 8)),
], Icon(iconData, color: Colors.black45, size: 22),
), ],
detail == null ),
? Container() detail == null
: Container( ? Container()
padding: EdgeInsets.only(left: 46, top: 6), : Container(
child: Text( padding: EdgeInsets.only(left: 46, top: 6),
detail, child: Text(
overflow: TextOverflow.ellipsis, detail,
maxLines: 3, overflow: TextOverflow.ellipsis,
style: TextStyle( maxLines: 3,
color: Colors.black87, style: TextStyle(
fontSize: 14, color: Colors.black87,
height: 1.2, fontSize: 14,
fontWeight: FontWeight.w300, height: 1.2,
), fontWeight: FontWeight.w300,
), ),
) ),
], )
), ],
), ),
); );
} }