{"id":31079667,"url":"https://github.com/naimcode/flutter-starter-kit","last_synced_at":"2025-09-16T10:54:04.941Z","repository":{"id":314521899,"uuid":"945674848","full_name":"NaimCode/flutter-starter-kit","owner":"NaimCode","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-12T23:09:59.000Z","size":366,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-13T01:11:19.076Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NaimCode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-10T00:06:19.000Z","updated_at":"2025-09-12T23:10:03.000Z","dependencies_parsed_at":"2025-09-13T01:11:25.451Z","dependency_job_id":"6fb027ec-ef39-4848-b433-9a06eadbc3fd","html_url":"https://github.com/NaimCode/flutter-starter-kit","commit_stats":null,"previous_names":["naimcode/flutter-starter-kit"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/NaimCode/flutter-starter-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NaimCode%2Fflutter-starter-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NaimCode%2Fflutter-starter-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NaimCode%2Fflutter-starter-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NaimCode%2Fflutter-starter-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NaimCode","download_url":"https://codeload.github.com/NaimCode/flutter-starter-kit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NaimCode%2Fflutter-starter-kit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275407129,"owners_count":25459377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-16T02:00:10.229Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-16T10:54:01.822Z","updated_at":"2025-09-16T10:54:04.930Z","avatar_url":"https://github.com/NaimCode.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Table of Contents\n- [Table of Contents](#table-of-contents)\n- [Architecture](#architecture)\n- [Authentication](#authentication)\n- [Deep Linking](#deep-linking)\n- [Background Tasks](#background-tasks)\n- [Offline Downloads](#offline-downloads)\n- [Notifications](#notifications)\n- [Remote Configuration](#remote-configuration)\n- [AI Chat Integration](#ai-chat-integration)\n- [Permission Management](#permission-management)\n- [Analytics \\\u0026 Monitoring](#analytics--monitoring)\n- [Adaptive Theming](#adaptive-theming)\n- [Socket Communication](#socket-communication)\n- [In-App Messaging](#in-app-messaging)\n- [Getting Started](#getting-started)\n- [Dependencies](#dependencies)\n\n## Architecture\nThis app follows a layered architecture with separation of concerns:\n- **Core Layer**: Contains services, repositories and domain logic\n- **Presentation Layer**: UI components and screens\n- **Infrastructure Layer**: External integrations\n\n## Authentication\n\nThe app supports multiple auth methods via Firebase Auth:\n\n```dart\n// Sign in with email/password\nawait AuthProvider().signInWithEmailPassword('email@example.com', 'password');\n\n// Sign in with Google\nawait AuthProvider().signInWithGoogle();\n\n// Sign out\nawait AuthProvider().signOut();\n```\n\nAccess current user:\n```dart\nfinal user = AuthProvider().currentUser;\nif (user != null) {\n  // User is signed in\n}\n```\n\n## Deep Linking\n\nThe app handles deep links and universal links for seamless navigation:\n\n```dart\n// All setup is managed by DeepLinkHandler\n\n// To navigate to a specific route from a link:\n_appRouter.router.push('/path/to/route');\n\n// Testing deep links:\n// iOS: xcrun simctl openurl booted \"yourapp://path/to/route\"\n// Android: adb shell am start -a android.intent.action.VIEW -d \"yourapp://path/to/route\"\n```\n\n## Background Tasks\n\nFor operations that need to run in the background:\n\n```dart\n// Queue a background task\nawait BackgroundTaskQueue().enqueue(\n  BackgroundTask(\n    type: 'form_upload',\n    payload: {\n      'formId': 'user-submission-123',\n      'images': ['/path/to/image1.jpg', '/path/to/image2.jpg'],\n    },\n    priority: TaskPriority.high,\n  ),\n);\n\n// Register task handler\nBackgroundTaskQueue().registerTaskHandler('form_upload', FormUploadHandler());\n```\n\n## Offline Downloads\n\nDownload and manage files for offline use:\n\n```dart\n// Initialize download manager\nawait DownloadManager().initialize();\n\n// Start a download\nfinal task = await DownloadManager().downloadFile(\n  url: 'https://example.com/music.mp3',\n  fileName: 'awesome_song.mp3',\n  title: 'Awesome Song',\n  artist: 'Great Artist',\n  albumArt: 'https://example.com/album_cover.jpg',\n);\n\n// Pause download\nawait DownloadManager().pauseDownload(task.id);\n\n// Resume download\nawait DownloadManager().resumeDownload(task.id);\n\n// Delete download\nawait DownloadManager().deleteDownload(task.id);\n\n// Play downloaded file\nawait MusicPlayerService().playDownloadedTrack(task.id);\n\n// Get all downloads\nfinal allDownloads = DownloadManager().getAllDownloads();\n```\n\nNavigate to downloads screen:\n```dart\nNavigator.pushNamed(context, 'downloads');\n```\n\nAdd download button to your UI:\n```dart\nDownloadButton(\n  url: 'https://example.com/music.mp3',\n  fileName: 'awesome_song.mp3',\n  title: 'Awesome Song',\n  artist: 'Great Artist',\n  albumArt: 'https://example.com/album_cover.jpg',\n),\n```\n\n## Notifications\n\nHandle push notifications with Firebase Messaging:\n\n```dart\n// Initialize notification service\nawait NotificationService().initialize(\n  onMessageOpenedApp: (message) {\n    // Handle notification tap when app in background\n    if (message.data.containsKey('route')) {\n      _appRouter.router.pushNamed(message.data['route']);\n    }\n  },\n);\n\n// Show local notification\nawait NotificationService().showNotification(\n  title: 'Task Complete',\n  body: 'Your background task has finished',\n  payload: {'route': 'task-details/123'},\n);\n```\n\n## Remote Configuration\n\nManage app features and settings remotely:\n\n```dart\n// Initialize remote config\nawait RemoteConfigService().initialize();\n\n// Get string value\nString apiKey = RemoteConfigService().getString('api_key');\n\n// Get bool value\nbool isBetaEnabled = RemoteConfigService().isFeatureEnabled('beta_features');\n\n// Get numeric value\ndouble refreshInterval = RemoteConfigService().getDouble('refresh_interval');\n```\n\n## AI Chat Integration\n\nIntegrate AI conversations into your app:\n\n```dart\n// Initialize AI service\nawait AIService().initialize(\n  openAIKey: 'your_openai_api_key',\n  defaultModel: 'gpt-3.5-turbo',\n);\n\n// Send message to AI\nfinal response = await AIService().sendMessage(\n  'Hello, what can you do?',\n  model: 'gpt-3.5-turbo',\n);\n\n// Get response content\nprint(response.content);\n\n// Navigate to chat screen\nNavigator.pushNamed(context, 'ai-chat');\n```\n\n## Permission Management\n\nHandle runtime permissions elegantly:\n\n```dart\n// Request permission\nfinal isGranted = await PermissionsService().requestPermission(\n  Permission.camera,\n  rationaleMessage: 'We need camera access to scan QR codes',\n);\n\n// Check permission status\nfinal status = await PermissionsService().checkPermission(Permission.camera);\n\n// Request multiple permissions\nfinal results = await PermissionsService().requestPermissions(\n  [Permission.camera, Permission.location],\n);\n```\n\n## Analytics \u0026 Monitoring\n\nTrack user behavior and app performance:\n\n```dart\n// Log event\nAnalyticsService().logEvent(\n  name: 'button_clicked',\n  parameters: {'button_id': 'login_button'},\n);\n\n// Log screen view\nAnalyticsService().logScreenView('HomeScreen');\n\n// Track error\nAnalyticsService().logError('Failed to load data', StackTrace.current);\n\n// Start performance trace\nfinal trace = PerformanceService().startTrace('data_loading');\n// ... perform operation\ntrace.stop();\n```\n\n## Adaptive Theming\n\nThe app supports light and dark themes with dynamic customization:\n\n```dart\n// Theme is applied based on app config or system preference in main.dart\nThemeMode themeMode = AppTheme().getThemeMode();\n\n// Force theme mode\n// In settings screen\nThemeProvider().setThemeMode(ThemeMode.dark);\n\n// Clear theme cache when remote config changes\nAppTheme().clearCache();\n```\n\n## Socket Communication\n\nReal-time communication with WebSockets:\n\n```dart\n// Connect to socket\nawait SocketService().connect('wss://example.com/socket');\n\n// Listen to events\nSocketService().on('new_message', (data) {\n  // Handle incoming message\n});\n\n// Send message\nSocketService().emit('send_message', {\n  'text': 'Hello!',\n  'timestamp': DateTime.now().toIso8601String(),\n});\n\n// Disconnect\nSocketService().disconnect();\n```\n\n## In-App Messaging\n\nDisplay banners, modals and announcements:\n\n```dart\n// Show banner message\nBannerManager().showBanner(\n  title: 'New Feature Available',\n  message: 'Try our new chat experience!',\n  action: BannerAction(\n    label: 'Try it',\n    onPressed: () =\u003e Navigator.pushNamed(context, 'ai-chat'),\n  ),\n  duration: const Duration(seconds: 5),\n);\n\n// Show modal\nBannerManager().showModal(\n  title: 'Subscription Required',\n  message: 'Get access to premium features',\n  primaryAction: BannerAction(\n    label: 'Subscribe',\n    onPressed: () =\u003e Navigator.pushNamed(context, 'subscription'),\n  ),\n  secondaryAction: BannerAction(\n    label: 'Not Now',\n    onPressed: () =\u003e Navigator.pop(context),\n  ),\n);\n\n// Check for announcements from Remote Config\nInAppMessagingService().showAnnouncementIfAvailable(context);\n```\n\n## Getting Started\n\n1. Clone the repository\n2. Run `flutter pub get` to install dependencies\n3. Set up your Firebase project and add google-services.json/GoogleService-Info.plist\n4. Configure your API keys in a secure way\n5. Run the app with `flutter run`\n\n## Dependencies\n\nSee the pubspec.yaml file for a complete list of dependencies.\n# flutter-starter-kit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaimcode%2Fflutter-starter-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaimcode%2Fflutter-starter-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaimcode%2Fflutter-starter-kit/lists"}