DEV Community

Coder
Coder

Posted on

Container in Flutter

Image description

code:-

import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      darkTheme: ThemeData.dark(),
      title: 'Om Namah Shivay',
      home: Scaffold(
        appBar: AppBar(
          title: Text(
            'Container',
            style: TextStyle(color: Colors.black, fontStyle: FontStyle.italic),
          ),
          centerTitle: true,
          backgroundColor: Colors.red,
        ),

        ///body
        body: Center(
          child: Container(
            decoration: BoxDecoration(
                boxShadow: [
                  BoxShadow(
                      color: Colors.white,
                      spreadRadius: 2,
                      blurRadius: 15,
                      offset: Offset(0, 15)),
                  BoxShadow(
                      color: Colors.white,
                      spreadRadius: 2,
                      blurRadius: 15,
                      offset: Offset(15, 0)),
                  BoxShadow(
                      color: Colors.red,
                      spreadRadius: 2,
                      blurRadius: 15,
                      offset: Offset(0, -15)),
                  BoxShadow(
                      color: Colors.red,
                      spreadRadius: 2,
                      blurRadius: 15,
                      offset: Offset(-15, 0)),
                ],
                gradient: LinearGradient(colors: [Colors.red, Colors.orange]),
                borderRadius: BorderRadius.only(
                    topRight: Radius.circular(10),
                    bottomLeft: Radius.circular(10),
                    topLeft: Radius.circular(80)),
                border: Border.all(color: Colors.white, width: 3)),
            alignment: Alignment.center,
            height: 300,
            width: 300,
            child: Text(
              '||ऊँ नम: शिवाय ||',
              style: TextStyle(color: Colors.white, fontSize: 25),
            ),
          ),
        ),
      ),
    );
  }
}

Enter fullscreen mode Exit fullscreen mode

I understood

Top comments (0)