我正在尝试将RefreshIndicator添加到CustomScrollView。有可能吗?这是代码示例:CustomScrollView(slivers:[SliverAppBar(title:Text('POSTAPP'),centerTitle:true,floating:true,pinned:false,),SliverList(delegate:SliverChildBuilderDelegate(_createPostItem,childCount:postRepo.posts.length,),),],); 最佳答案
我有一个包含在RefreshIndicator中的列表.当下拉列表时,我想从Firestore(数据库)中获取一些数据,更新我的状态,然后呈现列表。我连接了一个reduxAction,可以获取数据并更新我的状态:finalFetchPostsRequest=(){return(Storestore){finalCollectionReferencepostCollection=Firestore.instance.collection("posts");postCollection.getDocuments().then((QuerySnapshotsnapshot){Listdocs
我正在尝试找出一种方法来在FutureBuilder完成加载时向周围的类指示。RefreshIndicator将Future作为参数,并在Future完成时停止显示刷新指示器。我无法访问传递给FutureBuilder的完全相同的Future变量,尤其是当它们位于两个单独的类中时,除非我可以传递对一个的引用当它在其他类(class)完成时,我会知道...... 最佳答案 我也在寻找这个答案。终于明白了……这是我的做法FutureBuilder(future:_calculation,//apreviously-obtainedFut
所以,我有这个“通知”屏幕,它为用户显示通知。导航到此屏幕时,它将是空白的,因为通知是从后端API实时加载的。这里有一些代码来说明问题:class_MyItemsPageStateextendsState{finalGlobalKey_refreshIndicatorKey=newGlobalKey();List_items=[];@overridevoidinitState(){super.initState();//Nothingisdisplayingonscreeninitially,sincetheitemsareloadedfromAPIonstartup.//Prefer