Zahra Alnamer- Crushed It 🥇 #3
Zahra Alnamer- Crushed It 🥇 #3ZahraHN-03 wants to merge 3 commits intoProgramming-Club-IAU:masterfrom
Conversation
Radwan-Albahrani
left a comment
There was a problem hiding this comment.
Overall Impressive work, Love the design, and I truly appreciate the amount of time you've put into it. Really Crushed this Task!
Below are some recommendations to improve code readibility and fix some layout mistakes. Overall, Very impressed with what you've accomplished.
You can mark the task as complete!!
lib/main.dart
Outdated
| ), | ||
| ), | ||
| return MaterialApp( | ||
| title: 'Wether App', |
There was a problem hiding this comment.
misspelled
| title: 'Wether App', | |
| title: 'Weather App', |
| ), | ||
| return MaterialApp( | ||
| title: 'Wether App', | ||
| initialRoute: LoginPage.route, |
There was a problem hiding this comment.
Since you are getting the initial route as a parameter in the constructor, why not use it?
| initialRoute: LoginPage.route, | |
| initialRoute: initialRoute, |
| routes: { | ||
| LoginPage.route: (context) => const LoginPage(), | ||
| HomeScreen.route: (context) => const HomeScreen(), | ||
| }, |
There was a problem hiding this comment.
same here. you are getting routes from the constructor
| class MainApp extends StatelessWidget { | ||
| const MainApp({super.key}); | ||
| class MyApp extends StatelessWidget { | ||
| const MyApp({super.key, required initialRoute, required routes}); |
There was a problem hiding this comment.
To access them, you need variables for them
| const MyApp({super.key, required initialRoute, required routes}); | |
| const MyApp({super.key, required this.initialRoute, required this.routes}); | |
| final String initialRoute; | |
| final Map<String, WidgetBuilder> routes; |
| ), | ||
| child: ElevatedButton( | ||
| onPressed: () { | ||
| Navigator.of(context).pushNamed(HomeScreen.route); |
There was a problem hiding this comment.
You were on the right track but stopped. You made a navigatePage function but didn't complete it
| Navigator.of(context).pushNamed(HomeScreen.route); | |
| navigateNextPage(); |
|
|
||
| class _HeaderWidgetState extends State<HeaderWidget> { | ||
| String city = ""; | ||
| String date = DateFormat('EEE, MMM d').format(DateTime.now()); |
There was a problem hiding this comment.
Absolutely great idea displaying the date
lib/widgets/style.dart
Outdated
| @@ -0,0 +1,17 @@ | |||
| import 'package:flutter/material.dart'; | |||
|
|
|||
| class SnowFlakes extends StatelessWidget { | |||
There was a problem hiding this comment.
Usually filename should match widget name
| HomeScreen.route: (context) => const HomeScreen(), | ||
| }, | ||
| home: const LoginPage(), | ||
| ); |
There was a problem hiding this comment.
you forgot to remove debug banner
| ); | |
| debugShowCheckedModeBanner: false, | |
| ); |
| import 'package:get/get.dart'; | ||
| import 'package:geolocator/geolocator.dart'; | ||
|
|
||
| class GlobalController extends GetxController { |
There was a problem hiding this comment.
Fantastic work on the location controller. I would recommend documenting it.
| HourlyDataWidget(), | ||
| DailyData(), | ||
| ], | ||
| ))), |
There was a problem hiding this comment.
commas
| ))), | |
| ),),), |
No description provided.