forked from firka/flutter
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user