title: How to create a page view for an external class
body: <p>I am trying to create a page view for an external classes as to swipe between pages while pressing <code>bottomNavigationBar</code> Icon Item as related to the below question:</p>
  
  <p><a href="https://stackoverflow.com/questions/62241805/how-to-replace-a-small-widget-for-a-child-when-onpressed-on-a-bottomappbar-icon">How to replace a small widget for a child when onPressed on a BottomAppBar Icon Item</a>?</p>
  
  <p>So I am trying to follow the below article as to apply this the paging when click the Icon related for <code>bottomNavigationBar</code>...</p>
  
  <p><a href="https://medium.com/@KarthikPonnam/flutter-pageview-withbottomnavigationbar-fb4c87580f6a" rel="nofollow noreferrer">https://medium.com/@KarthikPonnam/flutter-pageview-withbottomnavigationbar-fb4c87580f6a</a></p>
  
  <p>When I am trying to add this part to my code:</p>
  
  <pre><code>Widget buildPageView() {
      return PageView(
        controller: pageController,
        onPageChanged: (index) {
          pageChanged(index);
        },
        children: &lt;Widget&gt;[
          HomeGrid(),
          PropertiesGrid(),
          // Yellow(),
        ],
      );
    }
  </code></pre>
  
  <p>I found a syntax error as the below one for the <code>HomeGrid()</code> and <code>PropertiesGrid()</code>:</p>
  
  <pre><code>1 positional argument(s) expected, but 0 found.
  Try adding the missing arguments.dartnot_enough_positional_arguments)
  </code></pre>
  
  <p>I need some one help me to solve this issue for how to perform the way of this article and apply it to my code...</p>
  
  <p>How can I swipe between a small part of screen based on a <code>Grid</code> widgets....</p>