title: Dynamic display using Flutter and PHP
body: <p>Hi guys I'm new in flutter. Please help me to solve by problem</p>
  <p>I want to create a display using parse json on php url result And defined the result on final blockBustorDealList.</p>
  <p>I am looking for a solution for this code.
  I've provided the entire code below.</p>
  <p>I just want a result like</p>
  <pre><code>final blockBustorDealList = [
    {
      'image':
          'https://is.simplify.cool/component/admin/upload_img/demo/backend/files/thumbnail/NEC56049_thumbnail.webp?v=20220602014017',
      'title': 'Trick R Treat Ultimate Sam',
      'offer': 'RMB 54.90'
    },
    {
      'image':
          'https://is.simplify.cool/component/admin/upload_img/demo/backend/files/thumbnail/NEC61901_thumbnail.webp?v=20220602014017',
      'title': 'Blockbustor Deals On TVs',
      'offer': 'From ₹5,499'
    },
    {
      'image':
          'https://is.simplify.cool/component/admin/upload_img/demo/backend/files/thumbnail/NEC54206_thumbnail.webp?v=20220602014017',
      'title': 'Asian, Kraasa &amp; more',
      'offer': 'Min. 55% Off'
    },
    {
      'image':
          'https://is.simplify.cool/component/admin/upload_img/demo/backend/files/thumbnail/NEC54226_thumbnail.webp?v=20220602014017',
      'title': 'Puma, FILA &amp; more',
      'offer': 'Min. 60% Off'
    }
  ];
  </code></pre>
  <p>using the result of <a href="http://192.168.1.4/flutter/get_products.php" rel="nofollow noreferrer">http://192.168.1.4/flutter/get_products.php</a> url</p>
  <pre><code>import 'dart:convert';
  import 'dart:io';
  import 'package:flutter/foundation.dart';
  import 'package:flutter/material.dart';
  import 'package:flutter/services.dart';
  
  // My Own Imports
  import 'package:go_kart/pages/category/top_offers.dart';
  import 'package:http/http.dart' as http;
  
  class BlockBusterDeals extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return Container(
        width: double.infinity,
        child: Column(
          children: &lt;Widget&gt;[
            // TopImage(),
            OfferGrid(),
          ],
        ),
      );
    }
  }
  
  final blockBustorDealList = [
    {
      'image':
          'https://is.simplify.cool/component/admin/upload_img/demo/backend/files/thumbnail/NEC56049_thumbnail.webp?v=20220602014017',
      'title': 'Trick R Treat Ultimate Sam',
      'offer': 'RMB 54.90'
    },
    {
      'image':
          'https://is.simplify.cool/component/admin/upload_img/demo/backend/files/thumbnail/NEC61901_thumbnail.webp?v=20220602014017',
      'title': 'Blockbustor Deals On TVs',
      'offer': 'From ₹5,499'
    },
    {
      'image':
          'https://is.simplify.cool/component/admin/upload_img/demo/backend/files/thumbnail/NEC54206_thumbnail.webp?v=20220602014017',
      'title': 'Asian, Kraasa &amp; more',
      'offer': 'Min. 55% Off'
    },
    {
      'image':
          'https://is.simplify.cool/component/admin/upload_img/demo/backend/files/thumbnail/NEC54226_thumbnail.webp?v=20220602014017',
      'title': 'Puma, FILA &amp; more',
      'offer': 'Min. 60% Off'
    }
  ];
  
  class OfferGrid extends StatelessWidget {
    // var url = &quot;http://192.168.1.4/flutter/get_products.php&quot;;
    @override
    Widget build(BuildContext context) {
      double width = MediaQuery.of(context).size.width;
  
      InkWell getStructuredGridCell(blockBustorDeal) {
        final item = blockBustorDeal;
        return InkWell(
          child: Container(
            margin: EdgeInsets.all(2.0),
            decoration: BoxDecoration(
              color: Color.fromARGB(255, 15, 13, 13),
              borderRadius: BorderRadius.circular(10.0),
            ),
            child: Column(
              children: &lt;Widget&gt;[
                Container(
                  margin: const EdgeInsets.only(top: 10.0, bottom: 10.0),
                  height: 170.0,
                  child: Image.network(
                    item['image'],
                    fit: BoxFit.fitWidth,
                  ),
                ),
                Container(
                  // alignment: Alignment.center,
                  child: Column(
                    children: &lt;Widget&gt;[
                      Text(
                        '${item['title']}',
                        style: TextStyle(fontSize: 12.0, color: Colors.white),
                      ),
                      Text(
                        '${item['offer']}',
                        style: TextStyle(
                            color: const Color(0xFF67A86B), fontSize: 16.0),
                      ),
                    ],
                  ),
                ),
              ],
            ),
          ),
          onTap: () {
            Navigator.push(
              context,
              MaterialPageRoute(
                  builder: (context) =&gt; TopOffers(title: '${item['title']}')),
            );
          },
        );
      }
  
      return Column(
        children: &lt;Widget&gt;[
          SizedBox(
            width: width,
            height: 479.0,
            child: Stack(
              children: &lt;Widget&gt;[
                Container(
                  width: width,
                  height: 460.0,
                  decoration: BoxDecoration(
                    color: Colors.transparent,
                  ),
                ),
                Container(
                  decoration: BoxDecoration(
                    color: Colors.transparent,
                    borderRadius: BorderRadius.circular(5.0),
                  ),
                  padding: EdgeInsets.only(top: 5.0, right: 5.0, left: 5.0),
                  width: width - 20.0,
                  margin: EdgeInsets.only(right: 10.0, left: 10.0, top: 10.0),
                  child: GridView.count(
                    primary: false,
                    crossAxisSpacing: 0,
                    mainAxisSpacing: 0,
                    crossAxisCount: 2,
                    childAspectRatio: ((width) / 500),
                    children: List.generate(blockBustorDealList.length, (index) {
                      return getStructuredGridCell(blockBustorDealList[index]);
                    }),
                  ),
                ),
              ],
            ),
          ),
        ],
      );
    }
  }
  </code></pre>
  <ul>
  <li>version: 1.0.0+1</li>
  <li>sdk: &quot;&gt;=2.7.0 &lt;3.0.0&quot;</li>
  </ul>