mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
[flutter]: fix some warnings
This commit is contained in:
parent
ad2a5179a8
commit
fac470be99
@ -62,7 +62,7 @@ class ApplicationBlocObserver extends BlocObserver {
|
||||
// ignore: unnecessary_overrides
|
||||
void onTransition(Bloc bloc, Transition transition) {
|
||||
// Log.debug("[current]: ${transition.currentState} \n\n[next]: ${transition.nextState}");
|
||||
Log.debug("${transition.nextState}");
|
||||
//Log.debug("${transition.nextState}");
|
||||
super.onTransition(bloc, transition);
|
||||
}
|
||||
|
||||
@ -71,4 +71,10 @@ class ApplicationBlocObserver extends BlocObserver {
|
||||
Log.debug(error);
|
||||
super.onError(bloc, error, stackTrace);
|
||||
}
|
||||
|
||||
@override
|
||||
void onEvent(Bloc bloc, Object? event) {
|
||||
Log.debug("$event");
|
||||
super.onEvent(bloc, event);
|
||||
}
|
||||
}
|
||||
|
@ -57,5 +57,5 @@ class IViewListenerImpl extends IViewListener {
|
||||
PublishNotifier<UpdateNotifierValue> get updatedNotifier => repo.updatedNotifier;
|
||||
|
||||
@override
|
||||
PublishNotifier<RestoreNotifierValue> get restoredNotifier => repo.updatedNotifier;
|
||||
PublishNotifier<RestoreNotifierValue> get restoredNotifier => repo.restoredNotifier;
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ class ViewSection extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ViewSectionNotifier with ChangeNotifier {
|
||||
bool isDisposed = false;
|
||||
List<View> _views;
|
||||
View? _selectedView;
|
||||
CancelableOperation? _notifyListenerOperation;
|
||||
@ -107,7 +108,16 @@ class ViewSectionNotifier with ChangeNotifier {
|
||||
_notifyListenerOperation = CancelableOperation.fromFuture(
|
||||
Future.delayed(const Duration(milliseconds: 30), () {}),
|
||||
).then((_) {
|
||||
notifyListeners();
|
||||
if (!isDisposed) {
|
||||
notifyListeners();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
isDisposed = true;
|
||||
_notifyListenerOperation?.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,9 @@ class ScrollbarState extends State<StyledScrollbar> {
|
||||
).then((_) {
|
||||
// Opti: hide with animation
|
||||
hideHandler = true;
|
||||
setState(() {});
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
hideHandler = false;
|
||||
|
Loading…
Reference in New Issue
Block a user