mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 18:03:14 +08:00
NoteViewer: Add a Share button
This commit is contained in:
@ -4,6 +4,7 @@ import 'package:journal/note.dart';
|
||||
import 'package:journal/state_container.dart';
|
||||
import 'package:journal/utils.dart';
|
||||
import 'package:journal/widgets/note_header.dart';
|
||||
import 'package:share/share.dart';
|
||||
|
||||
import 'note_editor.dart';
|
||||
|
||||
@ -55,6 +56,13 @@ class NoteBrowsingScreenState extends State<NoteBrowsingScreen> {
|
||||
showDialog(context: context, builder: _buildAlertDialog);
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.share),
|
||||
onPressed: () {
|
||||
Note note = widget.notes[_currentIndex()];
|
||||
Share.share(note.body);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: pageView,
|
||||
|
Reference in New Issue
Block a user