A Flutter sample app based on the Material study Fortnightly (a hypothetical, online newspaper.) It showcases print-quality, custom typography, Material Theming, and text-heavy UI design and layout.
For info on the Fortnightly Material Study, see: https://material.io/design/material-studies/fortnightly.html
Goals for this sample
- Help you understand how to customize and layout text.
- Provide you with example code for
- A short app bar (the menu button top left.)
- Avatar images
Widgets / APIs
- BoxConstraints on Container
- Theming is passed as a parameter in the constructor of
SafeAreaadds padding around notches and virtual home buttons on screens that have them (like iPhone X+). Here, it protects the
ShortAppBarfrom overlapping with the status bar (time) and makes sure the bottom of the newspaper article has padding beneath it if necessary.
- The entire newspaper article is wrapped in a
SingleChildScrollViewwidget which ensures that the entire article can be viewed no matter what the screen's size or orientation is.
Textwidget with text ' ¬ ' has a
TextStylethat changes one parameter of an inherited
Textwidget with text 'Connor Eghan' has a
TextStylecreated explicitly instead of inheriting from theming.
- You can break up long strings in your source files by putting them on multiple lines.
- Fonts are imported with multiple files expressing their weights (Bold, Light, Medium, Regular)
but are accessed with a
If you have a general question about developing in Flutter, the best places to go are: