forked from md-siam/widget_of_the_day
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontainer.dart
40 lines (38 loc) · 1.09 KB
/
container.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import 'package:flutter/material.dart';
class MyContainer extends StatelessWidget {
const MyContainer({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.grey[300],
appBar: AppBar(title: const Text("Container")),
body: Center(
child: Container(
alignment: Alignment.center,
height: 250,
width: 250,
// Neumorphic design
decoration: BoxDecoration(
color: Colors.grey[300],
//borderRadius: BorderRadius.circular(15),
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: Colors.grey.shade500,
offset: const Offset(4.0, 4.0),
blurRadius: 15.0,
spreadRadius: 1.0,
),
const BoxShadow(
color: Colors.white,
offset: Offset(-4.0, -4.0),
blurRadius: 15.0,
spreadRadius: 1.0,
),
],
),
),
),
);
}
}