diff --git a/lib/screens/journal_browsing.dart b/lib/screens/journal_browsing.dart index a28a29c7..14f58f5c 100644 --- a/lib/screens/journal_browsing.dart +++ b/lib/screens/journal_browsing.dart @@ -150,7 +150,7 @@ class NoteViewer extends StatelessWidget { padding: const EdgeInsets.all(16.0), ); - return view; + return Hero(tag: note.filePath, child: view); } /* diff --git a/lib/widgets/journal_list.dart b/lib/widgets/journal_list.dart index 38a3f62b..b64652d2 100644 --- a/lib/widgets/journal_list.dart +++ b/lib/widgets/journal_list.dart @@ -51,7 +51,16 @@ class JournalList extends StatelessWidget { var note = notes[i]; return IconDismissable( key: ValueKey("JournalList_" + note.filePath), - child: _buildRow(context, note, i), + child: Hero( + tag: note.filePath, + child: _buildRow(context, note, i), + flightShuttleBuilder: (BuildContext flightContext, + Animation animation, + HeroFlightDirection flightDirection, + BuildContext fromHeroContext, + BuildContext toHeroContext) => + Material(child: toHeroContext.widget), + ), backgroundColor: Colors.red[800], iconData: Icons.delete, onDismissed: (direction) {