mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +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/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,
|
||||||
|
Reference in New Issue
Block a user