text stringlengths 1 372 |
|---|
code before migration: |
code after migration: |
<topic_end> |
<topic_start> |
components |
some components couldn’t merely be updated to match the material 3 design spec |
but needed a whole new implementation. such components require manual migration |
since the flutter SDK doesn’t know what, exactly, you want. |
replace the material 2 style BottomNavigationBar widget with the new |
NavigationBar widget. it’s slightly taller, contains pill-shaped |
navigation indicators, and uses new color mappings. |
code before migration: |
code after migration: |
check out the complete sample on |
migrating from BottomNavigationBar to NavigationBar. |
replace the drawer widget with NavigationDrawer, which provides |
pill-shaped navigation indicators, rounded corners, and new color mappings. |
code before migration: |
code after migration: |
check out the complete sample on migrating from drawer to NavigationDrawer. |
material 3 introduces medium and large app bars that display a larger headline |
before scrolling. instead of a drop shadow, ColorScheme.surfaceTint color |
is used create a separation from the content when scrolling. |
the following code demonstrates how to implement the medium app bar: |
there are now two types of TabBar widgets: primary and secondary. |
secondary tabs are used within a content area to further separate |
related content and establish hierarchy. check out the TabBar.secondary |
example. |
the new TabBar.tabAlignment property specifies the horizontal alignment |
of the tabs. |
the following sample shows how to modify tab alignment in a scrollable TabBar: |
SegmentedButton, an updated version of ToggleButtons, |
uses fully rounded corners, differs in layout height and |
size, and uses a dart set to determine selected items. |
code before migration: |
code after migration: |
check out the complete sample on |
migrating from ToggleButtons to SegmentedButton. |
<topic_end> |
<topic_start> |
new components |
<topic_end> |
<topic_start> |
timeline |
in stable release: 3.16 |
<topic_end> |
<topic_start> |
references |
documentation: |
API documentation: |
relevant issues: |
relevant PRs: |
<topic_end> |
<topic_start> |
text |
<topic_end> |
<topic_start> |
topics |
<topic_end> |
<topic_start> |
flutter's fonts and typography |
typography covers the style and appearance of |
type or fonts: it specifies how heavy the font is, |
the slant of the font, the spacing between |
the letters, and other visual aspects of the text. |
all fonts are not created the same. fonts are a huge |
topic and beyond the scope of this site, however, |
this page discusses flutter’s support for variable |
and static fonts. |
<topic_end> |
<topic_start> |
variable fonts |
variable fonts (also called OpenType fonts), |
allow you to control pre-defined aspects of text styling. |
variable fonts support specific axes, such as width, |
weight, slant (to name a few). |
the user can select any value along the continuous axis |
when specifying the type. |
however, the font must first define what axes are available, |
and that isn’t always easy to figure out. if you are using |
a google font, you can learn what axes are available using |
the type tester feature, described in the next section. |
<topic_end> |
<topic_start> |
using the google fonts type tester |
the google fonts site offers both variable and static fonts. |
use the type tester to learn more about its variable fonts. |
in real time, move the slider on any of the axes to |
see how it affects the font. when programming a variable font, |
use the FontVariation class to modify the font’s design axes. |
the FontVariation class conforms to the |
OpenType font variables spec. |
<topic_end> |
<topic_start> |
static fonts |
google fonts also contains static fonts. as with variable fonts, |
you need to know how the font is designed to know what options |
are available to you. |
once again, the google fonts site can help. |
<topic_end> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.