mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Update for Material changes & run rebuild scripts (#1412)
This commit is contained in:
@@ -46,7 +46,7 @@ class _HomePageState extends State<HomePage> {
|
||||
? const SizedBox.shrink()
|
||||
: Text(
|
||||
'Battery Level: $batteryLevel',
|
||||
style: Theme.of(context).textTheme.headline5,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
ElevatedButton(
|
||||
|
||||
@@ -35,8 +35,8 @@ class DefaultRulesPage extends StatelessWidget {
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
profile.name,
|
||||
style: textTheme.subtitle2!.copyWith(
|
||||
color: textTheme.bodyText1!.color,
|
||||
style: textTheme.titleSmall!.copyWith(
|
||||
color: textTheme.bodyLarge!.color,
|
||||
),
|
||||
),
|
||||
leading: Padding(
|
||||
|
||||
@@ -41,8 +41,8 @@ class RulesPage extends StatelessWidget {
|
||||
.read<ProfilesStore>()
|
||||
.savedProfiles[selectedProfileIndex]
|
||||
.name,
|
||||
style: textTheme.subtitle2!.copyWith(
|
||||
color: textTheme.bodyText1!.color,
|
||||
style: textTheme.titleSmall!.copyWith(
|
||||
color: textTheme.bodyLarge!.color,
|
||||
),
|
||||
),
|
||||
leading: Padding(
|
||||
|
||||
@@ -22,14 +22,14 @@ abstract class AppTheme {
|
||||
color: AppColors.orange500,
|
||||
),
|
||||
selectedLabelTextStyle:
|
||||
GoogleFonts.workSansTextTheme().headline5!.copyWith(
|
||||
GoogleFonts.workSansTextTheme().headlineSmall!.copyWith(
|
||||
color: AppColors.orange500,
|
||||
),
|
||||
unselectedIconTheme: const IconThemeData(
|
||||
color: AppColors.blue200,
|
||||
),
|
||||
unselectedLabelTextStyle:
|
||||
GoogleFonts.workSansTextTheme().headline5!.copyWith(
|
||||
GoogleFonts.workSansTextTheme().headlineSmall!.copyWith(
|
||||
color: AppColors.blue200,
|
||||
),
|
||||
),
|
||||
@@ -62,14 +62,14 @@ abstract class AppTheme {
|
||||
color: AppColors.orange300,
|
||||
),
|
||||
selectedLabelTextStyle:
|
||||
GoogleFonts.workSansTextTheme().headline5!.copyWith(
|
||||
GoogleFonts.workSansTextTheme().headlineSmall!.copyWith(
|
||||
color: AppColors.orange300,
|
||||
),
|
||||
unselectedIconTheme: const IconThemeData(
|
||||
color: AppColors.greyLabel,
|
||||
),
|
||||
unselectedLabelTextStyle:
|
||||
GoogleFonts.workSansTextTheme().headline5!.copyWith(
|
||||
GoogleFonts.workSansTextTheme().headlineSmall!.copyWith(
|
||||
color: AppColors.greyLabel,
|
||||
),
|
||||
),
|
||||
@@ -109,56 +109,56 @@ abstract class AppTheme {
|
||||
secondarySelectedColor: chipBackground,
|
||||
padding: const EdgeInsets.all(4),
|
||||
shape: const StadiumBorder(),
|
||||
labelStyle: GoogleFonts.workSansTextTheme().bodyText2!.copyWith(
|
||||
labelStyle: GoogleFonts.workSansTextTheme().bodyMedium!.copyWith(
|
||||
color: brightness == Brightness.dark
|
||||
? AppColors.white50
|
||||
: AppColors.black900,
|
||||
),
|
||||
secondaryLabelStyle: GoogleFonts.workSansTextTheme().bodyText2!,
|
||||
secondaryLabelStyle: GoogleFonts.workSansTextTheme().bodyMedium!,
|
||||
brightness: brightness,
|
||||
);
|
||||
}
|
||||
|
||||
static TextTheme _buildReplyLightTextTheme(TextTheme base) {
|
||||
return base.copyWith(
|
||||
headline4: GoogleFonts.workSans(
|
||||
headlineMedium: GoogleFonts.workSans(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 34,
|
||||
letterSpacing: 0.4,
|
||||
height: 0.9,
|
||||
color: AppColors.black900,
|
||||
),
|
||||
headline5: GoogleFonts.workSans(
|
||||
headlineSmall: GoogleFonts.workSans(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 24,
|
||||
letterSpacing: 0.27,
|
||||
color: AppColors.black900,
|
||||
),
|
||||
headline6: GoogleFonts.workSans(
|
||||
titleLarge: GoogleFonts.workSans(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 20,
|
||||
letterSpacing: 0.18,
|
||||
color: AppColors.black900,
|
||||
),
|
||||
subtitle2: GoogleFonts.workSans(
|
||||
titleSmall: GoogleFonts.workSans(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14,
|
||||
letterSpacing: -0.04,
|
||||
color: AppColors.black900,
|
||||
),
|
||||
bodyText1: GoogleFonts.workSans(
|
||||
bodyLarge: GoogleFonts.workSans(
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 18,
|
||||
letterSpacing: 0.2,
|
||||
color: AppColors.black900,
|
||||
),
|
||||
bodyText2: GoogleFonts.workSans(
|
||||
bodyMedium: GoogleFonts.workSans(
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 14,
|
||||
letterSpacing: -0.05,
|
||||
color: AppColors.black900,
|
||||
),
|
||||
caption: GoogleFonts.workSans(
|
||||
bodySmall: GoogleFonts.workSans(
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 12,
|
||||
letterSpacing: 0.2,
|
||||
@@ -169,44 +169,44 @@ abstract class AppTheme {
|
||||
|
||||
static TextTheme _buildReplyDarkTextTheme(TextTheme base) {
|
||||
return base.copyWith(
|
||||
headline4: GoogleFonts.workSans(
|
||||
headlineMedium: GoogleFonts.workSans(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 34,
|
||||
letterSpacing: 0.4,
|
||||
height: 0.9,
|
||||
color: AppColors.white50,
|
||||
),
|
||||
headline5: GoogleFonts.workSans(
|
||||
headlineSmall: GoogleFonts.workSans(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 24,
|
||||
letterSpacing: 0.27,
|
||||
color: AppColors.white50,
|
||||
),
|
||||
headline6: GoogleFonts.workSans(
|
||||
titleLarge: GoogleFonts.workSans(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 20,
|
||||
letterSpacing: 0.18,
|
||||
color: AppColors.white50,
|
||||
),
|
||||
subtitle2: GoogleFonts.workSans(
|
||||
titleSmall: GoogleFonts.workSans(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14,
|
||||
letterSpacing: -0.04,
|
||||
color: AppColors.white50,
|
||||
),
|
||||
bodyText1: GoogleFonts.workSans(
|
||||
bodyLarge: GoogleFonts.workSans(
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 18,
|
||||
letterSpacing: 0.2,
|
||||
color: AppColors.white50,
|
||||
),
|
||||
bodyText2: GoogleFonts.workSans(
|
||||
bodyMedium: GoogleFonts.workSans(
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 14,
|
||||
letterSpacing: -0.05,
|
||||
color: AppColors.white50,
|
||||
),
|
||||
caption: GoogleFonts.workSans(
|
||||
bodySmall: GoogleFonts.workSans(
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 12,
|
||||
letterSpacing: 0.2,
|
||||
@@ -218,8 +218,8 @@ abstract class AppTheme {
|
||||
static MarkdownStyleSheet buildMarkDownTheme(ThemeData theme) {
|
||||
final textTheme = theme.textTheme;
|
||||
return MarkdownStyleSheet.largeFromTheme(theme).copyWith(
|
||||
strong: textTheme.subtitle2!,
|
||||
em: textTheme.bodyText2!.copyWith(
|
||||
strong: textTheme.titleSmall!,
|
||||
em: textTheme.bodyMedium!.copyWith(
|
||||
fontWeight: FontWeight.w900,
|
||||
fontStyle: FontStyle.italic,
|
||||
),
|
||||
|
||||
@@ -96,8 +96,8 @@ class _NavViewState extends State<_NavView> {
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
'Flutter Linting Tool',
|
||||
style: textTheme.subtitle2!.copyWith(
|
||||
color: textTheme.bodyText1!.color,
|
||||
style: textTheme.titleSmall!.copyWith(
|
||||
color: textTheme.bodyLarge!.color,
|
||||
),
|
||||
),
|
||||
toolbarHeight: 38.0,
|
||||
@@ -218,7 +218,7 @@ class _NavigationRailHeader extends StatelessWidget {
|
||||
opacity: animation.value,
|
||||
child: Text(
|
||||
'Linting Tool',
|
||||
style: textTheme.bodyText1!.copyWith(
|
||||
style: textTheme.bodyLarge!.copyWith(
|
||||
color: AppColors.white50,
|
||||
),
|
||||
),
|
||||
@@ -298,7 +298,7 @@ class _NavigationRailTrailingSection extends StatelessWidget {
|
||||
const SizedBox(width: 24),
|
||||
Text(
|
||||
item,
|
||||
style: textTheme.bodyText1!.copyWith(
|
||||
style: textTheme.bodyLarge!.copyWith(
|
||||
color: navigationRailTheme
|
||||
.unselectedLabelTextStyle!.color,
|
||||
),
|
||||
|
||||
@@ -38,13 +38,13 @@ class _LintExpansionTileState extends State<LintExpansionTile> {
|
||||
collapsedBackgroundColor: AppColors.white50,
|
||||
title: Text(
|
||||
rule.name,
|
||||
style: textTheme.subtitle1!.copyWith(
|
||||
style: textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
rule.description,
|
||||
style: textTheme.caption!,
|
||||
style: textTheme.bodySmall!,
|
||||
),
|
||||
initiallyExpanded: isExpanded,
|
||||
onExpansionChanged: (value) {
|
||||
@@ -66,7 +66,7 @@ class _LintExpansionTileState extends State<LintExpansionTile> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Group:',
|
||||
style: textTheme.subtitle2,
|
||||
style: textTheme.titleSmall,
|
||||
),
|
||||
TextSpan(
|
||||
text: ' ${rule.group}',
|
||||
@@ -80,7 +80,7 @@ class _LintExpansionTileState extends State<LintExpansionTile> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Maturity:',
|
||||
style: textTheme.subtitle2,
|
||||
style: textTheme.titleSmall,
|
||||
),
|
||||
TextSpan(
|
||||
text: ' ${rule.maturity}',
|
||||
@@ -94,7 +94,7 @@ class _LintExpansionTileState extends State<LintExpansionTile> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Incompatible:',
|
||||
style: textTheme.subtitle2,
|
||||
style: textTheme.titleSmall,
|
||||
),
|
||||
TextSpan(
|
||||
text: ' $incompatibleString',
|
||||
@@ -108,7 +108,7 @@ class _LintExpansionTileState extends State<LintExpansionTile> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Sets:',
|
||||
style: textTheme.subtitle2,
|
||||
style: textTheme.titleSmall,
|
||||
),
|
||||
TextSpan(
|
||||
text: ' $setsString',
|
||||
|
||||
@@ -60,13 +60,13 @@ class _SavedRuleTileState extends State<SavedRuleTile> {
|
||||
: null,
|
||||
title: Text(
|
||||
rule.name,
|
||||
style: textTheme.subtitle1!.copyWith(
|
||||
style: textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
rule.description,
|
||||
style: textTheme.caption!,
|
||||
style: textTheme.bodySmall!,
|
||||
),
|
||||
initiallyExpanded: isExpanded,
|
||||
onExpansionChanged: (value) {
|
||||
@@ -88,7 +88,7 @@ class _SavedRuleTileState extends State<SavedRuleTile> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Group:',
|
||||
style: textTheme.subtitle2,
|
||||
style: textTheme.titleSmall,
|
||||
),
|
||||
TextSpan(
|
||||
text: ' ${rule.group}',
|
||||
@@ -102,7 +102,7 @@ class _SavedRuleTileState extends State<SavedRuleTile> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Maturity:',
|
||||
style: textTheme.subtitle2,
|
||||
style: textTheme.titleSmall,
|
||||
),
|
||||
TextSpan(
|
||||
text: ' ${rule.maturity}',
|
||||
@@ -116,7 +116,7 @@ class _SavedRuleTileState extends State<SavedRuleTile> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Incompatible:',
|
||||
style: textTheme.subtitle2,
|
||||
style: textTheme.titleSmall,
|
||||
),
|
||||
TextSpan(
|
||||
text: ' $incompatibleString',
|
||||
@@ -130,7 +130,7 @@ class _SavedRuleTileState extends State<SavedRuleTile> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Sets:',
|
||||
style: textTheme.subtitle2,
|
||||
style: textTheme.titleSmall,
|
||||
),
|
||||
TextSpan(
|
||||
text: ' $setsString',
|
||||
|
||||
Reference in New Issue
Block a user