title: How to make the background image behind the transparent SliverAppBar?
body: <p>I'm a beginner to Flutter and I have a problem with the screen background, it was filled fully when I used the <code>AppBar</code>, but when I changed it to <code>SliverAppBar</code>, the top bar becomes empty and the image starts after it, how to solve this because most of the issues when I searched, are regarding the <code>SliverAppBar</code> background itself, not the main background</p>
  <p>Also, how to control the location of the <code>leading</code> image (logo) without its size being changed, because when I change the location using <code>margin</code>, it becomes smaller</p>
  <pre><code>// ignore_for_file: deprecated_member_use, unnecessary_const
  
  import 'package:decorated_icon/decorated_icon.dart';
  import 'package:flutter/material.dart';
  
  class HomePage extends StatefulWidget {
    HomePage({Key? key}) : super(key: key);
  
    @override
    State&lt;HomePage&gt; createState() =&gt; _HomePageState();
  }
  
  class _HomePageState extends State&lt;HomePage&gt; {
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        backgroundColor: const Color(0xFFFFFFFF),
        extendBodyBehindAppBar: true,
        body: NestedScrollView(
          headerSliverBuilder: (context, innerBoxIsScrolled) =&gt; [
            SliverAppBar(
              actions: [
                Stack(
                  children: &lt;Widget&gt;[
                    Padding(
                      padding: const EdgeInsets.fromLTRB(0, 15, 12, 0),
                      child: IconButton(
                        icon: const DecoratedIcon(
                          Icons.notifications,
                          color: Color.fromARGB(255, 0, 0, 0),
                          size: 30.0,
                          shadows: [
                            BoxShadow(
                              blurStyle: BlurStyle.normal,
                              blurRadius: 7.0,
                              color: Color.fromARGB(255, 0, 0, 0),
                              offset: Offset.zero,
                            ),
                          ],
                        ),
                        onPressed: () {},
                      ),
                    ),
                  ],
                ),
                // ),
              ],
              leading: Container(
                margin: const EdgeInsets.fromLTRB(20, 20, 0, 0),
                child: const Padding(
                  padding: EdgeInsets.fromLTRB(0, 0, 0, 0),
                  child: Image(
                    image: AssetImage('images/logo.png'),
                    height: 500,
                    fit: BoxFit.fill,
                  ),
                ),
              ),
              backgroundColor: Colors.transparent,
              elevation: 0,
            ),
          ],
          body: Stack(
            children: &lt;Widget&gt;[
              Container(
                decoration: const BoxDecoration(
                  image: const DecorationImage(
                    image: const AssetImage(&quot;images/background.jpg&quot;),
                    fit: BoxFit.fill,
                  ),
                ),
              ),
            ],
          ),
        ),
      );
    }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/5EBHX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5EBHX.png" alt="enter image description here" /></a></p>