listview

Flutter: How to AUTO RESIZE height, width, fontSize in ListView based on Expanded and itemCount

吃可爱长大的小学妹 提交于 2020-06-17 09:51:05
问题 I have a page like this: 1st Listview: Axis.vertical as default 2nd Listview inside 1st Listview: Axis.horizontal , itemCount = 3 . To avoid the error, I set the height:50 width:100 for Container in this However, I want to find some way for it to display well on all screens, specifically in the 2nd ListView: Expanded (1: 1: 1) and it fits the right of the screen, can't scroll. Width of Container will auto-resize based on Expanded flex . fontSize of Text and Height of Container will auto

Setting ListViewItem's Checked state using WinAPI

允我心安 提交于 2020-06-17 07:22:06
问题 I have the following code that I am trying to use to check and uncheck items in a list view. Underneath everything, the checking functionality seems to be working. The problem is that the uncheck functionality does not work, and checking the item that is already checked simply makes the check box visible without firing the checked event or unchecking the box. Everything I've found has shown me that this should work, but I am just not able to come up with a working solution here. Can anybody

Flutter: implementing a search feature for data from a StreamBuilder with ListView

拟墨画扇 提交于 2020-06-16 03:46:13
问题 In my Flutter app I have a screen with all the users. The list of users is generated by a StreamBuilder , which gets the data from Cloud Firestore and displays the users in a ListView . To improve functionality I want to be able to search through this user list with a search bar in the Appbar . I have tried this answer and that worked well but I can't figure out how to get it working with a StreamBuilder in my case. As a flutter beginner I would appreciate any help! Below I have included my

Set height of ListView in React Native

牧云@^-^@ 提交于 2020-06-14 06:00:07
问题 I need to set width and height of ListView. While setting width works as expected, setting height has no effect and ListView is always stretching into almost bottom of the screen (there is only margin between bootom of screen and bottom of ListView). I am creating ListView in render method this way: <ListView ref={component => this._stationsListFrom = component} style={styles.stationsList} dataSource={this.state.dataSource} renderRow={(rowData) => <Text>{rowData}</Text>} /> This is its style:

How to pass Taps to widgets below the top widget?

廉价感情. 提交于 2020-06-12 07:03:15
问题 I'm trying to implement a very simple version of Card Paginator Component (single card) in Flutter. Here is an example of a basic demo I've created: class CardComponent extends StatelessWidget { @override Widget build(BuildContext context) { return Stack( children: [ Positioned( top: 20.0, left: 20.0, child: GestureDetector( // onTap should run while the text is visible on the screen // The text will become invisible when the Listview gest scrolled upwards onTap: (){print('text tapped');},

Espresso - How to check if one of the view is displayed

两盒软妹~` 提交于 2020-06-09 11:04:48
问题 In my test, after one action, there are two possible views which can appear and both of them are correct. How can I check if one of the view is displayed. For a single view I can check with is Displayed(). But that would fail if other view is visible instead. I want to pass the test if any one of those two views are displayed. onMyButton.perform(click()); onMyPageOne.check(matches(isDisplayed())); //view 1 or onMyPageTwo.check(matches(isDisplayed())); //view 2 After, perform click on MyButton

List All Mp3 files in android

瘦欲@ 提交于 2020-06-09 10:57:28
问题 I am developing music player in android but stuck in reading MP3 files. here is my code to read all mp3 files. but its not returing any files from device(although there are some files which i copied using adb). I also want it to list using Album, artist etc. please help in this. final String MEDIA_PATH = Environment.getExternalStorageDirectory()+""; private ArrayList<HashMap<String, String>> songsList = new ArrayList<HashMap<String, String>>(); // Constructor public SongsManager(){ } /** *

List All Mp3 files in android

一笑奈何 提交于 2020-06-09 10:56:26
问题 I am developing music player in android but stuck in reading MP3 files. here is my code to read all mp3 files. but its not returing any files from device(although there are some files which i copied using adb). I also want it to list using Album, artist etc. please help in this. final String MEDIA_PATH = Environment.getExternalStorageDirectory()+""; private ArrayList<HashMap<String, String>> songsList = new ArrayList<HashMap<String, String>>(); // Constructor public SongsManager(){ } /** *

Flutter Setstate inside Listview.builder's builditem function not reloading

牧云@^-^@ 提交于 2020-06-09 05:22:48
问题 I have a streambuilder that loads information from firestore. Then I use a listview.builder to display the information. The displayed information is being called by the function firstBuildItem or buildItem. The functionality that I want is that when the user clicks on the container that is wrapped with a gesturedetector, I want another widget to be expanded below the main widget. I'm not sure how to achieve this with flutter because since each message is an item insider listview.builder, the

create an horizontal List View inside a child of Horizontal ListView

狂风中的少年 提交于 2020-06-01 04:04:42
问题 I am new in flutter and I want to show an horizontal list when i click in a child of an Horizontal ListView. I Tried with this code but i dont knpw how to add the child ListView when I taped in InkWell there is another way to this, class Category extends StatelessWidget { final String image_location; final String image_caption; Category({this.image_location, this.image_caption}); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.all(2.0), child: InkWell(