Questions tagged [flutter-text]
130 questions
                    
                    308
                    
            votes
                
                11 answers
            
        TextField inside of Row causes layout exception: Unable to calculate size
I’m getting a rendering exception that I don’t understand how to fix. I’m attempting to create a column that has 3 rows. 
Row [Image]
Row [TextField ]
Row [Buttons]
Here is my code to build the container:
Container…
         
    
    
        Matthew Smith
        
- 4,387
- 3
- 15
- 14
                    14
                    
            votes
                
                1 answer
            
        Flutter Web Selectable Text not deselecting when clicking or selecting other widget
I have this problem only when using Flutter Web version. 2.8 and 2.10 , when I tried using Flutter 2.5.3 and other previous version the problem doesn't happen.
Example Widget inside Column:
SelectableText("'Lorem Ipsum is simply dummy…
         
    
    
        Jolzal
        
- 547
- 7
- 19
                    11
                    
            votes
                
                4 answers
            
        Text Overflowing in a Row, Flutter
I'm having issues with the layout because of the long text, I've tried using Expanded / Flexible with the text that is causing the issue to fill the space it needs but it's overflowing. I know the question is asked hundred times, but I don't…
         
    
    
        GrandMagus
        
- 600
- 3
- 12
- 37
                    11
                    
            votes
                
                1 answer
            
        body2 is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. - warning message in flutter
If you update flutter SDK from version v1.12.13 to any version after v1.13.8, you will receive several warning messages related to textTheme usage. For example, one of them given below. 
info: body2 is deprecated and shouldn't be used. This is the…
         
    
    
        Darish
        
- 11,032
- 5
- 50
- 70
                    10
                    
            votes
                
                2 answers
            
        Flutter: Make text/images selectable in whole web app
In the Flutter web apps, there is no default functionality which makes text and images in the app selectable.
Is there a way to enable selection functionality for text/image on web?
I did check SelectableText widget but it is only for text and I…
         
    
    
        Ahmad Khan
        
- 757
- 9
- 22
                    9
                    
            votes
                
                2 answers
            
        Split very long text into pages in Flutter
I have multiple text files with very long text  which I would like to split into pages to make it easier to read and navigate. Here's an example of this:
So given the container size for a page and the text (with specific font style) as input the…
         
    
    
        vovahost
        
- 34,185
- 17
- 113
- 116
                    7
                    
            votes
                
                3 answers
            
        How to set default font color in flutter?
I want to set the default font colour for the flutter app globally. I tried
ThemeData(
    primarySwatch: Colors.blue,
    fontFamily: 'Gilroy',
    textTheme: TextTheme(
      bodyText1: TextStyle(),
      bodyText2: TextStyle(),
    ).apply(
     …
         
    
    
        Natheeshkumar Rangasamy
        
- 687
- 9
- 27
                    4
                    
            votes
                
                2 answers
            
        How to design Flutter textfield Like this
I want to design the flutter text field like this can anyone help me.
 
         
    
    
        Rakesh Shriwas
        
- 611
- 2
- 7
- 15
                    3
                    
            votes
                
                2 answers
            
        SelectableRegion setState selection lost
In the following example I have a SelectableRegion containing a list of text widgets and I call setState() every second. If I remove 'SelectionContainer.disabled' in 'TextWidget' then the selection state survives setState, otherwise it loses the…
         
    
    
        user123
        
- 632
- 1
- 6
- 22
                    3
                    
            votes
                
                1 answer
            
        Flutter - Text Widget does not render currency icons
In my application, I have a screen that shows pricing. However, the currency icon does not appear correctly in some places (look at the amount 7000). This problem is more frequent on iOS devices, with a few occurrences on Android devices.
The…
         
    
    
        Febin Johnson
        
- 277
- 1
- 6
- 21
                    3
                    
            votes
                
                2 answers
            
        Invalid constant value.dart(invalid_constant)
in the bellow code I got the error on " controller: urlController," this line
      var url;
      final urlController = TextEditingController();
    
      @override
      void dispose() {
        urlController.dispose();
        super.dispose();
 …
         
    
    
        Sasitha Dilshan
        
- 111
- 2
- 15
                    3
                    
            votes
                
                2 answers
            
        Flutter: how to build a custom toolbar for Selectable Text~
I'm building a ChatApp, and I need a feature that can allow user to select text from the widget, and also show some of my custom actions, such as Deleting that message, Share etc.
And I found that the SelectableText widget would be helpful, but the…
         
    
    
        Ryan Wang
        
- 418
- 7
- 23
                    3
                    
            votes
                
                2 answers
            
        How do I set letterSpacing for whole app in Flutter?
I am working with Flutter and I know that letterSpacing property is useful to give some spacing between letters.
I want to give it to the whole application, I mean wherever I wrote any text in application. I want to set 1.0 letter spacing to all the…
         
    
    
        Pratik Butani
        
- 60,504
- 58
- 273
- 437
                    2
                    
            votes
                
                1 answer
            
        How to backrgroundColor full in TextSpan on flutter?
Widget richText() {
      return Positioned(
        top: h / 1.9,
        right: w / 4.9,
        child: Material(
          color: Colors.transparent,
          child: Container(
            padding: const EdgeInsets.only(left: 8, right: 0),
    …
         
    
    
        Rian Pratama
        
- 57
- 6
                    2
                    
            votes
                
                1 answer
            
        How to wrap text and image on flutter?
I want make this
Wrap(
   textDirection: TextDirection.rtl,
       children: [
          Text(
            _items[1]['text'],
            softWrap: true,
            textAlign: TextAlign.justify,
            textDirection: TextDirection.rtl,
      …
         
    
    
        Rian Pratama
        
- 57
- 6