title: How to make a Container inside a PageView full screen in Flutter?
body: <p>I have a simple horizontal list,like an image carousel, that I can sweep through using an <code>AnimatedBuilder</code>.</p>
  
  <p>I would like to have each individual container animate and expand full screen when I tap on it.</p>
  
  <p>I wrapped the containers in a <code>GestureDetector</code> and I can tap on them just fine, now I need to scale the container full screen.</p>
  
  <p>I tried using a <code>Positioned</code> to preposition it, but it doesn't really work, because it re-positions all the containers from the "carousel".</p>
  
  <p>Basically I need the tapped container to "pop" out, more or less like position a html DIV absolutely.</p>
  
  <p>Any ideas? </p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  void main() =&gt; runApp(new MyApp());
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return new MaterialApp(
        title: 'Flutter Demo',
        theme: new ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: new MyHomePage(title: 'Flutter Demo Home Page'),
      );
    }
  }
  
  class MyHomePage extends StatefulWidget {
    MyHomePage({Key key, this.title}) : super(key: key);
    final String title;
  
    @override
    _MyHomePageState createState() =&gt; new _MyHomePageState();
  }
  
  class _MyHomePageState extends State&lt;MyHomePage&gt; {
    int currentPage = 0;
    PageController _controller;
  
    @override
    void initState() {
      super.initState();
  
      _controller = new PageController(
        initialPage: currentPage,
        keepPage: true,
        viewportFraction: 0.8,
      );
    }
  
    @override
    dispose() {
      _controller.dispose();
      super.dispose();
    }
  
    expandMe() {
      print('I want to be fill screen');
    }
  
    @override
    Widget build(BuildContext context) {
      return new Scaffold(
        appBar: new AppBar(
          title: new Text(widget.title),
        ),
        body: new SafeArea(
          child: new Column(
            children: [
              new Expanded(
                child: new PageView.builder(
                  itemCount: 2,
                  onPageChanged: (value) {
                    setState(() {
                      currentPage = value;
                    });
                  },
                  controller: _controller,
                  itemBuilder: (context, index) =&gt; builder(index),
                ),
              )
            ],
          ),
        ),
      );
    }
  
    builder(int index) {
      return new AnimatedBuilder(
        animation: _controller,
        builder: (BuildContext context, Widget child) {
          return child;
        },
        child: Padding(
          padding: const EdgeInsets.all(8.0),
          child: new GestureDetector(
            onTap: expandMe,
  
            // on tap, make this one container full screen
            child: new Container(
              decoration: new BoxDecoration(
                borderRadius: new BorderRadius.circular(15.0),
                color: Colors.white,
                boxShadow: &lt;BoxShadow&gt;[
                  new BoxShadow(
                    color: Colors.black12,
                    blurRadius: 10.0,
                    offset: new Offset(0.0, 10.0),
                  ),
                ],
              ),
              child: new Text('page ' + index.toString()),
            ),
          ),
        ),
      );
    }
  }
  </code></pre>