Untitled

 avatar
unknown
plain_text
4 years ago
2.1 kB
6
Indexable
class StackedBS extends StatelessWidget {
  const StackedBS({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
        color: Color(0xFF737373),
        border: Border.all(
          style: BorderStyle.none,
        ),
      ),
      child: Column(
        children: [
          CircleAvatar(
            backgroundColor: Colors.black,
            radius: 30,
            child: Center(
              child: Icon(
                Icons.close,
                color: Colors.white,
              ),
            ),
          ),
          SizedBox(
            height: 20,
          ),
          Expanded(
            child: Stack(
              children: [
                Positioned(
                  top: 30,
                  child: Container(
                    height: MediaQuery.of(context).size.height,
                    width: MediaQuery.of(context).size.width,
                    decoration: BoxDecoration(
                      color: Colors.white,
                      borderRadius: BorderRadius.circular(20),
                    ),

                    // Item Info
                    child: Container(
                      margin: EdgeInsets.only(top: 80),
                      child: Column(
                        children: [
                          Text('ItemName: Choco'),
                          Text('ItemPrize: 300'),
                        ],
                      ),
                    ),
                  ),
                ),

                // Image
                Align(
                  alignment: Alignment.topCenter,
                  child: Container(
                    height: 100,
                    width: MediaQuery.of(context).size.width * 0.5,
                    color: Colors.red,
                    child: Center(child: Text('Image')),
                  ),
                )
              ],
            ),
          )
        ],
      ),
    );
  }
}
Editor is loading...