Skip to content

Commit

Permalink
fix: event item tapable revert
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Feb 11, 2019
1 parent d25b979 commit 5b4ff92
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 49 deletions.
20 changes: 10 additions & 10 deletions lib/utils/utils.dart
Expand Up @@ -126,16 +126,16 @@ TextSpan createLinkSpan(BuildContext context, String text, Function handle) {
fontWeight: FontWeight.w600,
// decoration: TextDecoration.underline,
),
// recognizer: TapGestureRecognizer()
// ..onTap = () {
// Navigator.of(context).push(
// CupertinoPageRoute(
// builder: (context) {
// return handle();
// },
// ),
// );
// },
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.of(context).push(
CupertinoPageRoute(
builder: (context) {
return handle();
},
),
);
},
);
}

Expand Down
75 changes: 36 additions & 39 deletions lib/widgets/event_item.dart
Expand Up @@ -66,48 +66,45 @@ class EventItem extends StatelessWidget {
];
_spans.addAll(spans);

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

0 comments on commit 5b4ff92

Please sign in to comment.