Search code examples
flutterflutter-design

Can I Make A Container On One Another Small Container at main container border?


Like This Type

I Want to make this type of UI and it's possible without using Stack?


Solution

  •  SizedBox(
                  width: MediaQuery.of(context).size.width,
                  height: MediaQuery.of(context).size.height / 4,
                  child: Padding(
                    padding: EdgeInsets.symmetric(horizontal: 8, vertical: 5),
                    child: Stack(alignment: Alignment.bottomCenter, children: [
                      Container(
                        margin: EdgeInsets.only(bottom: 5),
                        decoration: BoxDecoration(
                            color: Colors.blueGrey,
                            borderRadius: BorderRadius.circular(20)),
                      ),
                      Container(
                        height: 15,
                        width: MediaQuery.of(context).size.width / 4,
                        decoration: BoxDecoration(
                            color: Colors.black,
                            borderRadius: BorderRadius.circular(20)),
                      )
                    ]),
                  ),
                )
    
    your problem is fixed now , use this code