It works fine in the simulator but the screen is gray on the iPhone

The game screen is displayed on the Xcode simulator, but when I actually release it as an app and run it, the entire screen is gray. There is no error, and the application has passed the review. Please install this application (Mnemosyne) in the App store and log in with your email address as aaa[@]gmail.com and password as aaa111. Press the IconButton on the right side of the "Fruits" section to select a tag, then press Game Start. A gray screen will appear. As I have repeatedly said, this cannot be reproduced in the Xcode simulator. I observed the problem on iPadOS 15.6.1 and iOS 16.0. The same phenomenon probably occurs on other devices.

import ~abbreviation~

class MemoriaGame extends StatefulWidget {
  final User user;
  final DocumentSnapshot<Object?> bookInfo;
  final String tag;
  MemoriaGame(this.user, this.bookInfo, this.tag);
  @override
  _MemoriaGameState createState() => _MemoriaGameState();
}

class _MemoriaGameState extends State<MemoriaGame> {
  var db = FirebaseFirestore.instance;
  List<List<dynamic>> splittedAnswer = []; 
  List<List<dynamic>> originalQuizList = [];
  List<List<List<dynamic>>> selectionsAndAnswer = [];
  int typedLength = 0; 
  int quizNumber = 0; 
  int result = 0; 
  bool isSelectNow = true;
  int count = 0;

  Future<void> updateQuiz(BuildContext context, int typedAnswerKey) async {
    ~abbreviation~
    }

  Future<void> goToResult(BuildContext context, quizList, result) async {
    Navigator.push(context,
        MaterialPageRoute(builder: (context) => Result(result, quizList)));
  }

  @override
  
  Widget build(BuildContext context) {
    return Flexible(
      child: widget.tag == 'All'
          ? StreamBuilder<QuerySnapshot>(
              stream: FirebaseFirestore.instance
                  .collection('books')
                  .doc(widget.bookInfo.id)
                  .collection(widget.bookInfo['name'])
                  .orderBy('date')
                  .snapshots(),
              builder: (context, snapshot) {
                if (snapshot.hasData) {
                  if (snapshot.data != null) {
                    final Iterable<QueryDocumentSnapshot<Object?>> documents =
                        snapshot.data!.docs;
                    if (count == 0) {
                      for (var value in documents) {
                        originalQuizList.add([
                          value['question'],
                          value['answer']
                        ]);
                        splittedAnswer.add(
                            originalQuizList[originalQuizList.length - 1][1]
                                .split(''));
                      }
                      selectionsAndAnswer = quizGenerator(splittedAnswer);
                      count++;
                    }
                    return Scaffold(
                      appBar: AppBar(
                        title: Text(
                            widget.bookInfo['name'] + '【' + widget.tag + '】'),
                      ),
                      body: quizNumber < originalQuizList.length
                          ? CustomScrollView(
                              slivers: <Widget>[
                                SliverList(
                                    delegate: SliverChildListDelegate([
                                  Padding(
                                      padding: EdgeInsets.only(
                                          top: MediaQuery.of(context)
                                                  .size
                                                  .height /
                                              4)),
                                  Text(~abbreviation~),
                                  Text(~abbreviation~),
                                  Container(
                                    height: 80,
                                  ),
                                ])),
                                SliverList(
                                    delegate: SliverChildBuilderDelegate(
                                  (context, key) {
                                    return ClipRRect(
                                        borderRadius: BorderRadius.circular(4),
                                        child: Column(
                                            children: <Widget>[
                                              Stack(
                                                alignment: Alignment.center,
                                                children: <Widget>[
                                                  Container(
                                                    height: 40,
                                                    width: 40,
                                                    decoration: BoxDecoration(
                                                      borderRadius:
                                                          BorderRadius.circular(
                                                              10),
                                                      gradient:
                                                          const LinearGradient(
                                                        colors: <Color>[~abbreviation~],
                                                      ),
                                                    ),
                                                  ),
                                                  TextButton(~abbreviation~),
                                                      onPressed: () async {
                                                        if (!isSelectNow)
                                                          return;
                                                        await updateQuiz(
                                                            context, key);
                                                      },
                                                      child: key != 4
                                                          ? Text(selectionsAndAnswer[quizNumber][typedLength][key])
                                                          : Text("OK")),
                                                ],
                                              ),
                                            ]));
                                  },
                                  childCount: 5,
                                )),
                              ],
                            )
                          : Container(),
                    );
                  } else {
                    return Container();
                  }
                }
                return const Center(
                  child: Text('読み込み中...'),
                );
              })
          : StreamBuilder<QuerySnapshot>(~abbreviation~),
    );
  }
}
It works fine in the simulator but the screen is gray on the iPhone
 
 
Q