Commit 1fe05983 authored by Jonathan White's avatar Jonathan White Committed by Shi-Hao Hong

Fix typos in DefaultTabController.of documentation (#46907)

Fix error in `DefaultTabController.of` documentation
Co-authored-by: 's avatarShi-Hao Hong <shihaohong@google.com>
parent 39c5f1ea
......@@ -8,6 +8,9 @@ import 'package:flutter/widgets.dart';
import 'constants.dart';
// Examples can assume:
// BuildContext context;
/// Coordinates tab selection between a [TabBar] and a [TabBarView].
///
/// The [index] property is the index of the selected tab and the [animation]
......@@ -336,11 +339,13 @@ class DefaultTabController extends StatefulWidget {
/// The closest instance of this class that encloses the given context.
///
/// Typical usage:
/// {@tool sample}
/// Typical usage is as follows:
///
/// ```dart
/// TabController controller = DefaultTabBarController.of(context);
/// TabController controller = DefaultTabController.of(context);
/// ```
/// {@end-tool}
static TabController of(BuildContext context) {
final _TabControllerScope scope = context.dependOnInheritedWidgetOfExactType<_TabControllerScope>();
return scope?.controller;
......
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