title: Flutter - Send params in Bottom Navigation Bar
body: <p>I have two different pages. One of these is a form, the other is a list of elements. If you swipe one of the elements to left can edit. I need to send the  element data (from the list) to first page (the form) </p>
  
  <p>When the application starts the data is null, if it come from the element list isn´t null.</p>
  
  <p>The navigation bar code is:</p>
  
  <pre><code>import 'package:flutter/material.dart';
  import 'package:datameter/screens/configuration/form/partials/home_page.dart';
  import 'package:datameter/screens/configuration/list/datameters.dart';
  import 'package:datameter/locations/locations.dart';
  
  class Navigation extends StatefulWidget {
  
   final item;
  
    Navigation(
        {Key key,
        this.item})
        : super(key: key);
  
    @override
    State&lt;StatefulWidget&gt; createState() {
      return _NavigationState();
    }
  }
  
  class _NavigationState extends State&lt;Navigation&gt; {
  
    int currentIndex = 0;
    List&lt;Widget&gt; children = [
      HomePageScreen(datameter: widget.item), //ERRROR HERE
      DatametersPageScreen(),
    ];
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        body: children[currentIndex],
        bottomNavigationBar: new Theme(
            data: Theme.of(context).copyWith(
              primaryColor: Colors.blue[700],
              textTheme: Theme.of(context)
                  .textTheme
                  .copyWith(caption: new TextStyle(color: Colors.black)),
            ),
            child: BottomNavigationBar(
              onTap: onTabTapped,
              currentIndex: currentIndex,
              items: [
                BottomNavigationBarItem(
                  icon: Icon(Icons.add),
                  title: Text(DemoLocalizations.of(context).text('new-device')),
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.list),
                  title: Text(DemoLocalizations.of(context).text('show-all')),
                ),
              ],
            )),
      );
    }
  
    void onTabTapped(int index) {
      setState(() {
        currentIndex = index;
      });
    }
  }
  </code></pre>
  
  <p>When I try to send params from elements list (using navigation bottom bar)  to the form, returns</p>
  
  <blockquote>
    <p>Static only members can be accessed in initializers.</p>
  </blockquote>
  
  <p>Does anybody know how to fix this?</p>