title: How to remake a request when the page reload Flutter / GetX
body: <p>I'm making a flutter App for a project in my School and I have a problem. I have a page where there are widgets representing categories of articles and when a category is clicked a page with articles from that category is displayed. The problem is that once a category is called, the articles in that category remain the same despite the category change.
  When the page is called, a controller is created that will execute the query that retrieves the items in the category.</p>
  <p>How can I get this controller to remind me every time the page is loaded?</p>
  <p>Category page code :</p>
  <pre><code>class ProduceCategoryScreen extends StatefulWidget {
    static String routeName = &quot;/produceByCategorie&quot;;
  
    @override
    State&lt;ProduceCategoryScreen&gt; createState() =&gt; _ProduceCategoryScreenState();
  }
  
  class _ProduceCategoryScreenState extends State&lt;ProduceCategoryScreen&gt; {
    static int gridColumn = 1;
  
    static ArticleByCategoryController articleController =
        Get.put(ArticleByCategoryController());
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text(&quot;Produitss&quot;),
        ),
        body: Column(
          children: [
            Padding(
              padding: const EdgeInsets.all(16),
              child: Row(
                children: [
                  Expanded(
                    child: Text(
                      'Green Tomato',
                      style: TextStyle(
                        color: Colors.black,
                        fontSize: 32,
                        fontWeight: FontWeight.w900,
                      ),
                    ),
                  ),
                  IconButton(
                    onPressed: () {
                      switch (gridColumn) {
                        case 1:
                          setState(() {
                            gridColumn = 2;
                          });
  
                          break;
                        case 2:
                          setState(() {
                            gridColumn = 1;
                          });
                          break;
                        default:
                      }
                    },
                    icon: Icon(Icons.grid_view),
                  )
                ],
              ),
            ),
            Expanded(
              child: Obx(
                () {
                  if (articleController.isLoading.value)
                    return Center(child: CircularProgressIndicator());
                  else
                    return AlignedGridView.count(
                      crossAxisCount: gridColumn,
                      itemCount: articleController.articleList.length,
                      mainAxisSpacing: 16,
                      crossAxisSpacing: 16,
                      itemBuilder: (context, index) {
                        return ProductTile(articleController.articleList[index]);
                      },
                    );
                },
              ),
            ),
          ],
        ),
      );
    }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/YCBR4.png" rel="nofollow noreferrer">The category widget</a></p>
  <p><a href="https://i.stack.imgur.com/pjZqu.png" rel="nofollow noreferrer">Category screen</a></p>
  <p>If you want more information you can send me a message on my discord : PascheK7#6324.</p>