Questions tagged [flutter-onpressed]

72 questions
0
votes
1 answer

When i input the text in showDialog function and pass it to Text widget it isn't getting displayed

I made a showMyDialog.dart file which contains the showDialog Widget with AlertDialog and inside i used a Textfield to get input from the user to display it on the same Screen after onPress. After the input it should be displayed on the Screen but…
KiraKami
  • 15
  • 2
0
votes
2 answers

Parse arguments with Navigator.push shows error too many positional arguments: 0 expected, but 1 found

I want to parse arguments with Navigator.push() to my other dart file . Because I want to send the path of the selected song in songlist, to the music player main UI (For Playing) [ songlist.dart ] child:ListView.builder( …
0
votes
2 answers

The non-nullable local variable 'newTaskTitle' must be assigned before it can be used

I'm Trying to capture onChanged property value which is comming from my TextField and use it inside my onPressed textButton but it's not working. I've read most of the related issues in stack overflow but none of it actually helping in the problem.…
Gole Book
  • 11
  • 1
0
votes
2 answers

Flutter - if Textbutton ontap to activate TextButton

My Problem I want search record page i want funtion I made a search bar with TextField, I hope the ontap function in the TextField works as well as the launcher TextButton. Code TextField( onTap: () {}, decoration: InputDecoration( hintText:…
김용석
  • 11
  • 4
0
votes
1 answer

Flutter: How do i disable double pressed on IconButton

I have some IconButton in persistentFooterButtons that navigate to other screens but if I pressed double on any button and press the back button it redirects two times. if I pressed the button multiple times and press the back button it shows me the…
0
votes
2 answers

How to disable user to go back to login screen after user login

I have an issue that when the user clicks on the login button it redirects to the home page but when I press back it redirects me to the login page again. this is not the correct flow. after the user login, it can't be able to access the login page…
0
votes
1 answer

OnPress function doesn't print any in console

I have given a print("object") In Floating Action Button In default code of Flutter counter App When I hit enter it doesn't print anything in console,It works on Web,Its working on Infinix Zero X Neo but on my mobile Tecno Camon 18p its not…
0
votes
2 answers

FLUTTER button onpressed navigator push got errors

I've made a button to send data to firebase. I want when the button is pressed, the button is not only to send data to firebase, but I want the button makes users can go back to the homepage. I used setData for sending the data, and I used…
0
votes
1 answer

TextButton is automatically invoked when the dropDown menu item is changed

Here goes my code , I am using the TextButton to update the order ,But after every change in the dropdown item, onPress is automatically invoked and the function updateOrder is automatically invoked import…
krishnaacharyaa
  • 14,953
  • 4
  • 49
  • 88
0
votes
1 answer

Flutter - how to ignore parent touch event on child touch event?

This should be pretty basic, but I can't seem to figure out how to disable or ignore parent touches when a child IconButton is pressed. I am working on a treeview that can expand and collapse. When I click the row (a Card), the children will be…
Gregg Reno
  • 441
  • 4
  • 15
0
votes
1 answer

how to make dropdown list#flutter

how to make dropdown list when on tap on button with out using dropdown button #flutterenter image description here new DropdownButton( value: _selectedLocation, onChanged: (String newValue) { setState(() { _selectedLocation =…
0
votes
0 answers

how to make an iconButton clickable in a stack which is in another stack

I'm new to flutter and I've this code which doesnt work because I get a red circle on my mouse when I try to click on one of my buttons, I've already been searching for days but I've n't found anything... Hoewever I think the problem could be the…
LeGros
  • 19
  • 5
0
votes
2 answers

Why does my Flutter TextButton onPressed function generate a type assignment mismatch?

I want to launch Google Maps using the maps_launcher package. When I copy the TextButton code below to an new project in the MaterialApp home section (or strip down my own main.dart), it works fine. (EDIT: It has to be wrapped in a Container or…
Michel
  • 11
  • 4
0
votes
3 answers

How to show Text at bottom of textformfield after user enter some data in it

This is my code for my UI Container( padding: EdgeInsets.fromLTRB(10, 10, 10, 0), child:TextFormField( controller: name, textInputAction: TextInputAction.next, decoration: InputDecoration( …
Praveen Kumar
  • 199
  • 11
0
votes
1 answer

How to send onPressed value to another widget Flutter

I want to send data from widget to another widget, in my example I want to send onPressed value as a variable. appBar: CancelAppBar(onPressed: ), What should I write after onPressed (in the above code) to send the…