{"id":27696961,"url":"https://github.com/rmawatson/flutter_startup","last_synced_at":"2025-04-25T15:26:35.229Z","repository":{"id":56830236,"uuid":"170709822","full_name":"rmawatson/flutter_startup","owner":"rmawatson","description":"Provides iOS startup reasons to flutter","archived":false,"fork":false,"pushed_at":"2019-02-18T04:06:34.000Z","size":69,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-25T15:26:34.402Z","etag":null,"topics":["dart","flutter","flutter-plugin","flutter-plugins"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rmawatson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-14T15:05:26.000Z","updated_at":"2022-06-18T19:16:30.000Z","dependencies_parsed_at":"2022-09-02T04:00:35.400Z","dependency_job_id":null,"html_url":"https://github.com/rmawatson/flutter_startup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmawatson%2Fflutter_startup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmawatson%2Fflutter_startup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmawatson%2Fflutter_startup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmawatson%2Fflutter_startup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmawatson","download_url":"https://codeload.github.com/rmawatson/flutter_startup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250842756,"owners_count":21496295,"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","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":["dart","flutter","flutter-plugin","flutter-plugins"],"created_at":"2025-04-25T15:26:32.578Z","updated_at":"2025-04-25T15:26:35.223Z","avatar_url":"https://github.com/rmawatson.png","language":"Dart","readme":"# flutter_startup\n\nProvides access to the iOS startup reasons. The intented application is to control the behavior of the main isolate based on why the app was started. For example, when using `bluetooth-central` background mode, with an active background scan, if the app is killed and there is an event to be handled for the bluetooth `centralManger`, iOS will relauch the app for a limited period of time to handle the event. \n\nUsing the flutter_startup the main isolate can branch on the startup reason to perform some other task before the application is killed  (about 10 seconds for the `UIApplicationLaunchOptionsBluetoothCentralsKey` in this case), or it gracefully exit itself.\n\n# Usage\n```\nvoid main() async {\n  print(\"${await FlutterStartup.startupReason}\");\n}\n```\nwhere `startupReason` is one of;\n\n```\nFlutterStartup.StartupReasonUser                      = \"User\"\nFlutterStartup.iOSStartupReasonAnnotation             = \"UIApplicationLaunchOptionsAnnotationKey\"            \nFlutterStartup.iOSStartupReasonBluetoothCentrals      = \"UIApplicationLaunchOptionsBluetoothCentralsKey\"      \nFlutterStartup.iOSStartupReasonBluetoothPeripherals   = \"UIApplicationLaunchOptionsBluetoothPeripheralsKey\"   \nFlutterStartup.iOSStartupReasonCloudKitShareMetadata  = \"UIApplicationLaunchOptionsCloudKitShareMetadataKey\" \nFlutterStartup.iOSStartupReasonLocalNotification      = \"UIApplicationLaunchOptionsLocalNotificationKey\"      \nFlutterStartup.iOSStartupReasonLocation               = \"UIApplicationLaunchOptionsLocationKey\"               \nFlutterStartup.iOSStartupReasonNewsstandDownloads     = \"UIApplicationLaunchOptionsNewsstandDownloadsKey\"     \nFlutterStartup.iOSStartupReasonRemoteNotification     = \"UIApplicationLaunchOptionsRemoteNotificationKey\"     \nFlutterStartup.iOSStartupReasonShortcutItem           = \"UIApplicationLaunchOptionsShortcutItemKey\"           \nFlutterStartup.iOSStartupReasonSourceApplication      = \"UIApplicationLaunchOptionsSourceApplicationKey\"      \nFlutterStartup.iOSStartupReasonURL                    = \"UIApplicationLaunchOptionsURLKey\"                 \nFlutterStartup.iOSStartupReasonUserActivityDictionary = \"UIApplicationLaunchOptionsUserActivityDictionaryKey\"\nFlutterStartup.iOSStartupReasonUserActivityType       = \"UIApplicationLaunchOptionsUserActivityTypeKey\"   \nFlutterStartup.iOSStartupReasonUser                   = StartupReasonUser    \nFlutterStartup.AndroidStartupReasonUser               = StartupReasonUser\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmawatson%2Fflutter_startup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmawatson%2Fflutter_startup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmawatson%2Fflutter_startup/lists"}