A modern Flutter application that delivers news content from WordPress sites with an integrated in-app browser experience. This app provides a seamless, engaging experience for reading and interacting with WordPress-based news content without leaving the app ecosystem.
- Clean Article Display: Optimized typography and layout for comfortable reading
- Featured Images: High-quality image display with caching and error handling
- Text-to-Speech: Built-in TTS functionality with customizable voice settings
- Reading Progress: Visual progress indicator and position saving
- Social Media Embeds: Integrated display of Twitter, Instagram, and Facebook content
- WebView Integration: Browse external links without leaving the app
- Smart Link Handling: User choice between in-app and external browser
- Network Error Recovery: Intelligent error handling with retry mechanisms
- Navigation Controls: Back, forward, refresh, and share functionality
- Connectivity Monitoring: Real-time network status detection
- Bookmarks System: Save articles for later reading with persistent storage
- Related Posts: AI-powered content recommendations based on categories and keywords
- Article Sharing: Native sharing functionality across platforms
- Custom Fields Support: Display additional WordPress ACF data
- Responsive Design: Optimized for various screen sizes and orientations
- Modern Material Design: Clean, intuitive interface following Material Design principles
- Loading States: Smooth loading animations and progress indicators
- Error Handling: User-friendly error messages with recovery options
- Flutter Framework: Cross-platform mobile development
- Provider Pattern: State management and data flow
- WordPress REST API: Content delivery and management
- WebView Flutter: In-app browser functionality
- Connectivity Plus: Network monitoring and detection
- Post Detail Screen: Enhanced article reading experience
- WebView Screen: Full-featured in-app browser
- Link Handler: Smart URL management and routing
- Network Helper: Connectivity testing and error recovery
- Bookmark System: Persistent article storage
- Flutter SDK (3.0+)
- Dart SDK (3.0+)
- Android Studio / VS Code
- Git
-
Clone the repository:
git clone https://github.com/Thiararapeter/wpnewsapp.git
-
Navigate to project directory:
cd wpnewsapp -
Install dependencies:
flutter pub get
-
Run the app:
flutter run
lib/
βββ config/
β βββ app_settings.dart # Theme and app configuration
βββ models/
β βββ post.dart # Article data model
β βββ comment.dart # Comment data model (removed)
βββ providers/
β βββ posts_provider.dart # Article state management
β βββ comments_provider.dart # Comment provider (removed)
βββ screens/
β βββ post_detail_screen.dart # Enhanced article reading
β βββ webview_screen.dart # In-app browser
β βββ home_screen.dart # Main app screen
βββ services/
β βββ wordpress_service.dart # WordPress API integration
βββ utils/
β βββ link_handler.dart # Smart URL management
β βββ network_helper.dart # Connectivity utilities
βββ widgets/
βββ bookmark_button.dart # Bookmark functionality
βββ social_media_embed.dart # Social media integration
βββ tts_test_widget.dart # Text-to-speech testing
- Flutter - Cross-platform UI framework
- Provider - State management solution
- WebView Flutter - In-app browser functionality
- Connectivity Plus - Network monitoring
- Cached Network Image - Image caching and loading
- Flutter HTML - HTML content rendering
- Flutter TTS - Text-to-speech functionality
- Shared Preferences - Local data storage
- Share Plus - Native sharing functionality
- URL Launcher - External URL handling
- Intl - Internationalization and date formatting
- Browse Articles: Scroll through the main feed to discover content
- Open Article: Tap any article to open the detailed reading view
- Read Full Article: Use the "Read Full Article" button to view the complete content in the in-app browser
- Text-to-Speech: Long-press the TTS button to access voice settings, then tap to listen
- Bookmark: Tap the bookmark icon to save articles for later reading
- Smart Link Handling: When tapping links, choose between in-app or external browser
- Navigation: Use back/forward buttons to navigate between pages
- Share Content: Share interesting pages directly from the browser
- Network Issues: Automatic retry and fallback options for connectivity problems
- TTS Settings: Adjust volume, speed, and pitch for optimal listening experience
- Reading Position: App automatically saves your reading progress
- Bookmarks: Access saved articles from the bookmarks section
The app connects to WordPress sites via REST API. Configure your WordPress endpoint in:
// lib/services/wordpress_service.dart
static const String baseUrl = 'YOUR_WORDPRESS_SITE_URL';Modify app appearance in:
// lib/config/app_settings.dart
class AppSettings {
static final theme = AppTheme(
primaryColor: Colors.blue,
// ... other theme properties
);
}- Connection Problems: App automatically detects and handles network issues
- WebView Errors: Use "Try Again" button or "Open in Browser" option
- Slow Loading: Check internet connection and try refreshing
- Memory Usage: Images are cached automatically for better performance
- Battery Life: TTS and WebView are optimized for minimal battery drain
- Storage: Bookmarks and reading positions are stored locally
This project is licensed under the MIT License - see the LICENSE file for details.
Peter Thiarara
- Website: thiarara.co.ke
- GitHub: @Thiararapeter
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Flutter Team for the amazing framework
- WordPress REST API Documentation
- WebView Flutter plugin contributors
- All contributors who help improve this project
For issues, questions, or feature requests:
- GitHub Issues: Create an issue
- Documentation: Check the code comments and inline documentation
- Community: Join discussions in the repository
Built with β€οΈ using Flutter