π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Remove unnecessary use of ValueNotifer and ValueListenableBuilder in new search tab
ashilkn520b83ad1206
diff --git a/lib/ui/viewer/search/search_widget_new.dart b/lib/ui/viewer/search/search_widget_new.dartindex fc35965efa..8b4e8fad27 100644--- a/lib/ui/viewer/search/search_widget_new.dart+++ b/lib/ui/viewer/search/search_widget_new.dart@@ -27,9 +27,8 @@ class _SearchWidgetNewState extends State<SearchWidgetNew> {final Logger _logger = Logger((_SearchWidgetNewState).toString());late FocusNode focusNode;StreamSubscription<TabDoubleTapEvent>? _tabDoubleTapEvent;- final _bottomPaddingNotifier = ValueNotifier<double>(0);+ double _bottomPadding = 0.0;double _distanceOfWidgetFromBottom = 0;- //Check if globalKey is necessaryGlobalKey widgetKey = GlobalKey();@override@@ -58,10 +57,10 @@ class _SearchWidgetNewState extends State<SearchWidgetNew> {void didChangeDependencies() {super.didChangeDependencies();- _bottomPaddingNotifier.value =+ _bottomPadding =(MediaQuery.viewInsetsOf(context).bottom - _distanceOfWidgetFromBottom);- if (_bottomPaddingNotifier.value < 0) {- _bottomPaddingNotifier.value = 0;+ if (_bottomPadding < 0) {+ _bottomPadding = 0;}}@@ -71,14 +70,8 @@ class _SearchWidgetNewState extends State<SearchWidgetNew> {return RepaintBoundary(//Why repaint boundary?key: widgetKey,- child: ValueListenableBuilder(- valueListenable: _bottomPaddingNotifier,- builder: (context, value, child) {- return Padding(- padding: EdgeInsets.only(bottom: value),- child: child,- );- },+ child: Padding(+ padding: EdgeInsets.only(bottom: _bottomPadding),child: Padding(padding: const EdgeInsets.symmetric(vertical: 12),child: Padding(