flutter – pageView with a bottomNavigationBar = error

Friends, I'm trying to create a side view with a bottomNavigationBar, but I'm getting an error that I don't understand why.
In this line: currentIndex: controller.page.round () the page is returned with zero.
I searched the documentation and saw the following: page property, I think it must be enough, but I couldn't understand it very well.
I appreciate the help.

import 'package:flutter/material.dart';
import 'package:my/resources/colors.dart';
import 'package:my/screens/atividade_fisica_page.dart';
import 'package:my/screens/glicose_page.dart';
import 'package:my/screens/grafico_page.dart';
import 'package:my/screens/refeicao_page.dart';

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State {
  PageController controller;
  List pages;

  void _onItemTapped(int index) {
    controller.animateToPage(index,
        curve: Curves.bounceIn, duration: Duration(milliseconds: 300));
  }

  @override
  initState() {
    super.initState();
    controller = PageController(initialPage: 0);
    pages = (
      GraficoPage(),
      GlicosePage(),
      RefeicaoPage(),
      AtividadeFisicaPage()
    );
  }

  @override
  dispose() {
    controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: colorSecondaryLight,
      appBar: AppBar(
        actions: (
          IconButton(
            icon: Icon(Icons.keyboard_arrow_left),
            onPressed: () {
              controller.previousPage(
                  duration: Duration(milliseconds: 300), curve: Curves.easeIn);
            },
          ),
          IconButton(
            icon: Icon(Icons.keyboard_arrow_right),
            onPressed: () {
              controller.nextPage(
                  duration: Duration(milliseconds: 300), curve: Curves.easeIn);
            },
          ),
        ),
        title: Text("myGlico"),
      ),
      body: PageView.builder(
        controller: controller,
        itemCount: pages.length,
        itemBuilder: (BuildContext context, int index) {
          return Center(
            child: pages(index),
          );
        },
      ),
      bottomNavigationBar: AnimatedBuilder(
          animation: controller,
          builder: (BuildContext context, Widget child) {
            return BottomNavigationBar(
              currentIndex: controller.page.round(),
              selectedItemColor: colorSecondaryDark,
              onTap: _onItemTapped,
              backgroundColor: Colors.red,
              items: const (
                BottomNavigationBarItem(
                  icon: Icon(Icons.show_chart),
                  title: Text("Gráfico"),
                  backgroundColor: colorPrimary,
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.pin_drop),
                  title: Text("Glicose"),
                  backgroundColor: colorPrimary,
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.pan_tool),
                  title: Text("Refeição"),
                  backgroundColor: colorPrimary,
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.directions_walk),
                  title: Text("Exercício"),
                  backgroundColor: colorPrimary,
                ),
              ),
            );
          }),
    );
  }
}

I / flutter (13159): ══╡ EXCEPTION OF WIDGETS LIBRARY Caught UG ═════════════════════════
I / flutter (13159): The following NoSuchMethodError was triggered when AnimatedBuilder (Animation 🙂 was created.
I / flutter (13159): PageController # 820ac (one client, offset zero), dirty, status: _AnimatedState # ea014):
I / flutter (13159): The & # 39; round & # 39; was called to zero.
I / flutter (13159): Receiver: zero
I / flutter (13159): Call tried: round ()
Ich / Flutter (13159):
I / flutter (13159): The relevant error-causing widget was:
I / flutter (13159): AnimatedBuilder
Ich / Flutter (13159):
Package: myglico / screen / my_home_page.dart: 72
Ich / Flutter (13159):
I / flutter (13159): When the exception was raised, this was the stack:

Google Analytics – How can I change or overwrite UTM parameters for a pageview?

We have implemented a chat support service on our website that connects users to various pages on our website. Links in this bot are provided with a UTM parameter to identify that the user has traversed the bot to get to other pages. The content of this bot is loaded into an iframe and therefore can not be easily changed.

When a user comes to this site, their UTM parameters are stored in a session variable to keep it for further page views. A user clicking a link in the chat bot may already have some of these UTM parameters.

When a user clicks on a link in this bot, he can then check if additional parameters are stored in that session variable and may attach or overwrite it before sending the pageview.

I've found this documentation that lets you set and push campaign variables through analytics.js. However, I fear that multiple page views will be recorded every time this happens.

Dart – Flutter – Error while using PageView & ListView

I'm trying to make a PageView, PageController, and ListView merry-go-round of these scrolling, horizontally scrollable maps with fluttering. But it triggered this exception …

══╡ EXCEPTION BY RENDERING LIBRARY ╞═════════════════════════════════════════ ═ ═══════════════
I / Flutter (17678): The following statement was raised during performResize ():
I / Flutter (17678): Horizontal viewport received an unrestricted height.
I / Flutter (17678): The viewports are expanded in the transverse axis to fill their container and restrict child element matching
I / flutter (17678): its extension in the transverse axis. In this case, an unlimited amount was assigned to a horizontal viewport
I / flutter (17678): vertical space in which to expand.

Can someone help me to fix the problem?

I want to put this merry-go-round in a background-filled wallpaper, transform the class, and hide the transition.

        @Override
void initState () {
super.initState ();
Controller = PageController (
Start page: 0,
keepPage: true,
);

@Override
Create Widget (BuildContext Context) {

return AnimatedBuilder (
Builder: (BuildContext Context, widget child) {
back scaffold (
//BODY
body: ListView (Children: [
new stack (
Children: [
new AspectRatio (...),
new transformation (...),
//THIS IS
New ListView.builder (
itemCount: 3,
scrollDirection: Axis.horizontal,
Padding: EdgeInsets.symmetric (vertical: 16.0),
itemBuilder: (BuildContext context, int index) {
if (index% 3 == 0) {
return _buildCarousel (context, index ~ / 3);
} else {
return divider ();
}
},
)
}
}
}
Widget _buildCarousel (BuildContext Context, int carouselIndex) {
Return the column (
mainAxisSize: MainAxisSize.min,
Children: [
Text ("carousel $ carouselIndex"),
SizedBox (
// You can use an aspect ratio for tablet support here
Height: 200,0
child: PageView.builder (
// Save this controller in a state to save the scroll position of the carousel
Controller: PageController (viewportFraction: 0.8),
itemBuilder: (BuildContext Context, int itemIndex) {
return _buildCarouselItem (context, carouselIndex, itemIndex);
},
)
)
],
);
Widget _buildCarouselItem (
BuildContext context, int carouselIndex, int itemIndex) {
Return padding (
Padding: EdgeInsets.symmetric (horizontal: 4.0),
Child: Container (
Decoration: BoxDecoration (
Color: Colors.grey,
borderRadius: BorderRadius.all (Radius.circular (4.0)),
)
)
);

What is Google Pageview?