mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 14:58:34 +00:00
* add package:http dependency in dad_jokes * add package:http dependency in filipino_cuisine * don't build package:http demos until flutter/flutter#34858 is resolved * update gallery * update github_dataviz * update particle_background * don't build github_dataviz (uses package:http) * update slide_puzzle * update spinning_square * update timeflow * update vision_challenge * update charts * update dad_jokes * update filipino cuisine * ignore build output * update timeflow and vision_challenge * update slide_puzzle * don't commit build/ directory * move preview.png images to assets * fix path url join * update readme * update web/readme.md
2.1 KiB
2.1 KiB
Fortnightly
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
- Text
- A short app bar (the menu button top left.)
- Avatar images
Widgets / APIs
- BeveledRectangleBorder
- BoxConstraints on Container
- CircleAvatar
- ExactAssetImage
- Fonts
- SafeArea
- Stack
- SingleChildScrollView
- Text
- TextStyle
- TextTheme
Notice
- Theming is passed as a parameter in the constructor of
MaterialApp(theme:). SafeAreaadds padding around notches and virtual home buttons on screens that have them (like iPhone X+). Here, it protects theShortAppBarfrom 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. - The
Textwidget with text ' ¬ ' has aTextStylethat changes one parameter of an inheritedTextStyleusing `.apply()``. - The
Textwidget with text 'Connor Eghan' has aTextStylecreated 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
FontWeightvalue likeFontWeight.w800for Merriweather-Bold.ttf.
Questions/issues
If you have a general question about developing in Flutter, the best places to go are: