Untitled

 avatar
unknown
plain_text
4 years ago
3.2 kB
4
Indexable
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(
                  image: DecorationImage(
                    image: AssetImage('images/pic.png'),
                    fit: BoxFit.cover,
                  ),
                  boxShadow: [
                    BoxShadow(
                        color: Colors.black,
                        offset: Offset(5, 6),
                        spreadRadius: 3.0,
                        blurRadius: 5.0),
                  ],
                  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,
              ),
              Card(
                color: Colors.amber,
              ),
              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),
                  boxShadow: [
                    BoxShadow(
                      color: Colors.blue,
                      offset: Offset(5, 6),
                      blurRadius: 10,
                      spreadRadius: 3.0,
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
Editor is loading...