Skip to content

Commit 517e084

Browse files
committed
added lots of animations
1 parent 860ff79 commit 517e084

File tree

7 files changed

+23
-19
lines changed

7 files changed

+23
-19
lines changed

lib/views/screens/tabs/code_snippet_tab/widgets/code_snippet_list_view.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:dotted_border/dotted_border.dart';
22
import 'package:flutter/material.dart';
3+
import 'package:flutter_animate/flutter_animate.dart';
34
import 'package:help_me_design/appwrite_service/auth_service.dart';
45
import 'package:help_me_design/providers/snippet_tab_provider.dart';
56
import 'package:help_me_design/theme/my_design_system.dart';
@@ -102,6 +103,7 @@ class SnippetsCollectionCard extends StatelessWidget {
102103
child: Container(
103104
height: 154,
104105
width: 300,
106+
clipBehavior: Clip.antiAlias,
105107
padding: EdgeInsets.all(MySpaceSystem.spaceX2),
106108
decoration: BoxDecoration(
107109
color: themeData.colorScheme.secondary,
@@ -129,11 +131,11 @@ class SnippetsCollectionCard extends StatelessWidget {
129131
SizedBox(height: MySpaceSystem.spaceX2),
130132
Text('$snippetsCount', style: themeData.textTheme.bodyMedium),
131133
],
132-
),
134+
).animate().moveX(begin: -154, delay: 200.ms, duration: 400.ms, curve: Curves.easeInOutBack),
133135
],
134136
),
135137
),
136-
);
138+
).animate().scaleXY(begin: 0);
137139
}
138140
}
139141

@@ -191,6 +193,6 @@ class AddCodeSnippetCard extends StatelessWidget {
191193
),
192194
),
193195
),
194-
);
196+
).animate().shake(delay: 1000.ms);
195197
}
196198
}

lib/views/screens/tabs/components_tab/widgets/components_list_view.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ class ComponentCollectionCard extends StatelessWidget {
104104
child: Container(
105105
height: 154,
106106
width: 300,
107+
clipBehavior: Clip.antiAlias,
107108
padding: EdgeInsets.all(MySpaceSystem.spaceX2),
108109
decoration: BoxDecoration(
109110
color: themeData.colorScheme.secondary,
@@ -131,11 +132,11 @@ class ComponentCollectionCard extends StatelessWidget {
131132
SizedBox(height: MySpaceSystem.spaceX2),
132133
Text('$addedAt', style: themeData.textTheme.bodyMedium),
133134
],
134-
),
135+
).animate().moveX(begin: -154, delay: 200.ms, duration: 400.ms, curve: Curves.easeInOutBack),
135136
],
136137
),
137138
),
138-
);
139+
).animate().scaleXY(begin: 0);
139140
}
140141
}
141142

@@ -193,6 +194,6 @@ class AddComponentCollectionCard extends StatelessWidget {
193194
),
194195
),
195196
),
196-
);
197+
).animate().shake(delay: 1000.ms);
197198
}
198199
}

lib/views/screens/tabs/explore_tab/widgets/cards/explore_resource_collection_card.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:flutter/material.dart';
2+
import 'package:flutter_animate/flutter_animate.dart';
23
import 'package:help_me_design/theme/my_design_system.dart';
34
import 'package:help_me_design/theme/my_theme.dart';
45
import 'package:help_me_design/utility/utility_helper.dart';

lib/views/screens/tabs/explore_tab/widgets/explore_list_item_view.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class ExploreListItemView extends StatelessWidget {
4949
)
5050
.then()
5151
.saturate(begin: 0, delay: 100.ms, duration: 400.ms)
52-
.then()
53-
.shakeX(delay: 200.ms, hz: 8, amount: i == 0 ? 4 : 0)
52+
.animate(target: i == 1 ? 1 : 0)
53+
.shake(delay: 800.ms, hz: 5)
5454
],
5555
),
5656
);

lib/views/screens/tabs/explore_tab/widgets/explore_list_view.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,11 @@ class ExploreListView extends StatelessWidget {
3939
title: designResourcesCollection.data[i].title,
4040
)
4141
.animate()
42-
.scaleXY(
43-
begin: 0.2,
44-
alignment: Alignment.bottomLeft,
45-
)
42+
.scaleXY(begin: 0.2, alignment: Alignment.bottomLeft)
4643
.then()
4744
.saturate(begin: 0, delay: 0.ms, duration: 300.ms)
45+
.animate(target: i == 1 ? 1 : 0)
46+
.shake(delay: 800.ms, hz: 5)
4847
],
4948
),
5049
);

lib/views/screens/tabs/inspiration_tab/widgets/inspiration_list_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,6 @@ class AddInspirationCard extends StatelessWidget {
244244
),
245245
),
246246
),
247-
);
247+
).animate().shake(delay: 1000.ms, hz: 5);
248248
}
249249
}

lib/views/widgets/add_icon_with_animation.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ class AddIconWithAnimation extends StatelessWidget {
1515
@override
1616
Widget build(BuildContext context) {
1717
return Container(
18-
child: Icon(
19-
Icons.add_rounded,
20-
color: color,
21-
size: size,
22-
).animate().shakeX(delay: 200.ms, hz: rnd.nextInt(9).toDouble()).shakeY(hz: rnd.nextInt(9).toDouble()),
23-
);
18+
child: Icon(
19+
Icons.add_rounded,
20+
color: color,
21+
size: size,
22+
)
23+
// .animate().shakeX(delay: 200.ms, hz: rnd.nextInt(9).toDouble()).shakeY(hz: rnd.nextInt(9).toDouble()),
24+
);
2425
}
2526
}

0 commit comments

Comments
 (0)