Search code examples
flutterflutter-layoutflutter-dependencies

How to make this container in flutter?


enter image description here

I wan to make this container and I have try it making in container by dividing it in 2 row. After that I divide first row in 3 row again but It was not same design made. So, please help me to make this.


Solution

  • Try this

    Column(
                children: [
                  Container(
                    margin: EdgeInsets.fromLTRB(12, 12, 12, 12),
                    padding: EdgeInsets.fromLTRB(12, 12, 12, 12),
                    decoration: BoxDecoration(
                        color: Colors.grey,
                        borderRadius: BorderRadius.all(
                          Radius.circular(20),
                        )),
                    child: Column(
                      children: [
                        Row(
                          children: [
                            CircleAvatar(
                              backgroundImage: NetworkImage(
                                  'https://picsum.photos/id/237/200/300'),
                            ),
                            SizedBox(
                              width: 20,
                            ),
                            Expanded(
                              child: Text(
                                "SIGN UP",
                                style: TextStyle(
                                    color: Colors.white,
                                    fontWeight: FontWeight.bold),
                              ),
                            ),
                            Container(
                              padding: EdgeInsets.fromLTRB(24, 12, 24, 12),
                              decoration: BoxDecoration(
                                  color: Colors.grey,
                                  border: Border.all(
                                    color: Colors.white,
                                  ),
                                  borderRadius: BorderRadius.all(
                                    Radius.circular(16),
                                  )),
                              child: Text("Step 1"),
                            ),
                          ],
                        ),
                        SizedBox(
                          height: 8,
                        ),
                        Container(
                          child: Text(
                              "To register, fill out the form in the sign-up section above. In order to activate your account, we will send you and activation email that you must confirm"),
                        ),
                      ],
                    ),
                  )
                ],
              ),