Unverified Commit 70dfe01a authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Sample code for Icon class (#27968)

* Added sample code for a simple Icon, ref: #21136

* Removed duplicate line.

* Fixed incoreect parameter.

* Update icon.dart

Removed empty prose and added better context for sample code. Changed sample code for better visibility in execution of default app themes.

* Alas, Trailing space.

Nixed trailing space in comments.
parent a4de06ad
......@@ -21,6 +21,20 @@ import 'icon_theme_data.dart';
/// Typically this is introduced automatically by the [WidgetsApp] or
/// [MaterialApp].
///
/// {@tool sample}
///
/// This example shows how to use [Icon] to create an addition icon, in the
/// color pink, and 30 pixels in size.
///
/// ```dart
/// Icon(
/// Icons.add,
/// color: Colors.pink,
/// size: 30.0,
/// )
/// ```
/// {@end-tool}
///
/// See also:
///
/// * [IconButton], for interactive icons.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment