This Flutter application is a sports news app with a login page, a navigation system, and tabs for displaying sports-related content like match results and news.
### Structure Overview:
1. **Main Entry Point**:
- The app starts with the `main()` function, which runs the `MyApp` widget.
- `MyApp` is a `StatelessWidget` that sets up the `MaterialApp`, defining the theme and setting the `LoginPage` as the home screen.
2. **LoginPage**:
- The `LoginPage` widget displays a background image and a button labeled "Sports News."
- When the button is pressed, it navigates to the `News` page using `Navigator.push()`.
3. **News Page**:
- The `News` widget is another `StatelessWidget` wrapped in a `DefaultTabController` that manages two tabs: "Match Results" and "News."
- It has an `AppBar` with a `PopupMenuButton` containing options like "Tournaments," "Upcoming Matches," "Past Matches," and "Login Page." Selecting "Login Page" navigates back to the `LoginPage`.
- The `TabBar` and `TabBarView` widgets manage switching between "Match Results" and "News."
4. **SportsNewsTab**:
- This widget displays a list of sports news items, each contained in a `Container`. Each item includes an image, a brief description, and a "Read More" button that opens an external URL using the `url_launcher` package.
- The background of this page is also an image.
5. **MatchResultsTab**:
- This widget displays match results by date using another `DefaultTabController`. It contains three tabs: "Tomorrow," "Today," and "Yesterday."
- The `MatchResultsByDate` widget is used to display match results for a specific date. Each result is displayed in a custom `MatchResultCard` widget, showing details like team names, score, logos, and league information.
- The match results data is hardcoded in the `_getMatchesForDate` method and filtered by date.
6. **MatchResultCard**:
- This widget is not explicitly shown in the provided code but is assumed to be a custom widget that displays match result details for each match, including the team names, score, logos, and league.
### Key Features:
- **Navigation**: The app uses `Navigator.push()` for navigation between pages (`LoginPage` to `News`).
- **Tabs**: The app has two levels of tabs: one at the top level on the `News` page and another within the "Match Results" tab to switch between different dates.
- **External URL Launching**: The app uses the `url_launcher` package to open sports news articles in the device's web browser.
- **Custom UI**: The UI uses custom styles, images as backgrounds, and widgets to create a visually appealing sports app.
اسم المستقل | Ahmed H. |
عدد الإعجابات | 0 |
عدد المشاهدات | 9 |
تاريخ الإضافة | |
تاريخ الإنجاز |