PagedListView<int, Data>( pagingController: _pagingController, builderDelegate: PagedChildBuilderDelegate( itemBuilder: (context, item, index) => GestureDetector( onTap: () { setState(() { //!frontPanelVisible.value indexMiniScreen = index; _BackdropState .initStates = true; //showing mini window when clicking _BackdropState .setConverItem = conversList[ indexMiniScreen]; //frontPanelVisible = ValueNotifier(true); //_BackdropState().reassemble(); //_controller.fling(velocity: math.min(-_kFlingVelocity, -flingVelocity)); _BackdropState ._controller .fling( velocity: math.min( 10, 50)); //print("_backdropKey: "+_BackdropState._backdropKey.); }); frontPanelVisible = ValueNotifier< bool>( true); }, child: Container( padding: EdgeInsets .only( top: 8), decoration: BoxDecoration( borderRadius: const BorderRadius .all( Radius.circular(16.0)), boxShadow: [ BoxShadow( color: Colors .grey .withOpacity(0.6), offset: const Offset( 4, 4), blurRadius: 16, ), ], ), child: ClipRRect( borderRadius: const BorderRadius .all( Radius.circular(16.0)), child: SingleChildScrollView( child: Column( children: [ AspectRatio( aspectRatio: 2, child: // CachedNetworkImage( // imageBuilder: (context, // imageProvider) => // Container( // decoration: // BoxDecoration( // image: DecorationImage( // image: imageProvider, // fit: BoxFit.cover, // colorFilter: // ColorFilter.mode( // Colors.white, // BlendMode.dstATop)), // ), // ), // imageUrl: "http://jennyhomes.vn/upload/product/" + converslist[index].thumbProduct // , // progressIndicatorBuilder: // (context, url, // downloadProgress){ // return Container(); // } //// SpinKitRing( //// color: //// ThemeData.light() //// .primaryColor, //// size: 20.0, //// ), // , // errorWidget: (context, // url, error) => // Icon(Icons.error), // ), CachedNetworkImage( imageUrl: BaseUrlCommon().getUploadImageUrl + conversList[index].thumbProduct, imageBuilder: (context, imageProvider) => Container( decoration: BoxDecoration( borderRadius: BorderRadius.vertical(top: Radius.circular(10.0)), image: DecorationImage(image: imageProvider, fit: BoxFit.cover, colorFilter: ColorFilter.mode(Colors.white, BlendMode.colorBurn)), ), ), placeholder: (context, url) => Center( child: CircularProgressIndicator( color: Colors.blueAccent, )), errorWidget: (context, url, error) { return Container( child: Center( child: Text( locate.data!["productThumbErr1"] ?? "", style: TextStyle(color: Colors.blue, fontWeight: FontWeight.bold), )), height: 190.0, width: MediaQuery.of(context).size.width - 100.0, decoration: BoxDecoration( borderRadius: BorderRadius.circular(5), color: Colors.white, ), ); }, ), ), Container( color: Colors.white, child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( child: Container( child: Padding( padding: const EdgeInsets.only(left: 16, top: 8, bottom: 8), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( locate.hasData ? //converslist[index].nameViProduct, //json.decode(utf8.decode(response.bodyBytes)).toString() (locateTitle(conversList[index], locate.data!["langCode"]!)) : "", textAlign: TextAlign.left, style: TextStyle( fontWeight: FontWeight.w600, fontSize: 22, ), ), Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.start, children: [ Text( //converslist[index].catNameVi, locate.hasData ? locateCate(conversList[index], locate.data!["langCode"]!) : "", style: TextStyle(fontSize: 14, color: Colors.grey.withOpacity(0.8)), ), const SizedBox( width: 4, ), Icon( FontAwesomeIcons.mapMarkerAlt, size: 12, color: HotelAppTheme.buildLightTheme().primaryColor, ), Expanded( child: Text( ' conversList[index].namePlaceDist−{conversList[index].namePlaceCity}', overflow: TextOverflow.ellipsis, style: TextStyle(fontSize: 14, color: Colors.grey.withOpacity(0.8)), ), ), ], ), Padding( padding: const EdgeInsets.only(top: 4), child: Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ //SizedBox(width: 10.0), Tooltip( message: "Phòng ngủ", child: Icon( FontAwesomeIcons.bed, color: Colors.blue, size: 15.0, ), ), SizedBox(width: 10.0), Text(" {conversList[index].bathRoom}", style: TextStyle(fontSize: 14, color: Colors.grey.withOpacity(0.8))), SizedBox(width: 10.0), Tooltip( message: "Diện tích", child: Icon( FontAwesomeIcons.square, color: Colors.blue, size: 15.0, ), ), SizedBox(width: 10.0), Text(" {conversList[index].propertiespSquare} m2", style: TextStyle(fontSize: 14, color: Colors.grey.withOpacity(0.8))), ], ), ), ], ), ), ), ), Padding( padding: const EdgeInsets.only(right: 16, top: 40), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.end, children: <Widget>[ Text( '\$${conversList[index].propertiespPrice}', textAlign: TextAlign.left, style: TextStyle( fontWeight: FontWeight.w600, fontSize: 22, ), ), // Row( // mainAxisAlignment: MainAxisAlignment.spaceAround, // children: <Widget>[ // // Text('{converslist[index].reviewProduct}', // style: // TextStyle( // fontWeight: // FontWeight // .w600, // fontSize: // 15, // color: Colors.grey // ), // ), // Icon( // Icons.remove_red_eye, // color: Colors.blueAccent, // size: 24.0, // //semanticLabel: '/1 đêm', // ), // //Spacer(), //// Text("1 ", //// style: //// TextStyle( //// fontWeight: //// FontWeight //// .w600, //// fontSize: //// 15, //// color: Colors.grey //// ), //// ), //// Icon( //// Icons.nights_stay, //// color: Colors.blueAccent, //// size: 24.0, //// //semanticLabel: '/1 đêm', //// ), // ] // ), ], ), ), ], ), ), ], )), //fixing 1 // Row( // //mainAxisAlignment: MainAxisAlignment.spaceEvenly, // crossAxisAlignment: CrossAxisAlignment.center, // children: [ // // converslist[index].listOutstanding == 1 ? Container( // padding: EdgeInsets.symmetric(vertical: 4, horizontal: 6), // decoration: BoxDecoration( // color: Colors.red, // borderRadius: BorderRadius.only( // topLeft: Radius.circular(8), // bottomRight: Radius.circular(8), // ) // green shaped // ), // child: // Center(child: Text( locate.hasData? locate.data["proposalText"] : "" // ,style: TextStyle( // fontWeight: FontWeight.bold, // fontSize: 12, // color: Colors.white, // ),),), // // ):Center(), // // converslist[index].discount == 1 ? Container( // padding: EdgeInsets.symmetric(vertical: 4, horizontal: 6), // decoration: BoxDecoration( // color: Colors.green, // borderRadius: BorderRadius.only( // topLeft: Radius.circular(8), // bottomRight: Radius.circular(8), // ) // green shaped // ), // child: Center(child: Text(locate.hasData? locate.data["promotionText"] : "" // ,style: TextStyle( // fontWeight: FontWeight.bold, // fontSize: 12, // color: Colors.white, // ),),), // // ):Center(), // // converslist[index].newProduct == 1 ? Container( // padding: EdgeInsets.symmetric(vertical: 4, horizontal: 6), // decoration: BoxDecoration( // color: Colors.blue, // borderRadius: BorderRadius.only( // topLeft: Radius.circular(8), // bottomRight: Radius.circular(8), // ) // green shaped // ), // child: Center( // child: Text(locate.hasData? locate.data["newText"] : "" // ,style: TextStyle( // fontWeight: FontWeight.bold, // fontSize: 12, // color: Colors.white, //
),),), // // ):Center(), // // ], // ), )))), )
Something when wrong error when i scroll last, i want to catch and change message remove reload button