Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working when i wrap it with Expanded() inside a Row #28

Open
Basher7 opened this issue Aug 6, 2019 · 18 comments
Open

Not working when i wrap it with Expanded() inside a Row #28

Basher7 opened this issue Aug 6, 2019 · 18 comments
Labels
bug Something isn't working

Comments

@Basher7
Copy link

Basher7 commented Aug 6, 2019

Version

  • Flutter version: [1.5.4-hotfix.2]
  • auto_size_text version: [latest]

Code sample

Row(
   mainAxisAlignment: MainAxisAlignment.start,
   children: <Widget>[
        Expanded(
             flex: 1,
             child: Icon(
                 Icons.camera,
                  color: Colors.black,
                ),
             ),
             Expanded(
                 flex: 6,
                 child: Container(
                    padding: EdgeInsets.only(left: 10),
                    child: AutoSizeText(
                      "Product Image",
                      maxLines: 2,
                      style: TextStyle(
                        color: Colors.white,
                        fontWeight: FontWeight.bold,
                      ),
                      minFontSize: 12,
                      maxFontSize: double.infinity,
                      ),
                    ),
                  )
                ],
              ),

I/flutter (11414): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter (11414): The following assertion was thrown during performLayout():
I/flutter (11414): LayoutBuilder does not support returning intrinsic dimensions.
I/flutter (11414): Calculating the intrinsic dimensions would require running the layout callback speculatively, which
I/flutter (11414): might mutate the live render object tree.
I/flutter (11414):
I/flutter (11414): When the exception was thrown, this was the stack:
I/org.webrtc.Logging(11414): EglRenderer: Duration: 4001 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(11414): EglRenderer: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
�[38;5;244mI/flutter (11414): #0 _RenderLayoutBuilder._debugThrowIfNotCheckingIntrinsics.�[39;49m
�[38;5;244mI/flutter (11414): #1 _RenderLayoutBuilder._debugThrowIfNotCheckingIntrinsics�[39;49m
�[38;5;244mI/flutter (11414): #2 _RenderLayoutBuilder.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #3 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #4 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #5 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #6 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #7 RenderPadding.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #8 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #9 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #10 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #11 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #12 RenderFlex.computeMaxIntrinsicWidth.�[39;49m
�[38;5;244mI/flutter (11414): #13 RenderFlex._getIntrinsicSize�[39;49m
�[38;5;244mI/flutter (11414): #14 RenderFlex.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #15 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #16 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #17 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #18 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #19 RenderShiftedBox.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #20 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #21 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #22 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #23 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #24 RenderPadding.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #25 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #26 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #27 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #28 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #29 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #30 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #31 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #32 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #33 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #34 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #35 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #36 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #37 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #38 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #39 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #40 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #41 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #42 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #43 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #44 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #45 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #46 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #47 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #48 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #49 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #50 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #51 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #52 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #53 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #54 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #55 RenderConstrainedBox.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #56 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #57 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #58 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #59 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #60 _RenderInputPadding.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #61 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #62 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #63 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #64 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #65 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #66 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #67 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #68 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #69 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #70 RenderPadding.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #71 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #72 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #73 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #74 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #75 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #76 RenderConstrainedBox.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #77 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #78 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #79 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #80 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #81 RenderFlex.computeMaxIntrinsicWidth.�[39;49m
�[38;5;244mI/flutter (11414): #82 RenderFlex._getIntrinsicSize�[39;49m
�[38;5;244mI/flutter (11414): #83 RenderFlex.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #84 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #85 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #86 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #87 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #88 RenderFlex.computeMaxIntrinsicWidth.�[39;49m
�[38;5;244mI/flutter (11414): #89 RenderFlex._getIntrinsicSize�[39;49m
�[38;5;244mI/flutter (11414): #90 RenderFlex.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #91 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #92 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #93 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #94 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #95 _RenderSingleChildViewport.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #96 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #97 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #98 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #99 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #100 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #101 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #102 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #103 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #104 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #105 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #106 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #107 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #108 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #109 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #110 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #111 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #112 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #113 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #114 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #115 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #116 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #117 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #118 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #119 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #120 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #121 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #122 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #123 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #124 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #125 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #126 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #127 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #128 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #129 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #130 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #131 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #132 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #133 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #134 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #135 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #136 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #137 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #138 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #139 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #140 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #141 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #142 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #143 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #144 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #145 RenderPadding.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #146 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #147 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #148 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #149 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #150 RenderFlex.computeMaxIntrinsicWidth.�[39;49m
�[38;5;244mI/flutter (11414): #151 RenderFlex._getIntrinsicSize�[39;49m
�[38;5;244mI/flutter (11414): #152 RenderFlex.computeMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #153 RenderBox._computeIntrinsicDimension.�[39;49m
�[38;5;244mI/flutter (11414): #154 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)�[39;49m
�[38;5;244mI/flutter (11414): #155 RenderBox._computeIntrinsicDimension�[39;49m
�[38;5;244mI/flutter (11414): #156 RenderBox.getMaxIntrinsicWidth�[39;49m
�[38;5;244mI/flutter (11414): #157 RenderIntrinsicWidth.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #158 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #159 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #160 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #161 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #162 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #163 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #164 _RenderCustomClip.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #165 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #166 RenderConstrainedBox.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #167 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #168 RenderPositionedBox.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #169 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #170 RenderPadding.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #171 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #172 RenderPadding.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #173 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #174 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #175 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #176 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #177 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #178 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #179 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #180 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #181 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #182 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #183 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #184 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #185 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #186 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #187 RenderOffstage.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #188 RenderObject.layout�[39;49m
�[38;5;244mI/flutter (11414): #189 RenderStack.performLayout�[39;49m
�[38;5;244mI/flutter (11414): #190 RenderObject._layoutWithoutResize�[39;49m
�[38;5;244mI/flutter (11414): #191 PipelineOwner.flushLayout�[39;49m
�[38;5;244mI/flutter (11414): #192 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding.drawFrame�[39;49m
�[38;5;244mI/flutter (11414): #193 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame�[39;49m
�[38;5;244mI/flutter (11414): #194 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback�[39;49m
�[38;5;244mI/flutter (11414): #195 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback�[39;49m
�[38;5;244mI/flutter (11414): #196 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame�[39;49m
�[38;5;244mI/flutter (11414): #197 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame�[39;49m
�[38;5;244mI/flutter (11414): #201 _invoke (dart:ui/hooks.dart:219:10)�[39;49m
�[38;5;244mI/flutter (11414): #202 _drawFrame (dart:ui/hooks.dart:178:3)�[39;49m
I/flutter (11414): (elided 3 frames from package dart:async)
I/flutter (11414):
I/flutter (11414): The following RenderObject was being processed when the exception was fired:
I/flutter (11414): RenderIntrinsicWidth#e6f5b relayoutBoundary=up5 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): creator: IntrinsicWidth ← DefaultTextStyle ← AnimatedDefaultTextStyle ←
I/flutter (11414): _InkFeatures-[GlobalKey#759c7 ink renderer] ← NotificationListener ←
I/flutter (11414): CustomPaint ← _ShapeBorderPaint ← PhysicalShape ← _MaterialInterior ← Material ← ConstrainedBox ←
I/flutter (11414): Center ← ⋯
I/flutter (11414): parentData: (can use size)
I/flutter (11414): constraints: BoxConstraints(280.0<=w<=453.3, 0.0<=h<=743.3)
I/flutter (11414): size: MISSING
I/flutter (11414): stepWidth: null
I/flutter (11414): stepHeight: null
I/flutter (11414): This RenderObject had the following descendants (showing up to depth 5):
I/flutter (11414): RenderFlex#c077d NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderPadding#97390 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderSemanticsAnnotations#c1d20 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderFlex#e223e NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderParagraph#05686 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderConstrainedBox#a5fbb NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderPadding#2b5ee NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderRepaintBoundary#8a521 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderCustomPaint#1778d NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderRepaintBoundary#cfec9 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderPadding#ffc6c NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderFlex#dcdfd NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderPadding#354dc NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderSemanticsAnnotations#736aa NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderPadding#a4cb0 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): RenderSemanticsAnnotations#88516 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderIntrinsicWidth#e6f5b relayoutBoundary=up5 NEEDS-PAINT
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: _RenderInkFeatures#408dd relayoutBoundary=up4 NEEDS-PAINT
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderCustomPaint#d0cac relayoutBoundary=up3 NEEDS-PAINT
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderPhysicalShape#1f231 relayoutBoundary=up2 NEEDS-PAINT
I/flutter (11414): Another exception was thrown: 'package:flutter/src/rendering/shifted_box.dart': Failed assertion: line 314 pos 12: 'child.hasSize': is not true.
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderLeaderLayer#f741d NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderLeaderLayer#6a6ce NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderLeaderLayer#c1f2a NEEDS-LAYOUT NEEDS-PAINT
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderPhysicalShape#1f231 relayoutBoundary=up2
I/flutter (11414): Another exception was thrown: LayoutBuilder does not support returning intrinsic dimensions.
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderIntrinsicWidth#e6f5b relayoutBoundary=up5 NEEDS-PAINT
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: _RenderInkFeatures#408dd relayoutBoundary=up4 NEEDS-PAINT
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderCustomPaint#d0cac relayoutBoundary=up3 NEEDS-PAINT
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderPhysicalShape#1f231 relayoutBoundary=up2 NEEDS-PAINT
I/flutter (11414): Another exception was thrown: 'package:flutter/src/rendering/shifted_box.dart': Failed assertion: line 314 pos 12: 'child.hasSize': is not true.
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderPhysicalShape#1f231 relayoutBoundary=up2
I/flutter (11414): Another exception was thrown: LayoutBuilder does not support returning intrinsic dimensions.
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderIntrinsicWidth#e6f5b relayoutBoundary=up5 NEEDS-PAINT
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: _RenderInkFeatures#408dd relayoutBoundary=up4 NEEDS-PAINT
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderCustomPaint#d0cac relayoutBoundary=up3 NEEDS-PAINT
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderPhysicalShape#1f231 relayoutBoundary=up2 NEEDS-PAINT
I/flutter (11414): Another exception was thrown: 'package:flutter/src/rendering/shifted_box.dart': Failed assertion: line 314 pos 12: 'child.hasSize': is not true.
I/flutter (11414): Another exception was thrown: RenderBox was not laid out: RenderPhysicalShape#1f231 relayoutBoundary=up2
Application finished.
Exited (sigterm)

@Basher7 Basher7 added the bug Something isn't working label Aug 6, 2019
@Ahmadre
Copy link

Ahmadre commented Aug 9, 2019

Did you try FittedBox ?

Sent from my Pixel 2 XL using FastHub

@simc
Copy link
Owner

simc commented Aug 13, 2019

Your code works fine for me. Could you please share a small sample project which shows the error?

@Basher7
Copy link
Author

Basher7 commented Aug 15, 2019

Did you try FittedBox ?

Sent from my Pixel 2 XL using FastHub

yes, not working FittedBox

@Basher7
Copy link
Author

Basher7 commented Aug 17, 2019

Your code works fine for me. Could you please share a small sample project which shows the error?

After Upgrade Flutter sdk version from 1.5.4-hotfix.2 to 1.7.8+hotfix.4 it's working fine for small android devices. But large android device (ex: TAB) it's not working.

Sample Project

import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.green,
        buttonColor: Colors.green,
        backgroundColor: Colors.green[300],
      ),
      debugShowCheckedModeBanner: false,
      home: MyHomePage(title: 'Flutter Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  BuildContext _context;
  double mainWidth = 0.0;
  double mainHeight = 0.0;
  bool smallDevice = false;

  TextEditingController inputCtrlr = new TextEditingController();

  @override
  void initState() {
    super.initState();
  }

  _addnewProduct() {
    showDialog(
        context: _context,
        barrierDismissible: false,
        builder: (_) => new AlertDialog(
              title: Column(
                children: <Widget>[
                  new Text("New Product"),
                  Divider(),
                ],
              ),
              content: Row(
                mainAxisAlignment: MainAxisAlignment.start,
                children: <Widget>[
                  Expanded(
                    flex: 2,
                    child: TextFormField(
                      autofocus: true,
                      controller: inputCtrlr,
                      keyboardType: TextInputType.number,
                      decoration: InputDecoration(labelText: "Quantity *"),
                    ),
                  ),
                  Expanded(
                    flex: 2,
                    child: Container(
                      height: 45,
                      padding: EdgeInsets.only(left: 10),
                      child: _takeImageBtn("Product Image"),
                    ),
                  )
                ],
              ),
              actions: <Widget>[
                FlatButton(
                    child: const Text('Done'),
                    onPressed: () {
                      Navigator.pop(context);
                    }),
              ],
            ));
  }

  Widget _takeImageBtn(String title) {
    return RaisedButton(
      padding: EdgeInsets.only(left: 5),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.start,
        children: <Widget>[
          Expanded(
            flex: 1,
            child: Icon(
              Icons.camera,
              color: Colors.black,
              size: smallDevice ? 18 : 23,
            ),
          ),
          Expanded(
            flex: 6,
            child: Container(
              padding: EdgeInsets.only(left: 10),
              child: AutoSizeText(
                title,
                softWrap: true,
                style: TextStyle(
                  color: Colors.white,
                  fontWeight: FontWeight.bold,
                ),
                maxLines: 2,
                overflow: TextOverflow.clip,
                minFontSize: 10,
                maxFontSize: double.infinity,
              ),
            ),
          )
        ],
      ),
      onPressed: () {
        print("Working fine...");
      },
    );
  }

  @override
  Widget build(BuildContext context) {
    _context = context;
    mainWidth = MediaQuery.of(_context).size.width;
    mainHeight = MediaQuery.of(_context).size.height;
    smallDevice = mainWidth < 450 ? true : false;
    return Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
        ),
        body: SafeArea(
          top: false,
          bottom: false,
          child: SingleChildScrollView(
              physics: NeverScrollableScrollPhysics(),
              child: Center(
                child: RaisedButton(
                  child: AutoSizeText(
                    "Details",
                    softWrap: true,
                    style: TextStyle(
                      color: Colors.white,
                      fontWeight: FontWeight.bold,
                    ),
                    maxLines: 1,
                    overflow: TextOverflow.clip,
                    minFontSize: 12,
                    maxFontSize: double.infinity,
                  ),
                  onPressed: _addnewProduct,
                ),
              )),
        ));
  }
}

@leisim

Thanks in advance

@narcodico
Copy link

This is an actual issue. If maxFontSize is properly set it will work fine. But that defeats the purpose of the AutoSizeText being able to adjust based on available space. At the moment AutoSizeText inside an Expanded placed in a Row will overflow, unless a proper maxFontSize is set. Any plans on fixing this @leisim ?

@simc
Copy link
Owner

simc commented Sep 15, 2019

@RollyPeres

Thanks for verifying. I'm going to fix it.

@PixsaOJ
Copy link

PixsaOJ commented Feb 10, 2020

Is this fixed ? what should I do? I have Expanded>Column>Flatbutton and trying to do label: AutoSizeText() . I added maxFontSize but still not working.

@tudor07
Copy link

tudor07 commented Jun 19, 2020

Still happening, any updates?

@tudor07
Copy link

tudor07 commented Jun 19, 2020

For me I had to specify minFontSize to make it work

@Bryanx
Copy link

Bryanx commented Aug 23, 2020

You can wrap AutoSizeText in a ConstrainedBox and give it a max width.

@RosilBelli
Copy link

It is still happening here with me. I'm on Flutter beta 1.21.

@rohan20
Copy link

rohan20 commented Jul 16, 2021

I wrapped the Row inside a SizedBox and gave it a width of double.maxFinite to make it work:

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: double.maxFinite,
      child: Row(
        mainAxisSize: isSmall ? MainAxisSize.min : MainAxisSize.max,
        children: [
          ...
          SizedBox(width: 16),
          Expanded(
            flex: isSmall ? 0 : 1,
            child: AutoSizeText(text, maxLines: 1, textAlign: TextAlign.center),
          ),
          SizedBox(width: 16),
          ...,
        ],
      ),
    );

@maares
Copy link

maares commented Aug 19, 2021

Hi everyone, has someone come across with an alternative to resize the text?. @Basher7, as it seems this issue is live for a very long time.

thanks in advance

@PixsaOJ
Copy link

PixsaOJ commented Aug 19, 2021

I probably stopped using Flutter because of this

@ventr1x
Copy link

ventr1x commented Jan 11, 2022

Sadly this plugin is massively bugged. using it 5 minutes I found 3 major bugs.

  • any fractions in minFontSize/maxFontSize causes my layout to explode. rounding it to double "works"
  • wrapWords does NOT work reliably, one of two examples instantly did not wrap the words (especially long one word texts seem to get ignored entirely while they should be overflowed)
  • There are multiple math issues with minFontSize/MaxFontSize, e.g. the widget basically craps out when min is higher (shouldn't happen but shows how extremely unreliable and untested this is)

Most of the reported issues can be fixed with LayoutBuilder around the widget to get the constraints. Any kind of flex layout and this will become like russian roulette.

This is very far from production ready and also seem to be abadonded on top of it. I suggest visiting a school for simple math education first before publishing widgets.

@simc
Copy link
Owner

simc commented Jan 11, 2022

@ventr1x This is an open source package. Please read the licence if you don't know what that means. And instead of writing snarky comments how about you open a PR to fix issues you discovered.

Also, the package has not been abandoned and there is a massive rewrite that fixes the flex issue and many more.

Edit: Maybe you also find the Flutter Code of Conduct helpful.

@danielrrys
Copy link

Does anyone know when the new version will be released to fix this bug ? Thank you. 😁

@Ahmadre
Copy link

Ahmadre commented Feb 10, 2024

Sadly this plugin is massively bugged. using it 5 minutes I found 3 major bugs.

  • any fractions in minFontSize/maxFontSize causes my layout to explode. rounding it to double "works"

  • wrapWords does NOT work reliably, one of two examples instantly did not wrap the words (especially long one word texts seem to get ignored entirely while they should be overflowed)

  • There are multiple math issues with minFontSize/MaxFontSize, e.g. the widget basically craps out when min is higher (shouldn't happen but shows how extremely unreliable and untested this is)

Most of the reported issues can be fixed with LayoutBuilder around the widget to get the constraints. Any kind of flex layout and this will become like russian roulette.

This is very far from production ready and also seem to be abadonded on top of it. I suggest visiting a school for simple math education first before publishing widgets.

Reported!

Github is not a place to talk like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests