title: flutter:: I have a question about how to use the app top bar
body: <p>This time I'm making an app top bar in flutter. I wrote code like this.</p>
  <pre><code>import 'package:flutter/material.dart';
  
  class VideoAppBar extends StatelessWidget{
    const VideoAppBar({Key? key}) : super(key: key);
  
    @override
    Widget build(BuildContext context){
      return SafeArea(
        child: Scaffold(
          body: WillPopScope( // &lt;- wraps only the Scaffold body.
            child: Center(
            ),
            onWillPop: () {
  
              return Future(() =&gt; false);
            },
          ),
          appBar: AppBar(
  
            backgroundColor: Colors.white,
            title: Text('Very verse',
              style: TextStyle(
                color: Colors.black,
                fontSize: 20,
              ),),
            centerTitle: true,
            leading: IconButton(
              onPressed: () {
                Navigator.pop(context);
              },
              color: Colors.black,
              iconSize: 25,
              icon: Icon(Icons.arrow_back),
  
            ),
  
            actions: &lt;Widget&gt;[
              IconButton(
                icon: Icon(Icons.bookmark_outline),
                iconSize: 25,
                color: Colors.black,
                onPressed: () {
                  print('GD');
                }
            ),
            ],
          ),
        ),
      );
    }
  }
  </code></pre>
  <p>I'd like to put this code simply as a function on several other pages.</p>
  <p>AppBar(title:VideoAppBar);</p>
  <p>I figured it could be done like this.</p>
  <p>But it doesn't go back.</p>
  <p>How should I write the code?</p>