|
|
|
@ -42,9 +42,8 @@ class _NotesNotePageState extends State<NotesNotePage> {
|
|
|
|
|
_titleController.addListener(() => _titleStreamController.add(_titleController.text)); |
|
|
|
|
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((final _) { |
|
|
|
|
if (Provider.of<NeonPlatform>(context, listen: false).canUseWakelock) { |
|
|
|
|
unawaited(WakelockPlus.enable()); |
|
|
|
|
} |
|
|
|
|
unawaited(WakelockPlus.enable()); |
|
|
|
|
|
|
|
|
|
if (widget.bloc.options.defaultNoteViewTypeOption.value == DefaultNoteViewType.edit || |
|
|
|
|
widget.bloc.initialContent.isEmpty) { |
|
|
|
|
setState(() { |
|
|
|
@ -65,9 +64,8 @@ class _NotesNotePageState extends State<NotesNotePage> {
|
|
|
|
|
@override |
|
|
|
|
Widget build(final BuildContext context) => BackButtonListener( |
|
|
|
|
onBackButtonPressed: () async { |
|
|
|
|
if (Provider.of<NeonPlatform>(context, listen: false).canUseWakelock) { |
|
|
|
|
unawaited(WakelockPlus.disable()); |
|
|
|
|
} |
|
|
|
|
unawaited(WakelockPlus.disable()); |
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
}, |
|
|
|
|
child: Scaffold( |
|
|
|
|