🧩Container()

// Some code
import 'package:flutter/material.dart';

class ContainerWidget extends StatelessWidget {
  const ContainerWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return (
    
        : (
      : (
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: [
        
          Container(
            : 150,
            : 200,
            : Colors.green,
          ),
          Container(
            height: 150,
            width: 200,
            : BoxDecoration(
              color: Colors.green,
              
            ),
          ),
          Container(
            height: 150,
            width: 200,
            decoration: const BoxDecoration(
                color: Colors.green,
                borderRadius: (
                    topLeft: Radius.circular(30),
                    bottomRight: Radius.circular(30),),),
          ),
          Container(
            height: 150,
            width: 200,
            decoration: const BoxDecoration(
                color: Colors.green,
                borderRadius: BorderRadius.only(
                    topLeft: Radius.circular(30),
                    bottomRight: Radius.circular(30))),
  // Чтобы написать внутрь Container Widget(), вам нужен child
  // child принимает любой виджет
            : const Center(
              child: Text('Hello'),
            ),
          ),
        ],
      ),
    ));
  }
}

Last updated