-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.dart
36 lines (33 loc) · 1002 Bytes
/
test.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
import 'package:flutter/material.dart';
class AnimationMarker extends StatelessWidget {
final bool isMoving;
const AnimationMarker({Key? key, required this.isMoving}) : super(key: key);
@override
Widget build(BuildContext context) {
return AnimatedContainer(
duration: const Duration(milliseconds: 500),
curve: Curves.easeInOut,
margin: EdgeInsets.only(bottom: isMoving ? 10.0 : 0.0),
decoration: BoxDecoration(
color: isMoving ? Colors.transparent : Colors.red,
boxShadow: isMoving
? [
BoxShadow(
color: Colors.black.withOpacity(0.3),
blurRadius: 10.0,
spreadRadius: 2.0,
),
]
: [],
),
child: Container(
width: 50.0,
height: 50.0,
decoration: BoxDecoration(
color: isMoving ? Colors.transparent : Colors.red,
shape: BoxShape.circle,
),
),
);
}
}