1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-11 07:18:15 +00:00

Flutter 3.29 beta (#2571)

This commit is contained in:
Eric Windmill
2025-02-12 18:08:01 -05:00
committed by GitHub
parent d62c784789
commit 719fd72c38
685 changed files with 76244 additions and 53721 deletions

View File

@@ -9,25 +9,37 @@ class TypographyScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
final textTheme = Theme.of(context)
.textTheme
.apply(displayColor: Theme.of(context).colorScheme.onSurface);
final textTheme = Theme.of(
context,
).textTheme.apply(displayColor: Theme.of(context).colorScheme.onSurface);
return Expanded(
child: ListView(
children: <Widget>[
const SizedBox(height: 8),
TextStyleExample(
name: 'Display Large', style: textTheme.displayLarge!),
name: 'Display Large',
style: textTheme.displayLarge!,
),
TextStyleExample(
name: 'Display Medium', style: textTheme.displayMedium!),
name: 'Display Medium',
style: textTheme.displayMedium!,
),
TextStyleExample(
name: 'Display Small', style: textTheme.displaySmall!),
name: 'Display Small',
style: textTheme.displaySmall!,
),
TextStyleExample(
name: 'Headline Large', style: textTheme.headlineLarge!),
name: 'Headline Large',
style: textTheme.headlineLarge!,
),
TextStyleExample(
name: 'Headline Medium', style: textTheme.headlineMedium!),
name: 'Headline Medium',
style: textTheme.headlineMedium!,
),
TextStyleExample(
name: 'Headline Small', style: textTheme.headlineSmall!),
name: 'Headline Small',
style: textTheme.headlineSmall!,
),
TextStyleExample(name: 'Title Large', style: textTheme.titleLarge!),
TextStyleExample(name: 'Title Medium', style: textTheme.titleMedium!),
TextStyleExample(name: 'Title Small', style: textTheme.titleSmall!),
@@ -44,11 +56,7 @@ class TypographyScreen extends StatelessWidget {
}
class TextStyleExample extends StatelessWidget {
const TextStyleExample({
super.key,
required this.name,
required this.style,
});
const TextStyleExample({super.key, required this.name, required this.style});
final String name;
final TextStyle style;