90 questions
2
votes
1
answer
172
views
How to properly support different text heights for a TextField?
I'm working with a rich text field that has different text heights:
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const ...
0
votes
1
answer
84
views
In flutter text field cursor position
In flutter I have a text field. now let say user types 2+2+2+2+2+2+2+2+2
and now he click on let say 2nd '2' from left and keeps typing '3' the text grows and moves to right and at some point my ...
0
votes
1
answer
135
views
How to trigger the undo controller of a text field in flutter test
I have this widget containing a TextField and a UndoHistoryController :
class _MyHomePageState extends State<MyHomePage> {
final TextEditingController _controller = TextEditingController();
...
1
vote
2
answers
1k
views
How can I change the height of a TextField in Flutter?
I want to change the height of a TextField in Flutter but I don't know which one is the best way.
Wrap the TextField in a SizedBox
Use content padding property
If you have some experience, please ...
0
votes
2
answers
172
views
How to completely hide typed characters in a Flutter TextFormField?
In my Flutter app, I use a TextFormField, so my users can enter a password.
In order to hide the characters while they are being typed, I set the obscureText property to true. But on some devices, ...
1
vote
0
answers
281
views
Display the default/native context menu
I have an app with Flutter, which has a text field and button:
Row(
children: [
Expanded(
child: TextFormField(),
),
Expanded(
child: ElevatedButton(
onPressed: () {}...
1
vote
1
answer
139
views
How to focus the next field?
I have a page with several text fields, I used FocusTraversalGroup so the fields are focused in the desired order when pressing tab. See:
Now, when I click on the icon button next, I want to send the ...
0
votes
2
answers
100
views
TextField issue when its text reaches the full width of the text field
This is the code below, i've checked all the possibilities i could't find the solution.
Whenever the textField text is filled to its end the issue appears After the field is filled, other wise it ...
0
votes
0
answers
51
views
Text in TextField of flutter is overflow the parent Container, Cannot align Vertical center for text in Textfield
enter image description here
Container(
padding: const EdgeInsets.symmetric(horizontal: 8),
margin: const EdgeInsets.only(bottom: 16),
height: 60,
decoration: ...
0
votes
1
answer
256
views
FocusNode does not trigger when first time add to the widget with if statement
I have some logic to check if statement and show the TextField widget as below:
Flexible(
fit: FlexFit.loose,
child: ListView.builder(
...
0
votes
2
answers
1k
views
Flutter: Dynamically Updating TextField Values Based on User Input
I am currently working on my Flutter application and I am encountering difficulties in achieving a specific functionality. The objective is to automatically populate and disable the third TextField on ...
2
votes
2
answers
707
views
How to have a `TextField`'s label that wraps if too long?
I'm trying to have a long TextField's label that doesn't overflow but wraps.
If I use InputDecoration({String labelText}), the label overflows:
TextField(
decoration: InputDecoration(
labelText: ...
2
votes
3
answers
1k
views
How to set style for a text field label when the input is active?
On the image below the Demo Text label by default a little bit small. I tried to change labelSmall and labelMedium styles but it doesn't work for that. What style is responsible for that?
0
votes
1
answer
90
views
My textfield is returning null, so somehow the value isn't being passed from the onChanged -> the variable
Here is the bulk of the code:
I have tried modifying how I pass though the variable, on my other projects a simple function passthrough was sufficient but I must be initializing it incorrectly.. If I ...
0
votes
1
answer
292
views
How can I configure a Flutter TextField to take all text input?
I have precisely one TextField on the screen of my Flutter app. I want my Flutter app to both work on the desktop and on mobile.
Whenever the app is active I want all text input to go into the ...
0
votes
2
answers
211
views
In Flutter, how can I create a shape like this XML shape I created in android java app
I created an android app in java and I had this xml shape in it:
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/...
2
votes
1
answer
436
views
How to change TextField border color at onChanged (change character) in flutter?
I need to change textfield border color while changing characters based on email or phone validation.
For Example :
When typing an incomplete email at the time border color is set to RED, after ...
1
vote
1
answer
288
views
How to hide password entry in flutter?
I am making a Flutter application. I set the login and registration processes. But since I get the password as a string when I enter the password, what can I do to make the password appear as a star ...
1
vote
1
answer
720
views
How can split the text form field in order to type vehicle number that consist of letters and numbers
How I can input the text in the SplittedBox of TextFieldForm,
which consist of letters and numbers?
here is my source code:
Container(
color: Colors.grey[200],
padding: EdgeInsets.all(20),
child: ...
0
votes
3
answers
313
views
How i fix username password email is null in flutter
I use widget StatefulWidget and _inputFiled
I've created a model class
class Profile {
String? email;
String? username;
String? password;
Profile({
this.email,
this.username,
this....
1
vote
1
answer
3k
views
Using TextEditingController live changes in Text widget
I am learning Flutter and trying now to monitor the changes on a TextEditingController. I can monitor it, using a listener function, but I cannot use the variable in a Text widget:
class ...
2
votes
4
answers
2k
views
Not able to remove focus from input field
I have four textfields, a title field, a details field, a date field, and a time field. Both the date and time fields are wrapped within a gesture detector, and onTap calls a pickDateAndTime method. ...
0
votes
2
answers
1k
views
Flutter navigate to second screen and focus on Text field?
When I tap on a button I want to navigate to the second screen Focus on TextField(there is only one) and raise a keyboard.
I successfully focused when I taped on a widget on the same screen using ...
1
vote
2
answers
730
views
how to set textfield width based on it's text in flutter
I want to size the textfield based on text length...while typing it's length should be changed according to text..I was suggested to use IntrinsicWidth but its not working..
Container(
...
0
votes
1
answer
424
views
The error message keeps resizing my textform field
I have wrapped a container and a sizedbox around the textform field to fit the error message in the container but its keeps resizing the widget.
Container(
decoration: BoxDecoration(
color: ...
0
votes
1
answer
794
views
TextField widget in flutter not working properly
I created a simple page for a user to update their display name if they don't have one, but for some reason when I click to enter the input data, the keyboard appears and disappears and the page ...
1
vote
1
answer
618
views
Textfield clear button not updating state
I have a container that's wrapped within a gesture detector and within the container two text-fields which on clicked will show the time selector and date selector widgets consecutively. I added a ...
0
votes
1
answer
183
views
try To make a Input Text Field in flutter But I can't Make a validator function that send as required function
That is a Component File and i need help with that:
Widget defaultTextFormField({
required TextEditingController controller,
required TextInputType keyboardtype,
required Function () ...
1
vote
2
answers
3k
views
How to check if TextFormField is empty
I want to create a LoginPage for my App. I don't want to use a firebase so i tried to fake the login with a validator.
First I want to check, if E-Mail and Password is filled with something. Otherwise ...
4
votes
2
answers
5k
views
Flutter for Windows - A KeyRepeatEvent is dispatched, but the state shows that the physical key is not pressed - Shift Left
I'm building a Flutter Application for Windows.
I have a TextField and if I run the Application and want to insert an uppercase Character by holding Shift Left or Shift Right and than a letter, I get ...
0
votes
2
answers
920
views
Flutter Dropdown and Text Field is not showing in Release Mode
My flutter app is not showing a Dropdown field and a text field in release mode, but in debug everything seems fine, I have no idea why this is happening.
I'm using a dropdown_search package to show ...
1
vote
1
answer
1k
views
Calculate from one TextField in flutter
I'm creating a flutter page that has one text field, user should put a number in this field and the page calculate his input with another int that i already added in the code.
i did it in a bad way as ...
0
votes
1
answer
35
views
I've been trying to output AlertDialog in flutter after someone enters something, But alertdialog doesn't work
I wanted to get an output of whatever user typed inside the textfield, I referred to official documentation of flutter dev. I couldn't come up where I am wrong, I would be really glad if you guys help....
1
vote
1
answer
8k
views
How to dispose a text editing controller in flutter?
TextEditingController titleC = TextEditingController();
TextEditingController detailsC = TextEditingController();
// in dispose how can in dispose or clear my controller after submitting
@...
-2
votes
1
answer
108
views
i'm trying to use customTextField
i'm trying to use customTextField
this the file which contain the Widget
import 'package:flutter/material.dart';
Widget defaultFormField({
required TextEditingController controller,
required ...
1
vote
1
answer
261
views
flutter Enter event not found on zebra tc77?
We need to scan using zebra tc77 but enter event not found at the end of text , even after we have enabled enter key at settings?
_onChangeListener(String val) {
if(val.isEmpty) return;
...
4
votes
0
answers
213
views
Flutter focus textfield without opening softkeyboard?
I'm getting input to my textfield from barcode scanner so I dont need softkeyboard to open when textfield in focus.To achieve that I tried TextInputType.none it hides the keyboard but also can't ...
1
vote
4
answers
5k
views
How to reduce the height of the DropDownButtonFormField so that the text inside it does not go out of the middle in flutter?
When I set a height for my container that is the parent of DropDownButtonFormField, I have no problem when the height is 55, but when the height is less (42) than a certain limit, the text inside it ...
2
votes
1
answer
999
views
Flutter Bottom Overflow on custom bottom sheet
You can see the problem here (I turned on flutter inspector gridlines so you can see the problem better)
Overflow disappears when I wrap my Container inside Expanded,
but then my search bar height is ...
1
vote
2
answers
1k
views
when i typing in flutter textfield it type in backward direction how to solve it?
I have one page of technical skill and I want to add new textfield on onatap and get the value of it and remove that skill on ontap of delete button and this is working now but only problem was that ...
0
votes
2
answers
43
views
I am new to programming can someone help me what's the problem here, I was doing a login page and this happens
If password and username is same, I want to print 'username and password is same' statement in the terminal .But it is only printing the second statement 'username and password does not match even if ...
-1
votes
4
answers
308
views
How to make a button inactive until a required field is filled in properly in flutter
I want to make a particular button inactive and a different color until all the required fields filled properly, I also want there to be a message under the textfield telling the user to fill the ...
1
vote
1
answer
721
views
How to make search and text in row in Flutter?
I have tried to make it in the row, but then I don't have anything in the screen.
How do you solve it in Flutter?
appbar
@override
Widget build(BuildContext context) {
return Padding(
...
0
votes
0
answers
803
views
How to disable Flutter DatePicker?
I have an issue with DatePicker in my application. Here's a simple TextFormField that I've created in my app which will open up DatePicker whenever the user taps on it.
This widget is a part of a ...
1
vote
2
answers
283
views
Flutter TextFormField active color while not in focus
I would like the colour of a text field to remain active even if it is no longer in focus.
Here you can see the problem. If i unselect the TextFormField, the color of the icon and the underline ...
0
votes
1
answer
563
views
can't change textfield value inside future builder flutter
i want to fetch data from api and set it as text field initial value, then after user changes it i will post it to another api,
but after changing textfield value, future builder rebuilds and ...
0
votes
1
answer
252
views
multi-boxes Textfield in flutter
How can I create Textfeild with multi input boxes, same like in picture with controller
2
votes
2
answers
420
views
Textformfiled flutter: prefix and suffix not in line with the content
The textformfiled i want
and My textformfield now
I'm trying create a search field like this.(attach this link) but the suffix, prefix icon not align with content
I am also attaching the code that I ...
0
votes
1
answer
72
views
How do I center the posts in the widget I created?
TextField textWidget(String text, IconData icon, bool isPasswordType,
TextEditingController controller, TextAlign align) {
return TextField(
controller: controller,
obscureText: ...
0
votes
2
answers
6k
views
How to edit text field and save in controller?
I have edit form where some data in text fields controller from database but when I edit or change the test of any text field it doesn't change the value of text field give it me same value which ...