NoteViewer: Add a Share button

This commit is contained in:
Vishesh Handa
2019-02-23 01:24:38 +01:00
parent 456b45c2d6
commit bad9aa2bd9

View File

@ -4,6 +4,7 @@ import 'package:journal/note.dart';
import 'package:journal/state_container.dart'; import 'package:journal/state_container.dart';
import 'package:journal/utils.dart'; import 'package:journal/utils.dart';
import 'package:journal/widgets/note_header.dart'; import 'package:journal/widgets/note_header.dart';
import 'package:share/share.dart';
import 'note_editor.dart'; import 'note_editor.dart';
@ -55,6 +56,13 @@ class NoteBrowsingScreenState extends State<NoteBrowsingScreen> {
showDialog(context: context, builder: _buildAlertDialog); showDialog(context: context, builder: _buildAlertDialog);
}, },
), ),
IconButton(
icon: Icon(Icons.share),
onPressed: () {
Note note = widget.notes[_currentIndex()];
Share.share(note.body);
},
),
], ],
), ),
body: pageView, body: pageView,