flutter-layout

Flutter listview builder Scroll controller listener not firing inside list view?

大憨熊 提交于 2021-01-06 05:00:11
问题 I have a listview builder widget inside another list view. Inner listview listener is not firing when scrolling position reaches to its end. initState() { super.initState(); _scrollController.addListener(() { if (_scrollController.position.maxScrollExtent == _scrollController.position.pixels) {function();} } Container( child: Listview( children: <Widget>[ Container(), ListView.builder( controller: _scrollController, physics: NeverScrollableScrollPhysics(), shrinkWrap: true, itemCount: list

How to get the TextFormField text color,fontsize, etc using controller in flutter?

扶醉桌前 提交于 2021-01-05 12:49:30
问题 I make custom textformfield class and used it as a widget. I want to get the textformfields color,fontsize,align etc which I have set.How can i get this all properties which i have set to the textformfield using controller or by anything? My custom class code: class CustomTextNIconWidget extends StatefulWidget { final Color fontColor; final GestureTapCallback onSingleTapWidget; final GestureTapCallback onDoubleTapWidget; final FontWeight fontWeight; final TextEditingController controller;

How to format FormBuilderRate (Flutter Form Builder package)?

夙愿已清 提交于 2021-01-05 07:07:43
问题 I'm trying to format the appearance of FormBuilderRate within the flutter_form_builder package (link to package on pub.dev). Specifically, How to eliminate or change the format of horizontal lines between items How to vertically align prefix Text (e.g., "Wwww..." in the screenshot below) with bottom or center of rating stars How to align right side of all four instances of prefix Text AND the left side of the rating stars, with a tighter gap between the prefix Text and left-most star (right

How to format FormBuilderRate (Flutter Form Builder package)?

 ̄綄美尐妖づ 提交于 2021-01-05 07:06:55
问题 I'm trying to format the appearance of FormBuilderRate within the flutter_form_builder package (link to package on pub.dev). Specifically, How to eliminate or change the format of horizontal lines between items How to vertically align prefix Text (e.g., "Wwww..." in the screenshot below) with bottom or center of rating stars How to align right side of all four instances of prefix Text AND the left side of the rating stars, with a tighter gap between the prefix Text and left-most star (right

DefaultTabController without Scaffold?

时光怂恿深爱的人放手 提交于 2021-01-04 12:10:38
问题 I'm trying to use DefaultTabController in the middle of some widgets. So my TabBar could not be in AppBar and has to be down some widgets. So my problem is when I use TabBarView it crashes... So here's an example of Flutter sample but no found how to do it without Scaffold . final List<Tab> myTabs = <Tab>[ Tab(text: 'LEFT'), Tab(text: 'RIGHT')]; Code DefaultTabController( length: myTabs.length, child: Scaffold( appBar: TabBar( tabs: myTabs, ), body: TabBarView( children: myTabs.map((Tab tab)

DefaultTabController without Scaffold?

依然范特西╮ 提交于 2021-01-04 12:10:32
问题 I'm trying to use DefaultTabController in the middle of some widgets. So my TabBar could not be in AppBar and has to be down some widgets. So my problem is when I use TabBarView it crashes... So here's an example of Flutter sample but no found how to do it without Scaffold . final List<Tab> myTabs = <Tab>[ Tab(text: 'LEFT'), Tab(text: 'RIGHT')]; Code DefaultTabController( length: myTabs.length, child: Scaffold( appBar: TabBar( tabs: myTabs, ), body: TabBarView( children: myTabs.map((Tab tab)

DefaultTabController without Scaffold?

China☆狼群 提交于 2021-01-04 12:10:24
问题 I'm trying to use DefaultTabController in the middle of some widgets. So my TabBar could not be in AppBar and has to be down some widgets. So my problem is when I use TabBarView it crashes... So here's an example of Flutter sample but no found how to do it without Scaffold . final List<Tab> myTabs = <Tab>[ Tab(text: 'LEFT'), Tab(text: 'RIGHT')]; Code DefaultTabController( length: myTabs.length, child: Scaffold( appBar: TabBar( tabs: myTabs, ), body: TabBarView( children: myTabs.map((Tab tab)

DefaultTabController without Scaffold?

自闭症网瘾萝莉.ら 提交于 2021-01-04 12:10:18
问题 I'm trying to use DefaultTabController in the middle of some widgets. So my TabBar could not be in AppBar and has to be down some widgets. So my problem is when I use TabBarView it crashes... So here's an example of Flutter sample but no found how to do it without Scaffold . final List<Tab> myTabs = <Tab>[ Tab(text: 'LEFT'), Tab(text: 'RIGHT')]; Code DefaultTabController( length: myTabs.length, child: Scaffold( appBar: TabBar( tabs: myTabs, ), body: TabBarView( children: myTabs.map((Tab tab)

How to change background color of DataColumn in Flutter?

我是研究僧i 提交于 2021-01-04 07:37:30
问题 I have a DataTable widget for displaying some data in tabular format. I wasn't able to find any way to change the background color of the DataColumn , it defaults to white. I tried wrapping the label inside a Container but that does not help since the container takes the dimensions of the child. Is there any easier way to set the background color of `DataColum'? Below is some code for reference - DataTable( dataRowHeight: 70, headingRowHeight: 60, rows: List.generate(4, (index) { return

How to update a widget state from another widget in Flutter using global Key?

谁都会走 提交于 2021-01-04 05:39:47
问题 I have a main widget screen contain two main widgets a Header (marked with red) and a list (marked with purple) here is my code for that : class ScreenClient extends StatefulWidget { _ClientState createState() => _ClientState(); } class _ClientState extends State<ScreenClient> { @override Widget build(BuildContext context) { return Column( mainAxisAlignment: MainAxisAlignment.start, children: <Widget>[ ClientHeader(), // this is my header widget red Expanded( child: ClientList(), // this is