Faris Alzayed - Task 3 Done.#4
Faris Alzayed - Task 3 Done.#4FarisAI24 wants to merge 2 commits intoProgramming-Club-IAU:masterfrom
Conversation
Radwan-Albahrani
left a comment
There was a problem hiding this comment.
Loving the dark mode design. Excellent work. Below are my recommendations to improve code modularity, and one recommendation that should improve performance and help later on when API is implemented.
| @@ -0,0 +1,51 @@ | |||
| import 'package:flutter/material.dart'; | |||
|
|
|||
| class WeatherPredModel { | |||
| }); | ||
| } | ||
|
|
||
| List<WeatherPredModel> weatherPredList = [ |
There was a problem hiding this comment.
Good way to add dummy data. Very useful
| ); | ||
| } | ||
|
|
||
| Expanded _weatherDays() { |
There was a problem hiding this comment.
For this function. Instead of making 3 columns for the name, icon, and degree, You can make each weathermodel data a row, and the row contains all this info. That way you will have to use List.generate only once, improving performance.
| return const Row( | ||
| mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
| children: [ | ||
| Column( |
There was a problem hiding this comment.
Every column in this row is repeated. Two recommendations.
- Make that column a modular widget so its easy to reuse it for all the columns you'll make
- Make the row scrollable so you can add more than 4 times. This will be helpful when we start using the API
| ); | ||
| } | ||
|
|
||
| Column weatherStatus() { |
There was a problem hiding this comment.
You can make this widget modular and have it take in all the text as input. This way you'll be able to change it based on the user's location
| ); | ||
| } | ||
|
|
||
| AppBar _appBar() { |
There was a problem hiding this comment.
This is excellent. Removes the app bar clutter from the main stateless widget. Excellent work!
No description provided.