Closed ArmandoJimenezOS closed 2 years ago
@ArmandoJimenezOS thanks for reporting it, can you show the line or file where you see this?
Thanks for answering. In the examples of this package, it shows calling Segment.screen() in the build method, is this where we are supposed to call it?
Thanks for answering. In the examples of this package, it shows calling Segment.screen() in the build method, is this where we are supposed to call it?
No, it depend on your case. In the examples, it is a StatelessWidget, so the build method
will never called multiple time unless you reopen the widget.
The conclusion :
Segment.screen()
in the build methodSegment.screen()
in the initState
method.
Hi,
As I understand, the build method can be called multiple times per second, and this track screen function is a method channel. Was this intention? or what's the best practice to log a screen without it being called multiple times in the same screen session?