mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
![]() * Update project.pbxproj files to say Flutter rather than Chromium Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright. * Update the copyright notice checker to require a standard notice on all files * Update copyrights on Dart files. (This was a mechanical commit.) * Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine. Some were already marked "The Flutter Authors", not clear why. Their dates have been normalized. Some were missing the blank line after the license. Some were randomly different in trivial ways for no apparent reason (e.g. missing the trailing period). * Clean up the copyrights in non-Dart files. (Manual edits.) Also, make sure templates don't have copyrights. * Fix some more ORGANIZATIONNAMEs |
||
---|---|---|
.. | ||
fortnightly.dart | ||
README.md |
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:
). SafeArea
adds padding around notches and virtual home buttons on screens that have them (like iPhone X+). Here, it protects theShortAppBar
from 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
SingleChildScrollView
widget which ensures that the entire article can be viewed no matter what the screen's size or orientation is. - The
Text
widget with text ' ¬ ' has aTextStyle
that changes one parameter of an inheritedTextStyle
using `.apply()``. - The
Text
widget with text 'Connor Eghan' has aTextStyle
created 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
FontWeight
value likeFontWeight.w800
for Merriweather-Bold.ttf.
Questions/issues
If you have a general question about developing in Flutter, the best places to go are: