mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
* Update `simplistic_editor` for Flutter 3.4 beta * Re-enable beta and master CI * Disable on master * Added sample code for using plugins and channels from background isolates. * goderbauer feedback 1 * goderbauer feedback2 * goderbauer feedback 3 * Add `background_isolate_channels` to CI * Enable beta CI * Enable all `stable` CI projects * `dart fix --apply` * `print` -> `denugPrint` * Make deps min version not pinned * Drop `_isDebug` * Remove unused import * `dart format` * Fixup `linting_tool` * Fixup `form_app` * Enable all `master` CI * Basic fixes * Patch `simplistic_editor` * Fix nl at eol * Comment out `simplistic_editor` * Incorporating @bleroux's latest changes * Clean up CI scripts * Copy `experimental/material_3_demo` to top level * Update `game_template` * Update `animations` * Update `desktop_photo_search` * Update `flutter_maps_firestore` * Update `form_app` * Update `infinite_list` * Update `isolate_example` * Update `jsonexample` * Update `navigation_and_routing` * Update `place_tracker` * Update `platform_channels` * Update `platform_design` * Update `provider_shopper` * Fixup `context_menus` * `dart format` * Update the main `material_3_demo` * Make `tool/flutter_ci_script_stable.sh` executable again Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com> Co-authored-by: Aaron Clarke <aaclarke@google.com>
64 lines
2.2 KiB
Dart
64 lines
2.2 KiB
Dart
// Copyright 2021 The Flutter team. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
class TypographyScreen extends StatelessWidget {
|
|
const TypographyScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final textTheme = Theme.of(context)
|
|
.textTheme
|
|
.apply(displayColor: Theme.of(context).colorScheme.onSurface);
|
|
return Expanded(
|
|
child: ListView(
|
|
children: <Widget>[
|
|
const SizedBox(height: 7),
|
|
TextStyleExample(
|
|
name: 'Display Large', style: textTheme.displayLarge!),
|
|
TextStyleExample(
|
|
name: 'Display Medium', style: textTheme.displayMedium!),
|
|
TextStyleExample(
|
|
name: 'Display Small', style: textTheme.displaySmall!),
|
|
TextStyleExample(
|
|
name: 'Headline Large', style: textTheme.headlineLarge!),
|
|
TextStyleExample(
|
|
name: 'Headline Medium', style: textTheme.headlineMedium!),
|
|
TextStyleExample(
|
|
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!),
|
|
TextStyleExample(name: 'Label Large', style: textTheme.labelLarge!),
|
|
TextStyleExample(name: 'Label Medium', style: textTheme.labelMedium!),
|
|
TextStyleExample(name: 'Label Small', style: textTheme.labelSmall!),
|
|
TextStyleExample(name: 'Body Large', style: textTheme.bodyLarge!),
|
|
TextStyleExample(name: 'Body Medium', style: textTheme.bodyMedium!),
|
|
TextStyleExample(name: 'Body Small', style: textTheme.bodySmall!),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class TextStyleExample extends StatelessWidget {
|
|
const TextStyleExample({
|
|
super.key,
|
|
required this.name,
|
|
required this.style,
|
|
});
|
|
|
|
final String name;
|
|
final TextStyle style;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.all(8.0),
|
|
child: Text(name, style: style),
|
|
);
|
|
}
|
|
}
|