Add examples to documentation of TimeOfDay class. (#23452)

diff --git a/packages/flutter/lib/src/material/time.dart b/packages/flutter/lib/src/material/time.dart
index 2dbf8f8..e3ffdfb 100644
--- a/packages/flutter/lib/src/material/time.dart
+++ b/packages/flutter/lib/src/material/time.dart
@@ -19,7 +19,20 @@
 /// A value representing a time during the day, independent of the date that
 /// day might fall on or the time zone.
 ///
-/// The time is represented by [hour] and [minute] pair.
+/// The time is represented by [hour] and [minute] pair. Once created, both
+/// values cannot be changed.
+///
+/// You can create TimeOfDay using the constructor which requires both hour and
+/// minute or using [DateTime] object.
+/// Hours are specified between 0 and 23, as in a 24-hour clock.
+///
+/// ### Sample code
+///
+/// ```dart
+/// TimeOfDay now = TimeOfDay.now();
+/// TimeOfDay releaseTime = TimeOfDay(hour: 15, minute: 0); // 3:00pm
+/// TimeOfDay roomBooked = TimeOfDay.fromDateTime(DateTime.parse('2018-10-20 16:30:04Z')); // 4:30pm
+/// ```
 ///
 /// See also:
 ///