title: I have problem on incorrect use of ParentDataWidget
body: <p>So, I'm trying to make a dashboard but couldn't fix this error when running it.<a href="https://i.stack.imgur.com/OGNtA.png" rel="nofollow noreferrer">this is the error I got when running the program</a></p>
  <p>This is my main.dart</p>
  <pre><code>import 'package:dashboard_invoice/constant.dart';
  import 'package:dashboard_invoice/screens/invoice.dart';
  import 'package:flutter/material.dart';
  import 'package:google_fonts/google_fonts.dart';
  
  void main(){
    runApp(const MyApp());
  }
  
  class MyApp extends StatelessWidget {
    const MyApp({Key? key}) : super(key: key);
  
    // This widget is the root of your application.
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: 'Dashboard',
        theme: ThemeData(
            primaryColor: Colors.lightBlueAccent,
            visualDensity: VisualDensity.adaptivePlatformDensity,
            textTheme: GoogleFonts.ubuntuTextTheme()
                .apply(bodyColor: Colors.white, displayColor: iPrimaryColor)),
        home: const Scaffold(
          body: Invoice(),
        ),
      );
    }
  }
  </code></pre>
  <p>So my main.dart connect to 2 file which is Invoice and Invoice Body</p>
  <ul>
  <li><p>invoice.dart</p>
  <pre><code>@override
  Widget build(BuildContext context) {
    return Column(
      children: [
        invoiceHeader(context),
        const InvoiceBody()
      ],
    );
  }
  }
  
  Container invoiceHeader(BuildContext context) {
    ScreenConfig.init(context);
    return Container(
      width:ScreenConfig.devicewidth,
      height: ScreenConfig.getProportionalHeight(374),
      color: const Color(0xFF33cdbb),
      padding: EdgeInsets.only(
        top: ScreenConfig.getProportionalHeight(50),
          left: ScreenConfig.getProportionalWidth(40),
          right: ScreenConfig.getProportionalWidth(40)),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Align(
            alignment: Alignment.center,
            child: Text(&quot;Pembayaran&quot;,
              style: TextStyle(fontWeight:FontWeight.bold,
                  fontSize: ScreenConfig.getProportionalHeight(50)),
            ),
          ),
            SizedBox(
              height: ScreenConfig.getProportionalHeight(10),
            ),
            Align(
                alignment: Alignment.center,
                child: Text(&quot;Berhasil!&quot;,
                  style: TextStyle(fontWeight:FontWeight.bold,
                      fontSize: ScreenConfig.getProportionalHeight(25)),
                )),
            SizedBox(
              height: ScreenConfig.getProportionalHeight(15),),
            Positioned(
                width: MediaQuery.of(context).size.width,
                top: MediaQuery.of(context).size.width * 0.4,//TRY TO CHANGE THIS **0.30** value to achieve your goal
                child: Container(
                  child:Column(
                    children: &lt;Widget&gt;[
                      Image.asset('assets/icons/success.gif',height: 87)]),
                  alignment: Alignment.center,)
            )
          ],
        )],
      ),
    );
  }
  </code></pre>
  </li>
  </ul>
  <p>-invoice_body.dart</p>
  <pre><code>import 'package:dashboard_invoice/constant.dart';
  import 'package:flutter/material.dart';
  import 'package:google_fonts/google_fonts.dart';
  
  class InvoiceBody extends StatelessWidget{
    const InvoiceBody({Key? key}) : super(key: key);
    @override
    Widget build(BuildContext context) {
  
      return Column(
        children: [
          Row(
            children: [
              Container(
                  margin: const EdgeInsets.only(right: 16,top: 16,left: 16),
                  padding: const EdgeInsets.only(left: 20,right: 20,top: 12,bottom: 12),
                  height: 200,
                  width: ScreenConfig.getProportionalWidth(561),
                  decoration: BoxDecoration(
                    border: Border.all(color: Colors.black87,width: 2,),
                    color: Colors.white,),
              child: Column(
                children: [
                  Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Text(&quot;Nama&quot;,style:
                        GoogleFonts.ubuntu(
                          fontSize: 16,
                          fontWeight: FontWeight.w200,
                          color: Colors.black87,),),
                        Text(&quot;Tanggal&quot;,style:
                        GoogleFonts.ubuntu(
                          fontSize: 16,
                          fontWeight: FontWeight.w200,
                          color: Colors.black87,),
                        textAlign: TextAlign.start,),
                        Text(&quot;Jam Masuk&quot;,style:
                        GoogleFonts.ubuntu(
                          fontSize: 16,
                          fontWeight: FontWeight.w200,
                          color: Colors.black87,),),
                        Text(&quot;Jam Keluar&quot;,style:
                        GoogleFonts.ubuntu(
                          fontSize: 16,
                          fontWeight: FontWeight.w200,
                          color: Colors.black87,),),
                        Text(&quot;Durasi Parkir&quot;,style:
                        GoogleFonts.ubuntu(
                          fontSize: 16,
                          fontWeight: FontWeight.w200,
                          color: Colors.black87,),),
                        Text(&quot;Biaya Parkir&quot;,style:
                        GoogleFonts.ubuntu(
                          fontSize: 16,
                          fontWeight: FontWeight.w200,
                          color: Colors.black87,),),
                      ],
                    ),
                  Column(
                    crossAxisAlignment: CrossAxisAlignment.end,
                    children: [
                      Text(&quot;Djoko Wirawan&quot;,style:
                      GoogleFonts.ubuntu(
                        fontSize: 16,
                        fontWeight: FontWeight.w200,
                        color: Colors.black87,),),
                      Text(&quot;10 Januari 2022&quot;,style:
                      GoogleFonts.ubuntu(
                        fontSize: 16,
                        fontWeight: FontWeight.w200,
                        color: Colors.black87,),),
                      Text(&quot;18:32&quot;,style:
                      GoogleFonts.ubuntu(
                        fontSize: 16,
                        fontWeight: FontWeight.w200,
                        color: Colors.black87,),),
                      Text(&quot;19:32&quot;,style:
                      GoogleFonts.ubuntu(
                        fontSize: 16,
                        fontWeight: FontWeight.w200,
                        color: Colors.black87,),),
                      Text(&quot;1 Jam&quot;,style:
                      GoogleFonts.ubuntu(
                        fontSize: 16,
                        fontWeight: FontWeight.w200,
                        color: Colors.black87,),),
                      Text(&quot;Rp5.000&quot;,style:
                      GoogleFonts.ubuntu(
                        fontSize: 16,
                        fontWeight: FontWeight.w200,
                        color: Colors.black87,),),
                    ],
                  )],
                ),
                  Row(
                  children:[Column(
                    mainAxisAlignment: MainAxisAlignment.spaceAround,
                    children: [
                      Text(&quot;---------------------------------------------------------------------------------------------&quot;,style:
                  GoogleFonts.ubuntu(
                    fontSize: 16,
                    fontWeight: FontWeight.w200,
                    color: Colors.black87,),),
                    ],
                  ),]),
                  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Column(children: [
                      Text(&quot;Total Biaya&quot;,style:
                      GoogleFonts.ubuntu(
                        fontSize: 16,
                        fontWeight: FontWeight.w200,
                        color: Colors.black87,),)],),
                    Column(children: [
                      Text(&quot;Rp5.000&quot;,style:
                      GoogleFonts.ubuntu(
                      fontSize: 16,
                      fontWeight: FontWeight.w200,
                      color: Colors.black87,),)])
                  ],)],)),]),
              Row(
                children: [
                Container(
      margin: const EdgeInsets.only(right: 16,left: 16),
              height: 150,
              width: ScreenConfig.getProportionalWidth(561),
              decoration: const BoxDecoration(
                  borderRadius: BorderRadius.only(
                      bottomRight: Radius.circular(8),
                      bottomLeft: Radius.circular(8)),
                  color: Color(0xFF98e6dd),
                  boxShadow: [
                    BoxShadow(
                        color: Color(0x10000000),
                        blurRadius: 10,
                        spreadRadius: 4,
                        offset: Offset(0.0, 8.0))]),
              child: Stack(
                children: &lt;Widget&gt;[
                  Positioned(
                      left:16,
                      top: 12,
                      child: Image.asset('assets/images/wallet.png',
                          height: 35,
                          width: 35)),
                  Positioned(
                      top: 18,
                      left: 62,
                      child: Text('Sisa Saldo',
                        style: GoogleFonts.ubuntu(
                          fontSize: 20,
                          fontWeight: FontWeight.w700,
                          color: Colors.blueGrey,),)),
                  Align(
                    alignment: Alignment.center,
                    child: Text(&quot;Rp1.000.000&quot;,
                      style: GoogleFonts.ubuntu(
                        fontSize: 35,
                        fontWeight: FontWeight.w700,
                        color: Colors.grey,)
                    ),
                  )
                ],
              ),
              ),
            ],
          ),
          ]);
    }
  }
  </code></pre>
  <p>and this is a constant file but I don't think it affect the error</p>
  <pre><code>import 'package:flutter/material.dart';
  
  class ScreenConfig{
    static double devicewidth='' as double;
    static double deviceheight='' as double;
    static double designHeight = 1300;
    static double designWidth = 600;
    static init(BuildContext context) {
      devicewidth = MediaQuery.of(context).size.width;
      deviceheight = MediaQuery.of(context).size.height;
    }
    // Designer user 1300device height
    static double getProportionalHeight(height){
      return deviceheight * height / designHeight;
    }
    static double getProportionalWidth(width){
      return devicewidth * width / designWidth;
    }
  }
  
  // Colors
  const iPrimaryColor = Color(0xFFDBDBDB);
  const iAcccentColor = Color(0xFFFFB44B);
  </code></pre>