A Flutter application for capturing and uploading photos with offline support and automatic retry capabilities.
Internet connected
Screen_recording_20250113_114241.1.mp4
Internet disconnected
Screen_recording_20250113_114947.1.mp4
-
Photo Capture
- Take photos using device camera
- Automatic EXIF data capture
- Location tagging
-
Smart Upload Management
- Offline queue support
- Automatic upload retry
- Background upload processing
- Queue persistence across app restarts
-
Network Handling
- Automatic connectivity monitoring
- Smart retry on connection restore
-
User Experience
- Real-time upload status
- Connection status indicator
- Upload progress tracking
- Failed upload management
- Flutter SDK (>=3.2.0)
- Dart SDK (>=3.2.0)
- iOS 11.0 or higher (for iOS)
- Android 5.0 (API 21) or higher (for Android)
- Clone the repository:
git clone [repository-url]
cd photo_app- Install dependencies:
flutter pub get- Run the app:
flutter run- State Management
flutter_blocget_itequatablegoogle_fontscupertino_iconscameranative_exifgeolocatorpermission_handlerconnectivity_plushttppath_provider
The app follows a clean architecture pattern with the following structure:
lib/
├── features/
│ ├── camera/
│ │ ├── cubit/
│ │ ├── screens/
│ │ ├── services/
│ │ └── widgets/
│ ├── upload/
│ │ ├── cubit/
│ │ ├── models/
│ │ ├── services/
│ │ └── repositories/
│ └── connectivity/
│ └── widgets/
├── network/
├── common/
└── main.dart
- UploadPhotoQueueService: Manages photo upload queue with retry capabilities and offline support
- ApiClient: Handles HTTP communication with the backend
- UploaderCubit: Manages upload state and coordinates with the queue service
- PermissionCubit: Handles permissions and status
- PhotoTakerCubit: Manages taking photos, and retrieving them to queue
The app implements an upload queue system that:
- Persists queue state across app restarts
- Automatically retries failed uploads
- Handles offline scenarios gracefully
- Provides detailed upload status and progress
Example usage:
final queueService = UploadPhotoQueueService();
// Add photo to queue
queueService.addToQueue(photoPath);
// Process queue
final result = await queueService.processUploadQueue();The app monitors network connectivity and:
- Automatically pauses uploads when offline
- Resumes uploads when connection is restored
- Persists queue during offline periods
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Created by Oleksandr Samoilenko, 2025