![](/img/trans.png)
[英]Unable to scroll the SliverAppBar together with the content of the AutoRouter
我無法在具有嵌套路由的 NestedScrollview 中滾動 SliverAppbar 和 AutoRouter 小部件。 Tab1 和 Tab2 按預期工作。 如果滾動內容,則會展開/折疊 SliverAppbar。 Tab3 只會自己滾動,不會影響 AppBar。 我的home_page ...
[英]Unable to scroll the SliverAppBar together with the content of the AutoRouter
我無法在具有嵌套路由的 NestedScrollview 中滾動 SliverAppbar 和 AutoRouter 小部件。 Tab1 和 Tab2 按預期工作。 如果滾動內容,則會展開/折疊 SliverAppbar。 Tab3 只會自己滾動,不會影響 AppBar。 我的home_page ...
[英]Flutter BoxConstraints maxWidth in CustomScrollView not working
我正在使用CustomScrollView並試圖通過使用BoxConstraints來限制其子項的大小,但它們被簡單地忽略了。 我的文本擴展到屏幕的寬度,我不明白為什么。 這是我的代碼: 我在這里錯過了什么? 如果您需要更多信息,請告訴我! ...
[英]Flutter : dynamic height for scrollable content inside customScrollView (with sticky behaviors)
我想達到這個結果,但我無法理解它...... 圖片示例我發現“固定”我的標題(頂部)和按鈕(底部)的唯一方法是分別使用 SliverPinnedHeader(需要 CustomScrollView 小部件的用戶)和 StickySideWidget.bottom。 因為我在 Column 小部件中 ...
[英]How to prevent BouncingScrollPhysics from bouncing when it reach the end of a CustomScrollView?
我想要 BouncingScrollPhysics 在 ScrollView 的開頭和結尾我想刪除該效果。 我怎樣才能做到這一點? ...
[英]How to set width on Flutter SliverGrid
我正在嘗試顯示一個 slivergridview 視圖,如果它總是全寬,尤其是在大屏幕上,它看起來並不好 但是 CustomScrollView 只接受 sliver 小部件,這使得容器和 sizedbox 無法使用。 您對此有什么解決方法? ...
[英]The argument type 'RenderObject?' can't be assigned to the parameter type 'RenderObject' because 'RenderObject?' is nullable and 'RenderObject' isn't
我正在使用 Flutter web 創建一個 web,我想實現一個按鈕,自動將視圖向下滾動到某個小部件。 為此,我正在使用滾動控制器和全局鍵 我分配給所需的容器 這是我的主要腳手架。 我正在使用 CustomScrollView: 我正在嘗試為按鈕實現此功能 但由於空安全性,我在_k ...
[英]Flutter CustomScrollView how to keep the viewport when adding item at the start of the list?
問題:例如,有一個包含 100 條消息的列表。 CustomCrollView的當前視口顯示消息 50 -> 60。在列表開頭添加新項目時,視口跳轉到消息 49(舊)-> 59(舊)(因為滾動偏移量沒有改變,所以它將內容向下移動)。 預期:添加項目后,視口應繼續顯示消息 50(舊)- ...
[英]Pin widget for some seconds when widget comes into viewport in SliverStreamGrid while scrolling
我有 CustomScrollView 和 SliverGrid,里面有不同的小部件類型。 我有一個在 stream 內容結束后出現的小部件,其他內容將加載。 當這個小部件出現時,我想很快將它固定在屏幕上並禁用滾動 3 秒。 為了簡化它,我跳過了 sliver delegates 並像這樣總結了我的 ...
[英]How can I replace appBar with SliverAppBar in my code?
這是我所擁有的代碼。 我想用 SliverAppBar 替換 appBar。 所以我把 CustomScrollView slivers 代碼放在 body 部分,page[pageNum] 不能正常工作。 我怎樣才能讓它在一個主體上同時工作 CustomScrollView() 和 page[p ...
[英]Can i only return ListTile in SliversList under an if condition?
如果我想查看的用戶在他的數據庫部分中有特定內容,我試圖僅在CustomScrollView的SliversList中返回ListTile 。 我怎樣才能做到這一點? 我想做這樣的事情:CustomScrollView( slivers: [ SliverList( de ...
[英]How to prevent viewport offset of CustomScrollView when delete items?
我正在實施聊天,當項目從列表中刪除時出現問題。 如果我從 CustomScrollView 底部刪除多個項目,則滾動條 position 會根據刪除項目的高度總和向上偏移。 我該如何預防? ...
[英]How to make one part of body scrollable and other as fixed when using SliverAppBar
我正在嘗試在 flutter 中創建一個 UI,其中我正在使用 SliverAppBar(我提到這一點是因為我需要使用 CustomScrollView 或 NestedScrollView),現在在正文中,我要讓前兩個元素在到達時不滾動屏幕頂部,而底部列表。 使用 CustomScrollView ...
[英]SliverAppBar with TabBar and SliverList inside CustomScrollView causes: ScrollController is currently attached to more than one ScrollPosition
擁有一個帶有TabBar和項目列表的SliverAppBar會導致滾動 controller 抱怨。 我已經通過以下方式實現了它,有一個NestedScrollView有一個SliverAppBar ,一個SliverPersistentHeader包含TabBar ,然后是NestedScrol ...
[英]How to implement staggered grid view with SLIVERS in Flutter?
我想實現一個交錯的 GridView ,因為我的 SliverGrid 代表需要一個寬高比,並且我希望網格項目可以動態調整大小,據我所知,只有交錯的 gridview 才有可能。 我的問題是如何實現交錯的 gridview 並在我的CustomScrollView中將其用作條子? 編輯: 我的pu ...
[英]How to nest a TabBarView's ListView in a CustomScrollView?
我要布局的東西是這樣的 因為我想讓 ListView 滾動到外面,所以我想讓 ListView 變成 SliverListView。 但這會產生錯誤: RenderRepaintBoundary 需要 RenderBox 類型的子級,但接收到 RenderSliverList 類型的子級。 做這 ...
[英]Wrapping a CustomScrollView and a Sliverlist with a Streambuilder throws exception
我正在嘗試使用Streambuilder來自 Firebase firestore 的實時文檔,同時在CustomScrollView和SliverList中顯示檢索到的數據,但是當我這樣做時,列表中斷並且屏幕保持空白。 我嘗試了一個FutureBuilder並且它有效,但它不能滿足我的要求。 這是 ...
[英]CustomScrollView: Body scrolls under SliverAppBar
Flutter DartPad 我在CustomScrollView中有多個SliverAppBar ,屏幕主體在SliverFillRemaining內。 頂部 SliverAppBar 已固定中間的 SliverAppBar 是一個圖像,會隨着用戶滾動而折疊底部 SliverAppBar 是一 ...
[英]How to detect tap (or any other gesture event) on Positioned widget on another widget in CustomScrollView?
這是一個小部件樹: 結果是: 我可以處理藍色箭頭指向的點擊區域,而不能處理紅色箭頭所在的位置。 如果是 web 我會使用z-index屬性,但我怎樣才能在 Flutter 中做同樣的事情? ...
[英]Flutter: nested ListView works. Nested SliverList don't, yet ListView contains Slivers
我遇到了一個特定的問題。 我能夠組成一個包含水平ListView的垂直外部ListView 。 將其視為 Facebook 上的多個朋友建議行堆疊在一起。 這工作正常。 因為我想利用SliverAppBar附帶的特權,所以我需要有一個CustomScrollView作為父Widget ,然后在其s ...
[英]Jumping to a particular sliver in a flutter sliverlist
如何以編程方式跳轉(或滾動)到條子列表中條子高度不同的特定條子? 下面的代碼將一本書的文本加載到自定義滾動視圖中,每個小部件都有一個章節。 當按下操作按鈕時,我希望視圖跳轉到第 3 章,但沒有任何反應。 我究竟做錯了什么? ...