Skip to content

Commit 7ea3d18

Browse files
authored
Merge pull request #30 from sumit-coder/ui_work
UI work
2 parents 69b054d + f4e1b6b commit 7ea3d18

File tree

8 files changed

+40
-14
lines changed

8 files changed

+40
-14
lines changed

lib/main.dart

Lines changed: 5 additions & 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/appwrite_service/auth_service.dart';
34
import 'package:help_me_design/providers/component_tab_provider/component_tab_provider.dart';
45
import 'package:help_me_design/providers/explore_tab_provider/explore_tab_provider.dart';
@@ -12,7 +13,10 @@ import 'providers/inspiration_tab_provider/inspiration_tab_provider.dart';
1213
import 'providers/snippet_tab_provider.dart';
1314
import 'views/screens/home_screen/home_screen.dart';
1415

16+
import 'package:url_strategy/url_strategy.dart';
17+
1518
void main() {
19+
setPathUrlStrategy();
1620
runApp(const MyApp());
1721
}
1822

@@ -26,6 +30,7 @@ class MyApp extends StatefulWidget {
2630
class _MyAppState extends State<MyApp> {
2731
@override
2832
Widget build(BuildContext context) {
33+
Animate.restartOnHotReload = true;
2934
return MultiProvider(
3035
providers: [
3136
ChangeNotifierProvider<ThemeManager>(create: (_) => ThemeManager()),

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ class _ComponentViewState extends State<ComponentView> {
182182
UtilityHelper.toastMessage(message: "Code Updated");
183183
}
184184
},
185-
codeText: activeCollectionData[componentTabProvider.activeComponentViewIndex].data['code'],
185+
codeText: activeCollectionData[i].data['code'],
186186
description: '',
187-
title: activeCollectionData[componentTabProvider.activeComponentViewIndex].data['title'],
188-
codeLanguage: activeCollectionData[componentTabProvider.activeComponentViewIndex].data['codeLanguage'],
187+
title: activeCollectionData[i].data['title'],
188+
codeLanguage: activeCollectionData[i].data['codeLanguage'],
189189
),
190190
)
191191
],

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class ExploreView extends StatefulWidget {
2222
}
2323

2424
class _ExploreViewState extends State<ExploreView> {
25+
ScrollController _scrollController = ScrollController();
2526
@override
2627
void initState() {
2728
// TODO: implement initState
@@ -60,13 +61,6 @@ class _ExploreViewState extends State<ExploreView> {
6061
: "assets/images/explore-poster.png",
6162
bgPattern: ExploreTabPatternPainter(74, context),
6263
),
63-
// IconButton(
64-
// onPressed: () {
65-
// // DatabasesService().getDesignResourcesData();
66-
// exploreTapProvider.initDesignResourcesData();
67-
// },
68-
// icon: const Icon(Icons.abc),
69-
// ),
7064
AnimatedSwitcher(
7165
duration: 500.ms,
7266
child: exploreTapProvider.showListItemView ? ExploreListItemView() : ExploreListView(),

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

Lines changed: 11 additions & 1 deletion
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/providers/explore_tab_provider/explore_tab_provider.dart';
34
import 'package:help_me_design/theme/my_design_system.dart';
45
import 'package:help_me_design/theme/my_theme.dart';
@@ -40,7 +41,16 @@ class ExploreListItemView extends StatelessWidget {
4041
title: activeItemData.resourcesList[i].title,
4142
description: activeItemData.resourcesList[i].description,
4243
resourceUrl: activeItemData.resourcesList[i].url,
43-
),
44+
)
45+
.animate()
46+
.scaleXY(
47+
begin: 0.2,
48+
alignment: Alignment.bottomLeft,
49+
)
50+
.then()
51+
.saturate(begin: 0, delay: 100.ms, duration: 400.ms)
52+
.then()
53+
.shakeX(delay: 200.ms, hz: 8, amount: i == 0 ? 4 : 0)
4454
],
4555
),
4656
);

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

Lines changed: 9 additions & 1 deletion
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/providers/explore_tab_provider/explore_tab_provider.dart';
34
import 'package:help_me_design/theme/my_design_system.dart';
45
import 'package:help_me_design/theme/my_theme.dart';
@@ -36,7 +37,14 @@ class ExploreListView extends StatelessWidget {
3637
: designResourcesCollection.data[i].popularResourceUrl,
3738
resourcesCount: designResourcesCollection.data[i].resourcesCount.toString(),
3839
title: designResourcesCollection.data[i].title,
39-
),
40+
)
41+
.animate()
42+
.scaleXY(
43+
begin: 0.2,
44+
alignment: Alignment.bottomLeft,
45+
)
46+
.then()
47+
.saturate(begin: 0, delay: 0.ms, duration: 300.ms)
4048
],
4149
),
4250
);

lib/views/widgets/container_pattern_painter.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class InspirationTabPatternPainter extends CustomPainter {
3131

3232
@override
3333
void paint(Canvas canvas, Size size) {
34-
Crosshatch(
34+
TexturePattern(
3535
bgColor: Colors.transparent,
3636
fgColor: MyColors.actionColor,
3737
featuresCount: featuresCount,
@@ -51,7 +51,7 @@ class ComponentsTabPatternPainter extends CustomPainter {
5151

5252
@override
5353
void paint(Canvas canvas, Size size) {
54-
TexturePattern(
54+
Crosshatch(
5555
bgColor: Colors.transparent,
5656
fgColor: MyColors.actionColor,
5757
featuresCount: featuresCount,

pubspec.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,14 @@ packages:
637637
url: "https://pub.dev"
638638
source: hosted
639639
version: "3.0.6"
640+
url_strategy:
641+
dependency: "direct main"
642+
description:
643+
name: url_strategy
644+
sha256: "42b68b42a9864c4d710401add17ad06e28f1c1d5500c93b98c431f6b0ea4ab87"
645+
url: "https://pub.dev"
646+
source: hosted
647+
version: "0.2.0"
640648
vector_math:
641649
dependency: transitive
642650
description:

pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ dependencies:
5454
file_picker: ^5.3.1
5555

5656
web_scraper: ^0.1.4
57+
url_strategy: ^0.2.0
5758

5859
dev_dependencies:
5960
flutter_test:

0 commit comments

Comments
 (0)