text
stringlengths 1
372
|
|---|
<topic_start>
|
FlexParentData.flex
|
layout explorer supports 7 flex options in the UI
|
(null, 0, 1, 2, 3, 4, 5), but technically the flex
|
factor of a flex widget’s child can be any int.
|
<topic_end>
|
<topic_start>
|
flexible.fit
|
layout explorer supports the two different types of
|
FlexFit: loose and tight.
|
<topic_end>
|
<topic_start>
|
fixed size layouts
|
when you select a fixed size widget that is not a child
|
of a flex widget, fixed size layout information will appear
|
in the layout explorer. you can see size, constraint, and padding
|
information for both the selected widget and its nearest upstream
|
RenderObject.
|
<topic_end>
|
<topic_start>
|
visual debugging
|
the flutter inspector provides several options for visually debugging your app.
|
<topic_end>
|
<topic_start>
|
slow animations
|
when enabled, this option runs animations 5 times slower for easier visual
|
inspection.
|
this can be useful if you want to carefully observe and tweak an animation that
|
doesn’t look quite right.
|
this can also be set in code:
|
<code_start>
|
import 'package:flutter/scheduler.dart';
|
void setSlowAnimations() {
|
timeDilation = 5.0;
|
}
|
<code_end>
|
this slows the animations by 5x.
|
<topic_end>
|
<topic_start>
|
see also
|
the following links provide more info.
|
the following screen recordings show before and after slowing an animation.
|
<topic_end>
|
<topic_start>
|
show guidelines
|
this feature draws guidelines over your app that display render boxes, alignments,
|
paddings, scroll views, clippings and spacers.
|
this tool can be used for better understanding your layout. for instance,
|
by finding unwanted padding or understanding widget alignment.
|
you can also enable this in code:
|
<code_start>
|
import 'package:flutter/rendering.dart';
|
void showLayoutGuidelines() {
|
debugPaintSizeEnabled = true;
|
}
|
<code_end>
|
<topic_end>
|
<topic_start>
|
render boxes
|
widgets that draw to the screen create a render box, the
|
building blocks of flutter layouts. they’re shown with a bright blue border:
|
<topic_end>
|
<topic_start>
|
alignments
|
alignments are shown with yellow arrows. these arrows show the vertical
|
and horizontal offsets of a widget relative to its parent.
|
for example, this button’s icon is shown as being centered by the four arrows:
|
<topic_end>
|
<topic_start>
|
padding
|
padding is shown with a semi-transparent blue background:
|
<topic_end>
|
<topic_start>
|
scroll views
|
widgets with scrolling contents (such as list views) are shown with green arrows:
|
<topic_end>
|
<topic_start>
|
clipping
|
clipping, for example when using the ClipRect widget, are shown
|
with a dashed pink line with a scissors icon:
|
<topic_end>
|
<topic_start>
|
spacers
|
spacer widgets are shown with a grey background,
|
such as this SizedBox without a child:
|
<topic_end>
|
<topic_start>
|
show baselines
|
this option makes all baselines visible.
|
baselines are horizontal lines used to position text.
|
this can be useful for checking whether text is precisely aligned vertically.
|
for example, the text baselines in the following screenshot are slightly misaligned:
|
the baseline widget can be used to adjust baselines.
|
a line is drawn on any render box that has a baseline set;
|
alphabetic baselines are shown as green and ideographic as yellow.
|
you can also enable this in code:
|
<code_start>
|
import 'package:flutter/rendering.dart';
|
void showBaselines() {
|
debugPaintBaselinesEnabled = true;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.