text stringlengths 1 372 |
|---|
most animation subclasses take an explicit “parent” |
animation<double>. they are driven by that parent. |
the CurvedAnimation subclass takes an animation<double> class (the |
parent) and a couple of curve classes (the forward and reverse |
curves) as input, and uses the value of the parent as input to the |
curves to determine its output. CurvedAnimation is immutable and |
stateless. |
the ReverseAnimation subclass takes an |
animation<double> class as its parent and reverses |
all the values of the animation. it assumes the parent |
is using a value nominally in the range 0.0-1.0 and returns |
a value in the range 1.0-0.0. the status and direction of the parent |
animation are also reversed. ReverseAnimation is immutable and |
stateless. |
the ProxyAnimation subclass takes an animation<double> class as |
its parent and merely forwards the current state of that parent. |
however, the parent is mutable. |
the TrainHoppingAnimation subclass takes two parents, |
and switches between them when their values cross. |
<topic_end> |
<topic_start> |
animation controllers |
the AnimationController is a stateful |
animation<double> that uses a ticker to give itself life. |
it can be started and stopped. at each tick, it takes the time |
elapsed since it was started and passes it to a simulation to obtain |
a value. that is then the value it reports. if the simulation |
reports that at that time it has ended, then the controller stops |
itself. |
the animation controller can be given a lower and upper bound to |
animate between, and a duration. |
in the simple case (using forward() or reverse()), the animation controller simply does a linear |
interpolation from the lower bound to the upper bound (or vice versa, |
for the reverse direction) over the given duration. |
when using repeat(), the animation controller uses a linear |
interpolation between the given bounds over the given duration, but |
does not stop. |
when using animateTo(), the animation controller does a linear |
interpolation over the given duration from the current value to the |
given target. if no duration is given to the method, the default |
duration of the controller and the range described by the controller’s |
lower bound and upper bound is used to determine the velocity of the |
animation. |
when using fling(), a force is used to create a specific |
simulation which is then used to drive the controller. |
when using animateWith(), the given simulation is used to drive the |
controller. |
these methods all return the future that the ticker provides and |
which will resolve when the controller next stops or changes |
simulation. |
<topic_end> |
<topic_start> |
attaching animatables to animations |
passing an animation<double> (the new parent) to an animatable’s |
animate() method creates a new animation subclass that acts like |
the animatable but is driven from the given parent. |
<topic_end> |
<topic_start> |
accessibility |
ensuring apps are accessible to a broad range of users is an essential |
part of building a high-quality app. applications that are poorly |
designed create barriers to people of all ages. the UN convention on |
the rights of persons with disabilities states the moral and legal |
imperative to ensure universal access to information systems; countries |
around the world enforce accessibility as a requirement; and companies |
recognize the business advantages of maximizing access to their services. |
we strongly encourage you to include an accessibility checklist |
as a key criteria before shipping your app. flutter is committed to |
supporting developers in making their apps more accessible, and includes |
first-class framework support for accessibility in addition to that |
provided by the underlying operating system, including: |
details of these features are discussed below. |
<topic_end> |
<topic_start> |
inspecting accessibility support |
in addition to testing for these specific topics, |
we recommend using automated accessibility scanners: |
<topic_end> |
<topic_start> |
large fonts |
both android and iOS contain system settings to configure the desired font |
sizes used by apps. flutter text widgets respect this OS setting when |
determining font sizes. |
font sizes are calculated automatically by flutter based on the OS setting. |
however, as a developer you should make sure your layout has enough room to |
render all its contents when the font sizes are increased. |
for example, you can test all parts of your app on a small-screen |
device configured to use the largest font setting. |
<topic_end> |
<topic_start> |
example |
the following two screenshots show the standard flutter app |
template rendered with the default iOS font setting, |
and with the largest font setting selected in iOS accessibility settings. |
<topic_end> |
<topic_start> |
screen readers |
for mobile, screen readers (talkback, VoiceOver) |
enable visually impaired users to get spoken feedback about |
the contents of the screen and interact with the UI by using |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.