Skip to content

Commit 17c97d0

Browse files
authored
[cupertino_ui, material_ui] Fix bad doc references (flutter#12381)
Related to dart-lang/pub-dev#9510 This fixes some bad doc references in material_ui and cupertino_ui Explanations inline. ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent 4e3f83d commit 17c97d0

8 files changed

Lines changed: 43 additions & 31 deletions

File tree

‎packages/cupertino_ui/lib/cupertino_ui.dart‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
/// for a catalog of all Cupertino widgets.
2020
/// * [flutter.dev/widgets](https://docs.flutter.dev/ui/widgets)
2121
/// for a catalog of commonly-used Flutter widgets.
22-
/// @docImport 'package:flutter_test/flutter_test.dart';
2322
/// @docImport 'package:intl/intl.dart';
2423
library cupertino_ui;
2524

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
changelog: |
2+
- Remove unresolvable doc import for flutter_test
3+
version: patch

‎packages/material_ui/lib/material_ui.dart‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
/// for a catalog of commonly-used Material component widgets.
1515
/// * [m3.material.io](https://m3.material.io/) for the Material 3 specification
1616
/// * [m2.material.io](https://m2.material.io/) for the Material 2 specification
17-
/// @docImport 'package:flutter_test/flutter_test.dart';
1817
/// @docImport 'package:intl/intl.dart';
1918
library material_ui;
2019

‎packages/material_ui/lib/src/global_material_localizations.dart‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
/// @docImport 'package:intl/intl.dart';
6-
library;
7-
85
import 'package:cupertino_ui/cupertino_ui.dart' show GlobalCupertinoLocalizations;
96
import 'package:flutter/foundation.dart';
107
import 'package:flutter/widgets.dart';
@@ -314,7 +311,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
314311
///
315312
/// See also:
316313
///
317-
/// * [Intl.plural], to which this form is passed.
318314
/// * [selectedRowCountTitleOne], the "one" form
319315
/// * [selectedRowCountTitleTwo], the "two" form
320316
/// * [selectedRowCountTitleFew], the "few" form
@@ -329,7 +325,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
329325
///
330326
/// See also:
331327
///
332-
/// * [Intl.plural], to which this form is passed.
333328
/// * [selectedRowCountTitleZero], the "zero" form
334329
/// * [selectedRowCountTitleTwo], the "two" form
335330
/// * [selectedRowCountTitleFew], the "few" form
@@ -344,7 +339,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
344339
///
345340
/// See also:
346341
///
347-
/// * [Intl.plural], to which this form is passed.
348342
/// * [selectedRowCountTitleZero], the "zero" form
349343
/// * [selectedRowCountTitleOne], the "one" form
350344
/// * [selectedRowCountTitleFew], the "few" form
@@ -359,7 +353,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
359353
///
360354
/// See also:
361355
///
362-
/// * [Intl.plural], to which this form is passed.
363356
/// * [selectedRowCountTitleZero], the "zero" form
364357
/// * [selectedRowCountTitleOne], the "one" form
365358
/// * [selectedRowCountTitleTwo], the "two" form
@@ -374,7 +367,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
374367
///
375368
/// See also:
376369
///
377-
/// * [Intl.plural], to which this form is passed.
378370
/// * [selectedRowCountTitleZero], the "zero" form
379371
/// * [selectedRowCountTitleOne], the "one" form
380372
/// * [selectedRowCountTitleTwo], the "two" form
@@ -389,7 +381,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
389381
///
390382
/// See also:
391383
///
392-
/// * [Intl.plural], to which this form is passed.
393384
/// * [selectedRowCountTitleZero], the "zero" form
394385
/// * [selectedRowCountTitleOne], the "one" form
395386
/// * [selectedRowCountTitleTwo], the "two" form
@@ -446,7 +437,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
446437
///
447438
/// See also:
448439
///
449-
/// * [Intl.plural], to which this form is passed.
450440
/// * [licensesPackageDetailTextZero], the "zero" form
451441
/// * [licensesPackageDetailTextOne], the "one" form
452442
/// * [licensesPackageDetailTextTwo], the "two" form
@@ -477,7 +467,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
477467
///
478468
/// See also:
479469
///
480-
/// * [Intl.plural], to which this form is passed.
481470
/// * [licensesPackageDetailTextZero], the "zero" form
482471
/// * [licensesPackageDetailTextOne], the "one" form
483472
/// * [licensesPackageDetailTextTwo], the "two" form
@@ -493,7 +482,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
493482
///
494483
/// See also:
495484
///
496-
/// * [Intl.plural], to which this form is passed.
497485
/// * [licensesPackageDetailTextZero], the "zero" form
498486
/// * [licensesPackageDetailTextOne], the "one" form
499487
/// * [licensesPackageDetailTextTwo], the "two" form
@@ -509,7 +497,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
509497
///
510498
/// See also:
511499
///
512-
/// * [Intl.plural], to which this form is passed.
513500
/// * [licensesPackageDetailTextZero], the "zero" form
514501
/// * [licensesPackageDetailTextOne], the "one" form
515502
/// * [licensesPackageDetailTextTwo], the "two" form
@@ -525,7 +512,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
525512
///
526513
/// See also:
527514
///
528-
/// * [Intl.plural], to which this form is passed.
529515
/// * [licensesPackageDetailTextZero], the "zero" form
530516
/// * [licensesPackageDetailTextOne], the "one" form
531517
/// * [licensesPackageDetailTextTwo], the "two" form
@@ -555,7 +541,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
555541
///
556542
/// See also:
557543
///
558-
/// * [Intl.plural], to which this form is passed.
559544
/// * [remainingTextFieldCharacterCountZero], the "zero" form
560545
/// * [remainingTextFieldCharacterCountOne], the "one" form
561546
/// * [remainingTextFieldCharacterCountTwo], the "two" form
@@ -586,7 +571,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
586571
///
587572
/// See also:
588573
///
589-
/// * [Intl.plural], to which this form is passed.
590574
/// * [remainingTextFieldCharacterCountZero], the "zero" form
591575
/// * [remainingTextFieldCharacterCountOne], the "one" form
592576
/// * [remainingTextFieldCharacterCountTwo], the "two" form
@@ -602,7 +586,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
602586
///
603587
/// See also:
604588
///
605-
/// * [Intl.plural], to which this form is passed.
606589
/// * [remainingTextFieldCharacterCountZero], the "zero" form
607590
/// * [remainingTextFieldCharacterCountOne], the "one" form
608591
/// * [remainingTextFieldCharacterCountTwo], the "two" form
@@ -618,7 +601,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
618601
///
619602
/// See also:
620603
///
621-
/// * [Intl.plural], to which this form is passed.
622604
/// * [remainingTextFieldCharacterCountZero], the "zero" form
623605
/// * [remainingTextFieldCharacterCountOne], the "one" form
624606
/// * [remainingTextFieldCharacterCountTwo], the "two" form
@@ -634,7 +616,6 @@ abstract class GlobalMaterialLocalizations implements MaterialLocalizations {
634616
///
635617
/// See also:
636618
///
637-
/// * [Intl.plural], to which this form is passed.
638619
/// * [remainingTextFieldCharacterCountZero], the "zero" form
639620
/// * [remainingTextFieldCharacterCountOne], the "one" form
640621
/// * [remainingTextFieldCharacterCountTwo], the "two" form

‎packages/material_ui/lib/src/l10n/generated_material_localizations.dart‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
// To regenerate the file, use:
77
// dart script/l10n/bin/gen_localizations.dart --overwrite
88

9-
/// @docImport 'package:intl/intl.dart';
10-
library;
11-
129
import 'dart:collection';
1310

1411
import 'package:flutter/widgets.dart';

‎packages/material_ui/lib/src/paginated_data_table.dart‎

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,38 @@ class PaginatedDataTable extends StatefulWidget {
327327
/// {@macro flutter.widgets.scroll_view.controller}
328328
final ScrollController? controller;
329329

330-
/// {@macro flutter.widgets.scroll_view.primary}
330+
/// {@template material_ui.paginated_data_table.primary}
331+
/// Whether this is the primary scroll view associated with the parent
332+
/// [PrimaryScrollController].
333+
///
334+
/// When this is true, the scroll view is scrollable even if it does not have
335+
/// sufficient content to actually scroll. Otherwise, by default the user can
336+
/// only scroll the view if it has sufficient content. See [physics].
337+
///
338+
/// Also when true, the scroll view is used for default [ScrollAction]s. If a
339+
/// ScrollAction is not handled by an otherwise focused part of the application,
340+
/// the ScrollAction will be evaluated using this scroll view, for example,
341+
/// when executing [Shortcuts] key events like page up and down.
342+
///
343+
/// On iOS, this also identifies the scroll view that will scroll to top in
344+
/// response to a tap in the status bar.
345+
///
346+
/// Cannot be true while a [ScrollController] is provided to `controller`,
347+
/// only one ScrollController can be associated with a ScrollView.
348+
///
349+
/// Setting to false will explicitly prevent inheriting any
350+
/// [PrimaryScrollController].
351+
///
352+
/// Defaults to null. When null, and a controller is not provided,
353+
/// [PrimaryScrollController.shouldInherit] is used to decide automatic
354+
/// inheritance.
355+
///
356+
/// By default, the [PrimaryScrollController] that is injected by each
357+
/// [ModalRoute] is configured to automatically be inherited on
358+
/// mobile platforms for ScrollViews in the [Axis.vertical]
359+
/// scroll direction. Adding another to your app will override the
360+
/// PrimaryScrollController above it.
361+
/// {@endtemplate}
331362
final bool? primary;
332363

333364
/// {@macro material_ui.dataTable.headingRowColor}

‎packages/material_ui/lib/src/reorderable_list.dart‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
/// @docImport 'package:flutter_test/flutter_test.dart';
6-
///
75
/// @docImport 'card.dart';
6+
/// @docImport 'paginated_data_table.dart';
87
library;
98

109
import 'dart:ui' show lerpDouble;
@@ -37,9 +36,9 @@ import 'theme.dart';
3736
///
3837
/// </callout-box>
3938
///
40-
/// By default, on [TargetPlatformVariant.desktop] platforms each item will
39+
/// By default, on desktop platforms each item will
4140
/// have a drag handle added on top of it that will allow the user to grab it
42-
/// to move the item. On [TargetPlatformVariant.mobile], no drag handle will be
41+
/// to move the item. On mobile platforms, no drag handle will be
4342
/// added, but when the user long presses anywhere on the item it will start
4443
/// moving the item. Displaying drag handles can be controlled with
4544
/// [ReorderableListView.buildDefaultDragHandles].
@@ -321,8 +320,8 @@ class ReorderableListView extends StatefulWidget {
321320
/// {@macro flutter.widgets.scroll_view.controller}
322321
final ScrollController? scrollController;
323322

324-
/// {@macro flutter.widgets.scroll_view.primary}
325-
323+
/// {@macro material_ui.paginated_data_table.primary}
324+
///
326325
/// Defaults to true when [scrollDirection] is [Axis.vertical] and
327326
/// [scrollController] is null.
328327
final bool? primary;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
changelog: |
2+
- Replace unresolvable doc imports
3+
version: patch

0 commit comments

Comments
 (0)