Skip to content

Documentation on SliverList.list(…) constructor has snippet not matching its description #134142

Closed

Description

@kpsroka

Is there an existing issue for this?

Steps to reproduce

Look at the documentation comment on SliverList.list(…) constructor, which includes the following snippet:

  /// {@tool snippet}
  /// This example, which would be inserted into a [CustomScrollView.slivers]
  /// list, shows an infinite number of items in varying shades of blue:
  ///
  /// ```dart
  /// SliverList.list(
  ///   children: const <Widget>[
  ///     Text('Hello'),
  ///     Text('World!'),
  ///   ],
  /// );
  /// ```
  /// {@end-tool}

Expected results

Either the snippet description should be different, or (more useful) the snippet should match current description.

Actual results

Snippet's description and content don't match (the snipped does not show an infinite number of items in varying shades of blue, but rather two Text widgets).

Code sample

This is a documentation issue

No details to show, really

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

flutter doctor -v
[!] Flutter (Channel magic_mouse_3.10.3, 3.10.4-0.0.pre.2, on macOS 13.5.1 22G90 darwin-arm64, locale en-GB)
    • Flutter version 3.10.4-0.0.pre.2 on channel magic_mouse_3.10.3 at /Users/krzysztof/Workspace/superlist/.flutter
    ! Warning: `flutter` on your path resolves to /Users/krzysztof/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/krzysztof/Workspace/superlist/.flutter. Consider adding /Users/krzysztof/Workspace/superlist/.flutter/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/krzysztof/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/krzysztof/Workspace/superlist/.flutter. Consider adding /Users/krzysztof/Workspace/superlist/.flutter/bin to the front of your path.
    ! Upstream repository https://github.com/superlistapp/flutter.git is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to https://github.com/superlistapp/flutter.git to dismiss this error.
    • Framework revision 6be21d2d56 (6 months ago), 2023-03-06 14:53:46 +0100
    • Engine revision 2a3401c9bb
    • Dart version 3.0.3
    • DevTools version 2.23.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/krzysztof/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.72.0

Activity

  1. danagbemava-nc commented on Sep 7, 2023

    @danagbemava-nc
    Member

    Thanks for pointing this out.

  2. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    f: scrollingViewports, list views, slivers, etc.
    d: api docsIssues with https://api.flutter.dev/
    and removed
    in triagePresently being triaged by the triage team
    on Sep 7, 2023
  3. added
    P2Important issues not at the top of the work list
    on Sep 11, 2023
  4. self-assigned this
    on Sep 12, 2023
  5. github-actions commented on Sep 27, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  6. locked as resolved and limited conversation to collaborators on Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/f: scrollingViewports, list views, slivers, etc.found in release: 3.13Found to occur in 3.13found in release: 3.14Found to occur in 3.14frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework teamwaiting for PR to land (fixed)A fix is in flight

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions