SmartPDF is an all-in-one PDF tools mobile app built with Flutter and Material 3 design. The app allows users to merge, split, compress, and protect PDF files, as well as convert images to PDF format.
- Merge PDF - Combine multiple PDF files into one document
- Split PDF - Extract specific pages from PDF documents with individual file access
- Compress PDF - Reduce file size without losing quality
- Lock/Unlock PDF - Add or remove password protection (Rewarded Ad)
- Image to PDF - Convert images to PDF format (Rewarded Ad)
- More Tools - Coming soon placeholder
This project uses a Git submodule architecture for better code organization:
- Main Repository:
smart-pdf- Contains the Flutter app and UI - Submodule:
spdfcore- Contains the Rust PDF processing engine using lopdf
The spdfcore directory is a Git submodule pointing to:
- Repository:
git@github.com:elsadeny/spdfcore.git - Latest commit: Uses
core.rsfunctions for reliable PDF operations - FFI Bridge: Flutter Rust Bridge for seamless Dart-Rust integration
- Material 3 design system
- Custom color scheme: Primary
#0057FF, Secondary#F1F3F6, Accent#66A3FF - Inter font family for clean typography
- Animated splash screen with gradient background
- 2-column tool grid with rounded cards
- Bottom navigation (Home, Files, About)
- Floating Action Button for recent files
The app includes comprehensive AdMob integration:
- Native Ad - Home screen below tools grid
- Interstitial Ad - After successful file operations
- Rewarded Ad - For Lock/Unlock and Image to PDF tools
- Banner Ad - Files screen and About screen
- SmartPDF logo with animation
- Gradient background (#0057FF β #66A3FF)
- Auto-navigation after 2 seconds
- Search bar for filtering tools
- 2-column grid of tool cards
- Native AdMob ad placement
- Bottom navigation
- Step-by-step file processing UI
- File picker with multiple selection
- Reorderable file list (for merge)
- Progress overlay during processing
- Results screen with statistics
- Share and open functionality
- Recent files list with file info
- File actions (open, share, delete)
- Clear history functionality
- Banner ad placement
- App information and features
- Legal links (Privacy Policy, Terms)
- Support and contact information
- Version details
lib/
βββ main.dart # App entry point
βββ models/
β βββ pdf_tool.dart # Tool data model
βββ screens/
β βββ splash_screen.dart # Animated splash screen
β βββ home_screen.dart # Main home screen
β βββ tool_screen.dart # Reusable tool screen
β βββ files_screen.dart # Recent files screen
β βββ about_screen.dart # About and info screen
βββ widgets/
β βββ tool_card.dart # Tool grid card widget
β βββ file_list_item.dart # File list item widget
β βββ progress_overlay.dart # Processing overlay
βββ services/
β βββ ad_service.dart # AdMob service
βββ theme/
βββ app_theme.dart # Material 3 theme
assets/
βββ images/ # App images and icons
βββ animations/ # Lottie animations
βββ icons/ # Custom icons
βββ fonts/ # Inter font family
android/
βββ app/
βββ build.gradle # Android build config
βββ src/main/
βββ AndroidManifest.xml # Android permissions & config
- Flutter SDK (latest stable)
- Android Studio / VS Code
- Android device or emulator
-
Clone the repository
cd /Users/sadeny/Documents/devop/aga -
Install dependencies
flutter pub get
-
Configure AdMob
- Replace test ad unit IDs in
lib/services/ad_service.dart - Update AdMob App ID in
android/app/src/main/AndroidManifest.xml
- Replace test ad unit IDs in
-
Run the app
flutter run
-
Create app bundle
flutter build appbundle
-
Create APK
flutter build apk --release
flutter- Flutter frameworkmaterial_color_utilities- Material 3 colorsgoogle_mobile_ads- AdMob integrationfile_picker- File selectionpath_provider- File system accesspermission_handler- Android permissionsprovider- State managementshare_plus- File sharingurl_launcher- External links
pdf- PDF generation and manipulationprinting- PDF viewing and printingimage- Image processing
lottie- Lottie animations
- Create AdMob account and app
- Replace test ad unit IDs in
ad_service.dart:static const String _prodBannerAdUnitId = 'ca-app-pub-YOUR_APP_ID/banner'; static const String _prodInterstitialAdUnitId = 'ca-app-pub-YOUR_APP_ID/interstitial'; static const String _prodRewardedAdUnitId = 'ca-app-pub-YOUR_APP_ID/rewarded'; static const String _prodNativeAdUnitId = 'ca-app-pub-YOUR_APP_ID/native';
- Update app ID in
AndroidManifest.xml:<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-YOUR_ACTUAL_APP_ID~1234567890"/>
- Set test mode to false for production:
static const bool _testMode = false;
The app requires these permissions (already configured):
INTERNET- For AdMobACCESS_NETWORK_STATE- For ad loadingREAD_EXTERNAL_STORAGE- For file accessWRITE_EXTERNAL_STORAGE- For saving filesMANAGE_EXTERNAL_STORAGE- For Android 11+
- Custom color scheme based on seed color
- Typography using Inter font family
- Rounded corners and modern card designs
- Proper elevation and shadows
- File Selection - FilePicker for PDFs/images
- File Management - Reorderable list for merge operations
- Processing - Progress overlay with animations
- Results - Statistics and action buttons
- Ad Integration - Interstitial ads after operations
- Service-based architecture for centralized ad management
- Multiple ad types with proper lifecycle management
- Test/Production modes for development and release
- Error handling and fallback scenarios
- Provider pattern for AdMob service
- StatefulWidget for screen-level state
- Proper disposal of resources
- Test with AdMob test ads during development
- Use Android emulator or physical device
- Hot reload for UI changes
- Debug mode for detailed logging
- Build release only when ready for production
- Android: Minimum SDK 21 (Android 5.0)
- iOS: Not yet configured (can be added)
- Local processing - All files processed on device
- No cloud uploads - Files remain private
- Minimal permissions - Only required permissions requested
- Privacy policy - Link provided in About screen
- Consistent design across all screens
- Intuitive navigation with bottom tabs
- Visual feedback for all interactions
- Loading states for async operations
- Error handling with user-friendly messages
- Accessibility considerations
- Efficient animations with proper disposal
- Lazy loading for file lists
- Memory management for large files
- Background processing for file operations
- Flutter SDK (>=3.0.0)
- Rust toolchain
- Android SDK for building
git clone --recursive git@github.com:elsadeny/smart-pdf.git
cd smart-pdfgit submodule init
git submodule update./build.shflutter pub get
flutter runUpdate Submodule to Latest:
cd spdfcore
git pull origin main
cd ..
git add spdfcore
git commit -m "Update spdfcore submodule"Switch Submodule Branch:
cd spdfcore
git checkout <branch-name>
cd ..
git add spdfcore
git commit -m "Switch spdfcore to <branch-name>"- More PDF tools (OCR, watermark, etc.)
- Cloud integration (Google Drive, Dropbox)
- Batch processing for multiple operations
- Advanced compression algorithms
- iOS support and publishing
- Dark theme support
- Localization for multiple languages
Built with β€οΈ using Flutter and Material 3
For support or questions, contact: support@smartpdf.app