Conversation
There was a problem hiding this comment.
your app was good but here is a few points i would give you.
- file organization but having a widget file and an asset file also would make it easier for you.
- while your code was clean it had a few issues with how you implemented some stuff i tried to point most of them out hope it helps!!
- not very readable try to utilize comments more like you did in your profile page.
|
|
||
| final List<Widget> pages = [ | ||
| HomePage(), | ||
| Scaffold( |
There was a problem hiding this comment.
you don't need the scaffold it doesn't serve any purpose you can get rid of it and replace it with
SearchPage(),
| Scaffold( | |
| SearchPage(), |
| if (_currentIndex == 1) { | ||
| Navigator.of(context) | ||
| .push(MaterialPageRoute( | ||
| builder: (context) => SearchPage(), | ||
| )) | ||
| .then((value) { | ||
| // This code runs after returning from SearchPage | ||
| // You can add any additional logic here | ||
| }); | ||
| } else if (_currentIndex == 2) { | ||
| Navigator.of(context) | ||
| .push(MaterialPageRoute( | ||
| builder: (context) => NotificationsPage(), | ||
| )) | ||
| .then((value) { | ||
| // This code runs after returning from NotificationsPage | ||
| // You can add any additional logic here | ||
| }); | ||
| } else if (_currentIndex == 3) { | ||
| Navigator.of(context) | ||
| .push(MaterialPageRoute( | ||
| builder: (context) => ProfilePage(), | ||
| )) | ||
| .then((value) { | ||
| // This code runs after returning from ProfilePage | ||
| // You can add any additional logic here | ||
| }); |
There was a problem hiding this comment.
this whole code is not needed because the set state already does the job this is just extra.
| Row( | ||
| mainAxisAlignment: MainAxisAlignment.spaceAround, |
There was a problem hiding this comment.
| Row( | |
| mainAxisAlignment: MainAxisAlignment.spaceAround, | |
| SizedBox( | |
| height: 200, | |
| child: ListView( | |
| scrollDirection: Axis.horizontal, |
replace your Row with sized box with a child listview the scrolls horizontally so it doesn't overflow on the side.
| @@ -0,0 +1 @@ | |||
| // TODO Implement this library. No newline at end of file | |||
| @@ -0,0 +1,60 @@ | |||
| import 'package:flutter/material.dart'; | |||
|
|
|||
| class CardRow extends StatelessWidget { | |||
There was a problem hiding this comment.
| class CardRow extends StatelessWidget { | |
| class pagesRow extends StatelessWidget { |
better if the name of the class has the name of the page.
| @@ -0,0 +1,60 @@ | |||
| import 'package:flutter/material.dart'; | |||
There was a problem hiding this comment.
since this is a widget it should be in a widget file instead.
| @@ -0,0 +1,76 @@ | |||
| import 'package:flutter/material.dart'; | |||
There was a problem hiding this comment.
since this is a widget it should be in a widget file instead.
task2 four pages home page, search page, notifications page, and profile page.