Skip to content

Commit 8db31a5

Browse files
authored
Divider with subheader example update (flutter#65944)
* Divider with subheader example update * fixed issues * Addressed comments * fixed issues
1 parent 73b6398 commit 8db31a5

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

packages/flutter/lib/src/material/divider.dart

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,27 @@ import 'theme.dart';
4949
/// ),
5050
/// ),
5151
/// const Divider(
52-
/// color: Colors.black,
5352
/// height: 20,
5453
/// thickness: 5,
5554
/// indent: 20,
56-
/// endIndent: 0,
55+
/// endIndent: 20,
56+
/// ),
57+
/// // Subheader example from Material spec.
58+
/// // https://material.io/components/dividers#types
59+
/// Container(
60+
/// padding: const EdgeInsets.only(left: 20),
61+
/// child: Align(
62+
/// alignment: AlignmentDirectional.centerStart,
63+
/// child: Text(
64+
/// 'Subheader',
65+
/// style: Theme.of(context).textTheme.caption,
66+
/// textAlign: TextAlign.start,
67+
/// ),
68+
/// ),
5769
/// ),
5870
/// Expanded(
5971
/// child: Container(
60-
/// color: Colors.blue,
72+
/// color: Theme.of(context).colorScheme.primary,
6173
/// child: const Center(
6274
/// child: Text('Below'),
6375
/// ),

0 commit comments

Comments
 (0)