How moazashrafr2r/news-app works
This is a Flutter news-reading app: users browse articles, filter by category, search, and open article details; the app fetches news from a REST API and uses Cubit with a repository pattern. The README documents the capabilities and stack, but no Dart source was excerpted, so internal Dart calls and data flow are not verified. The graph includes the documented product areas and the sampled Linux runtime entry points; dashed, uncited edges mark inferred wiring.
Main entry points: news_cubit.dart News Cubit · home.dart Home and categories · my_application.cc Flutter GTK host · search.dart Search control
Components 24
Reader experience
- Splash screen
lib/core/screens/splash.dart - Home and categories
lib/core/screens/home.dart - Search control
lib/widgets/search.dart - Article details
lib/core/screens/details_screen.dart - Article card
lib/widgets/article.dart
Application logic
- App router
lib/app_router.dart - Dart entry point
lib/main.dart - News Cubit
lib/core/logic/cubit/news_cubit.dart - News state
lib/core/logic/cubit/news_state.dart
News data
- News repository
lib/core/reposotory.dart - Article model
lib/models/article_model.dart - API consumer
lib/core/network/api_consumer.dart - Dio transport
lib/core/network/dio_consumer.dart - API interceptors
lib/core/network/api_interceptors.dart - API endpoints
lib/core/network/end_porints.dart - Network errors
lib/core/network/errors/exceptions.dart - Error model
lib/core/network/errors/error_model.dart
Linux runtime
- Linux launcher
linux/runner/main.cc - Flutter GTK host
linux/runner/my_application.cc - Host declaration
linux/runner/my_application.h - Plugin registration
linux/flutter/generated_plugin_registrant.cc - Registrar declaration
linux/flutter/generated_plugin_registrant.h
Other components
- Reader
- NewsAPI
Connections 17
- Reader → Splash screen: opens app
- Reader → Home and categories: browses news
- Reader → Search control: searches articles
- Reader → Article details: opens article
- Home and categories → News Cubit: requests news
- Search control → News Cubit: filters articles
- News Cubit → News state: updates state
- News Cubit → News repository: loads articles
- News repository → API consumer: requests data
- API consumer → Dio transport: uses transport
- Dio transport → NewsAPI: fetches news
README.md - Home and categories → Article card: shows articles
- Article details → Article model: presents details
- Linux launcher → Flutter GTK host: creates host
linux/runner/main.cc - Flutter GTK host → Plugin registration: registers plugins
linux/runner/my_application.cc - Flutter GTK host → Host declaration: implements type
linux/runner/my_application.cc - Plugin registration → Registrar declaration: includes declaration
linux/flutter/generated_plugin_registrant.cc