{"id":20105,"date":"2020-12-21T11:05:42","date_gmt":"2020-12-21T11:05:42","guid":{"rendered":"http:\/\/www.devopsschool.com\/blog\/?p=20105"},"modified":"2020-12-21T11:09:25","modified_gmt":"2020-12-21T11:09:25","slug":"how-to-check-if-an-application-is-on-its-first-run-or-one-time-intro-screen-with-flutter","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/how-to-check-if-an-application-is-on-its-first-run-or-one-time-intro-screen-with-flutter\/","title":{"rendered":"How to Check if an application is on its first run or One time Intro Screen with Flutter."},"content":{"rendered":"\n<p>If you wish to show the intro screen only for the first time, you will need to save locally that this user has already seen intro.<\/p>\n\n\n\n<p>For such thing you may use Shared Preference. There is a flutter package <a rel=\"noreferrer noopener\" href=\"https:\/\/pub.dev\/packages\/shared_preferences\" data-type=\"URL\" data-id=\"https:\/\/pub.dev\/packages\/shared_preferences\" target=\"_blank\"><strong><span class=\"has-inline-color has-vivid-red-color\">Shared Preferences<\/span><\/strong><\/a> which you can use.<\/p>\n\n\n\n<p>Please refer to the below complete tested code to understand how to use it:<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/SushantSinghRajput03\/302b7864f0692ca5f6044388aa22e640.js\"><\/script>\n\n\n\n<p>You will need to install the package <strong><a rel=\"noreferrer noopener\" href=\"https:\/\/pub.dev\/packages\/after_layout\" data-type=\"URL\" data-id=\"https:\/\/pub.dev\/packages\/after_layout\" target=\"_blank\"><span class=\"has-inline-color has-vivid-red-color\">after_layout<\/span><\/a> <\/strong>.<\/p>\n\n\n\n<p>That&#8217;s All.<\/p>\n\n\n\n<p>Thanks for Reading.<\/p>\n\n\n\n<p>Keep Coding.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/11\/Keep_coding-3.gif\" alt=\"\" class=\"wp-image-19433\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>If you wish to show the intro screen only for the first time, you will need to save locally that this user has already seen intro. For such thing you&#8230; <\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[6331],"tags":[6534,6203,6533,6532],"class_list":["post-20105","post","type-post","status-publish","format-standard","hentry","category-flutter","tag-application-is-on-its-first-run","tag-flutter","tag-intro-screen-with-flutter","tag-one-time-intro-screen"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/20105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=20105"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/20105\/revisions"}],"predecessor-version":[{"id":20110,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/20105\/revisions\/20110"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=20105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=20105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=20105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}