Skip to content

Commit

Permalink
fix: setters
Browse files Browse the repository at this point in the history
  • Loading branch information
squidrye committed Oct 10, 2023
1 parent 57ed56e commit de3df1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions frontend/appflowy_flutter/lib/plugins/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ import 'package:flutter/material.dart';
class ViewPluginNotifier extends PluginNotifier<Option<DeletedViewPB>> {
final ViewListener? _viewListener;
ViewPB view;
bool _readOnlyStatus = false;

@override
final ValueNotifier<Option<DeletedViewPB>> isDeleted = ValueNotifier(none());

@override
bool get readOnlyStatus => false;
bool get readOnlyStatus => _readOnlyStatus;

@override
set readOnlyStatus(bool value) => readOnlyStatus = value;
set readOnlyStatus(bool value) => _readOnlyStatus = value;

ViewPluginNotifier({
required this.view,
Expand Down
4 changes: 3 additions & 1 deletion frontend/appflowy_flutter/lib/startup/plugin/plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ abstract class PluginNotifier<T> {
/// Notify if the plugin get deleted
ValueNotifier<T> get isDeleted;

bool readOnlyStatus = false;
bool get readOnlyStatus;

set readOnlyStatus(bool value);

void dispose() {}
}
Expand Down

0 comments on commit de3df1f

Please sign in to comment.