07-21-2023, 03:27 PM
### Screenshot:
[![enter image description here][1]][1]
----------
- #### Using `BoxShadow` (more customizations):
```dart
Container(
width: 100,
height: 100,
decoration: BoxDecoration(
color: Colors.teal,
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: Colors.red,
blurRadius: 4,
offset: Offset(4, 8), // Shadow position
),
],
),
)
```
- #### Using `PhysicalModel`:
```dart
PhysicalModel(
color: Colors.teal,
elevation: 8,
shadowColor: Colors.red,
borderRadius: BorderRadius.circular(20),
child: SizedBox.square(dimension: 100),
)
```
- #### Using `Card`:
```dart
Card(
elevation: 8,
shadowColor: Colors.red,
child: Container(
width: 100,
height: 100,
color: Colors.teal,
),
)
```
- #### Using `Material`:
```dart
Material(
elevation: 8,
color: Colors.teal,
shadowColor: Colors.red,
borderRadius: BorderRadius.circular(20),
child: SizedBox.square(dimension: 100),
)
```
[1]:
[2]:
[![enter image description here][1]][1]
----------
- #### Using `BoxShadow` (more customizations):
```dart
Container(
width: 100,
height: 100,
decoration: BoxDecoration(
color: Colors.teal,
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: Colors.red,
blurRadius: 4,
offset: Offset(4, 8), // Shadow position
),
],
),
)
```
- #### Using `PhysicalModel`:
```dart
PhysicalModel(
color: Colors.teal,
elevation: 8,
shadowColor: Colors.red,
borderRadius: BorderRadius.circular(20),
child: SizedBox.square(dimension: 100),
)
```
- #### Using `Card`:
```dart
Card(
elevation: 8,
shadowColor: Colors.red,
child: Container(
width: 100,
height: 100,
color: Colors.teal,
),
)
```
- #### Using `Material`:
```dart
Material(
elevation: 8,
color: Colors.teal,
shadowColor: Colors.red,
borderRadius: BorderRadius.circular(20),
child: SizedBox.square(dimension: 100),
)
```
[1]:
[2]: