Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
2.4 kB
2
Indexable
Never
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(TestContainer());
}

class TestContainer extends StatelessWidget {
  const TestContainer({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('App Bar'),
        ),
        body: Padding(
          padding: const EdgeInsets.all(12.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.start,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Container(
                alignment: Alignment.center,
                height: 150,
                width: 150,
                child: Text('First Box'),
                decoration: BoxDecoration(
                  color: Colors.blue.shade300,
                  borderRadius: BorderRadius.only(
                    topRight: Radius.circular(
                      50.0,
                    ),
                    bottomRight: Radius.circular(
                      50.0,
                    ),
                  ),
                ),
              ),
              SizedBox(
                height: 5,
              ),
              Container(
                alignment: Alignment.center,
                height: 150,
                width: 150,
                child: Text('Second Box'),
                decoration: BoxDecoration(
                  color: Colors.red.shade300,
                  borderRadius: BorderRadius.only(
                      topLeft: Radius.circular(
                        150,
                      ),
                      bottomRight: Radius.circular(150)),
                ),
              ),
              SizedBox(
                height: 5,
              ),
              Container(
                alignment: Alignment.center,
                height: 150,
                width: 150,
                child: Text(
                  'Third Box',
                  style: TextStyle(color: Colors.white),
                ),
                decoration: BoxDecoration(
                    color: Colors.black,
                    borderRadius: BorderRadius.circular(75.0)),
              ),
            ],
          ),
        ),
      ),
    );
  }
}