From 1379c9645390c1b1dacb8fcec1696e38467ae86a Mon Sep 17 00:00:00 2001 From: MohammadTaha Basiri Date: Tue, 14 Dec 2021 13:06:16 +0330 Subject: [PATCH] radar page scroll bug fixed --- lib/pages/home/radar/radar.dart | 65 ++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/lib/pages/home/radar/radar.dart b/lib/pages/home/radar/radar.dart index 7b27a89..229258f 100644 --- a/lib/pages/home/radar/radar.dart +++ b/lib/pages/home/radar/radar.dart @@ -55,39 +55,46 @@ class _RadarState extends State { return Scaffold( body: Stack( children: [ - CustomScrollView( - controller: _scrollController, - physics: const BouncingScrollPhysics(), - slivers: [ - SliverPadding( - padding: const EdgeInsets.all( - 20, - ).copyWith(top: d.padding.top + 20), - sliver: SliverToBoxAdapter( - child: Container( - alignment: Alignment.centerRight, - height: 76, - child: const DidvanHorizontalLogo(), + Theme( + data: Theme.of(context).copyWith( + colorScheme: Theme.of(context).colorScheme.copyWith( + secondary: Colors.white, + ), + ), + child: CustomScrollView( + controller: _scrollController, + slivers: [ + SliverPadding( + padding: const EdgeInsets.all( + 20, + ).copyWith(top: d.padding.top + 20), + sliver: SliverToBoxAdapter( + child: Container( + alignment: Alignment.centerRight, + height: 76, + child: const DidvanHorizontalLogo(), + ), ), ), - ), - const SliverPadding( - padding: EdgeInsets.symmetric(horizontal: 16), - sliver: SliverToBoxAdapter( - child: SearchField(), - ), - ), - SliverPadding( - padding: const EdgeInsets.only(top: 300, right: 16, bottom: 20), - sliver: SliverToBoxAdapter( - child: DidvanText( - 'آخرین رصد', - style: Theme.of(context).textTheme.subtitle1, - color: DesignConfig.darkPrimaryColor2, + const SliverPadding( + padding: EdgeInsets.symmetric(horizontal: 16), + sliver: SliverToBoxAdapter( + child: SearchField(), ), ), - ), - ], + SliverPadding( + padding: + const EdgeInsets.only(top: 300, right: 16, bottom: 20), + sliver: SliverToBoxAdapter( + child: DidvanText( + 'آخرین رصد', + style: Theme.of(context).textTheme.subtitle1, + color: DesignConfig.darkPrimaryColor2, + ), + ), + ), + ], + ), ), CategoriesRow1(isColapsed: _isColapsed), CategoriesRow2(isColapsed: _isColapsed),