When I build my Flutter project in release on iOS, when a ListTile appears inside the ListView I get a grey container instead of the actual listTile. I suspect it has to do with the size of the ListView.
2
SizedBox( width: 100.w, child: Obx(() { return ListView.builder( shrinkWrap: true, itemCount: splitBillingController .splitUsers.length, itemBuilder: (context, int index) { return Padding( padding: const EdgeInsets.symmetric( vertical: 8), child: splitBillingController .isLoading.value ? const Center( child: CircularProgressIndicator( color: primaryColor, ), ) : Dismissible( direction: DismissDirection .endToStart, confirmDismiss: (direction) async { // return null; return await splitBillingController .removeSplitter( splitBillingController .splitUsers[ index]![ "userId"]); background: Container( padding: const EdgeInsets .symmetric( horizontal: 30), alignment: AlignmentDirectional .centerEnd, color: Colors.red, child: const Icon( Icons.delete, color: Colors.white, ), ), key: Key( splitBillingController .splitUsers[ index]!["userId"]), child: ListTile( textColor: buttonColor, selected: splitBillingController .splitUsers[ index]![ "isUnlocked"], selectedColor: Colors.white, selectedTileColor: buttonColor, onTap: () async { await splitBillingController .approveUser( splitBillingController .splitUsers[ index]); }, shape: RoundedRectangleBorder( borderRadius: BorderRadius .circular(24), ), tileColor: Colors.white, // const Icon(Icons.credit_card), leading: CircularProfileAvatar( splitBillingController .splitUsers[ index]!["photo"], radius: 20, borderWidth: 0, placeHolder: (context, url) => SvgPicture.asset( 'assets/images/armadillo.svg', height: 20, ), ), title: Text( splitBillingController .splitUsers[ index]!["userName"], style: const TextStyle( fontFamily: mainFontBold), ), subtitle: const Text( "Passenger"), trailing: Text( "${splitBillingController.splitUsers[index]!["amount"].toStringAsFixed(2)}€", style: const TextStyle( fontSize: 22, fontFamily: mainFontBold, ), ), ), ), ); }); }), ),```
Connect the phone to the laptop and run the following in the terminal
flutter run –release
And then open this screen. I am sure you will find something in terminal
Click here to cancel reply.
2
Answers
Connect the phone to the laptop and run the following in the terminal
And then open this screen. I am sure you will find something in terminal