@@ -24,7 +24,8 @@ class NotifyPage extends StatefulWidget {
2424 _NotifyPageState createState () => _NotifyPageState ();
2525}
2626
27- class _NotifyPageState extends State <NotifyPage > with AutomaticKeepAliveClientMixin <NotifyPage >, GSYListState <NotifyPage > {
27+ class _NotifyPageState extends State <NotifyPage >
28+ with AutomaticKeepAliveClientMixin <NotifyPage >, GSYListState <NotifyPage > {
2829 final SlidableController slidableController = new SlidableController ();
2930
3031 int selectIndex = 0 ;
@@ -37,17 +38,23 @@ class _NotifyPageState extends State<NotifyPage> with AutomaticKeepAliveClientMi
3738 return _renderEventItem (notification);
3839 }
3940 return new Slidable (
41+ key: ValueKey <String >(index.toString () + "_" + selectIndex.toString ()),
4042 controller: slidableController,
41- delegate : new SlidableDrawerDelegate (),
43+ actionPane : SlidableBehindActionPane (),
4244 actionExtentRatio: 0.25 ,
4345 child: _renderEventItem (notification),
46+ dismissal: SlidableDismissal (
47+ child: SlidableDrawerDismissal (),
48+ onDismissed: (actionType) {},
49+ ),
4450 secondaryActions: < Widget > [
4551 new IconSlideAction (
4652 caption: CommonUtils .getLocale (context).notify_readed,
4753 color: Colors .redAccent,
4854 icon: Icons .delete,
4955 onTap: () {
50- UserDao .setNotificationAsReadDao (notification.id.toString ()).then ((res) {
56+ UserDao .setNotificationAsReadDao (notification.id.toString ())
57+ .then ((res) {
5158 showRefreshLoading ();
5259 });
5360 },
@@ -57,7 +64,8 @@ class _NotifyPageState extends State<NotifyPage> with AutomaticKeepAliveClientMi
5764 }
5865
5966 _renderEventItem (Model .Notification notification) {
60- EventViewModel eventViewModel = EventViewModel .fromNotify (context, notification);
67+ EventViewModel eventViewModel =
68+ EventViewModel .fromNotify (context, notification);
6169 return new EventItem (eventViewModel, onPressed: () {
6270 if (notification.unread) {
6371 UserDao .setNotificationAsReadDao (notification.id.toString ());
@@ -68,7 +76,9 @@ class _NotifyPageState extends State<NotifyPage> with AutomaticKeepAliveClientMi
6876 String number = tmp[tmp.length - 1 ];
6977 String userName = notification.repository.owner.login;
7078 String reposName = notification.repository.name;
71- NavigatorUtils .goIssueDetail (context, userName, reposName, number, needRightLocalIcon: true ).then ((res) {
79+ NavigatorUtils .goIssueDetail (context, userName, reposName, number,
80+ needRightLocalIcon: true )
81+ .then ((res) {
7282 showRefreshLoading ();
7383 });
7484 }
0 commit comments