I am trying to use expanded widget for a sample project . I have embedded a row in a column widget as chldren . Inside the row I have used expanded widget with a flex property .But i am not able to see anything on the screen after removing Expanded it works.
I tried putting Expanded before the column too its shows the same error.
Here is my code:-

```
import 'package:flutter/material.dart';

void main() => runApp(
    const MaterialApp(home: MyApp())
);

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Expanded Column Sample'),
      ),
      body: Container(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
              children:[
                Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    Expanded(
                      flex:6,
                      child: Container(
                        color: Colors.green,
                      ),
                    ),
                    Expanded(
                      flex:6,
                      child: Container(
                        color: Colors.deepOrange,
                      ),
                    ),
                    Expanded(
                      flex:6,
                      child: Container(
                        color: Colors.white,
                      ),
                    ),
                    Expanded(
                      flex:6,
                      child: Container(
                        color: Colors.lightGreenAccent,
                      ),
                    ),
                    Expanded(
                      flex:6,
                      child: Container(
                        color: Colors.blue,
                      ),
                    ),
                    Expanded(
                      flex:6,
                      child: Container(
                        color: Colors.red,
                      ),
                    ),
                  ],
                ),
              ]
            ),

        ),
      );
  }
}

```