Improve the "Create a SceneDelegate" by indicating you must call super at the end of overriden methods

オープン 初心者向け
#14,042 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@NS180 がすでに取り組んでいます。

2026年11月12日 から。

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
85/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
flutter, ios, swift
領域
documentation

調査の方向性

ページのソースとしてリンクされている sites/docs/src/content/release/breaking-changes/uiscenedelegate.md から始めます。Issue に示されているように、最後に super を呼び出すオーバーライドメソッドを含めるよう SceneDelegate の例を更新します。ドキュメントにこの注意点が記載されたら完了です。

索引モデルが issue の本文から書いたものです。

説明

a.rn.breaking-changes d.enhancement fix.code-sample from.page-issue p2-medium target.iOS
Page URL

https://docs.flutter.dev/release/breaking-changes/uiscenedelegate

Page source

https://github.com/flutter/website/blob/main/sites/docs/src/content/release/breaking-changes/uiscenedelegate.md

Describe the problem

The section shows an empty class as example of SceneDelegate, but it would be useful to add an overriden method as an example to remind that super must be called. It may be obvious but it is easy to forget when you are not familiar with iOS development and just copy/paste instructions from packages.
I was bitten by this when overriding sceneDidBecomeActive, which made quick_actions fail to activate shortcuts.

Expected fix

Add an example implementation, e.g.:

import Flutter
import UIKit

class SceneDelegate: FlutterSceneDelegate {
  override func sceneDidBecomeActive(_ scene: UIScene) {
    // your code

    super.sceneDidBecomeActive(scene)
  }
}
Additional context

No response

I would like to fix this problem.
  • I will try and fix this problem on docs.flutter.dev.
主要言語
Dart
スター
3.1k
フォーク
3.5k
平均マージ
1日 14時間
マージ済み PR(30日)
54

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

flutter/website のほかの issue

flutter/website の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。