{"id":741,"date":"2023-07-25T06:25:05","date_gmt":"2023-07-25T06:25:05","guid":{"rendered":"https:\/\/www.devopssupport.in\/blog\/?p=741"},"modified":"2023-07-25T06:25:07","modified_gmt":"2023-07-25T06:25:07","slug":"creating-your-first-project-and-running-hello-world-on-the-emulator","status":"publish","type":"post","link":"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/","title":{"rendered":"Creating Your First Project and Running &#8220;Hello World&#8221; on the Emulator"},"content":{"rendered":"\n<p>Create a New Flutter Project<\/p>\n\n\n\n<p>To create a new Flutter project, run the following command in the terminal.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>flutter create hello_world_app\r\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13.png\" alt=\"\" class=\"wp-image-742\" width=\"444\" height=\"187\" srcset=\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13.png 906w, https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13-300x126.png 300w, https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13-768x324.png 768w, https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13-850x358.png 850w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/figure>\n\n\n\n<p>This command creates a new directory named &#8220;hello_world_app&#8221; with the necessary files and folder structure for a Flutter project.<\/p>\n\n\n\n<p>Depending on your chosen IDE (Android Studio or Visual Studio Code), open the &#8220;hello_world_app&#8221; directory as a Flutter project. Ensure that you have an emulator set up, Open your emulator. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-14.png\" alt=\"\" class=\"wp-image-743\" width=\"444\" height=\"252\" srcset=\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-14.png 862w, https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-14-300x171.png 300w, https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-14-768x437.png 768w, https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-14-850x483.png 850w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/figure>\n\n\n\n<p>In your IDE, click on the &#8220;Run&#8221; button (usually a green triangle) to run the app.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>flutter run\r\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-15.png\" alt=\"\" class=\"wp-image-744\" width=\"448\" height=\"196\" srcset=\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-15.png 708w, https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-15-300x131.png 300w\" sizes=\"auto, (max-width: 448px) 100vw, 448px\" \/><\/figure>\n\n\n\n<p>This will launch the app on the emulator or connected device, and you&#8217;ll see the &#8220;Hello World&#8221; message on the screen.<\/p>\n\n\n\n<p>Open the <code>main.dart<\/code> file located inside the <code>lib<\/code> folder of your project. You will see the following code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import 'package:flutter\/material.dart';\r\n\r\nvoid main() {\r\n  runApp(MyApp());\r\n}\r\n\r\nclass MyApp extends StatelessWidget {\r\n  @override\r\n  Widget build(BuildContext context) {\r\n    return MaterialApp(\r\n      home: Scaffold(\r\n        appBar: AppBar(\r\n          title: Text('Hello World'),\r\n        ),\r\n        body: Center(\r\n          child: Text('Hello World!'),\r\n        ),\r\n      ),\r\n    );\r\n  }\r\n}\r\n<\/code><\/pre>\n\n\n\n<p>The <code>main<\/code> function is the entry point of the Flutter app, and it calls <code>runApp()<\/code> to start the application. The <code>MyApp<\/code> class is a StatelessWidget, which means its UI cannot change after it&#8217;s built.<\/p>\n\n\n\n<p>The <code>MaterialApp<\/code> widget sets up the basic material design for the app, and the <code>Scaffold<\/code> widget provides a basic structure for the app, including an <code>AppBar<\/code> and a <code>body<\/code>.<\/p>\n\n\n\n<p>The <code>Text<\/code> widget inside the <code>Center<\/code> widget displays the &#8220;Hello World!&#8221; message on the screen.<\/p>\n\n\n\n<p>Now that you have successfully run your first Flutter app<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create a New Flutter Project To create a new Flutter project, run the following command in the terminal. This command creates a new directory named &#8220;hello_world_app&#8221; with&#8230; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-741","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Creating Your First Project and Running &quot;Hello World&quot; on the Emulator - DevOps Support<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating Your First Project and Running &quot;Hello World&quot; on the Emulator - DevOps Support\" \/>\n<meta property=\"og:description\" content=\"Create a New Flutter Project To create a new Flutter project, run the following command in the terminal. This command creates a new directory named &#8220;hello_world_app&#8221; with...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/\" \/>\n<meta property=\"og:site_name\" content=\"DevOps Support\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-25T06:25:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-25T06:25:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13.png\" \/>\n<meta name=\"author\" content=\"Avinash kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Avinash kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/\"},\"author\":{\"name\":\"Avinash kumar\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/ee29c62455ded10b2424fb9ca585e347\"},\"headline\":\"Creating Your First Project and Running &#8220;Hello World&#8221; on the Emulator\",\"datePublished\":\"2023-07-25T06:25:05+00:00\",\"dateModified\":\"2023-07-25T06:25:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/\"},\"wordCount\":216,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/\",\"url\":\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/\",\"name\":\"Creating Your First Project and Running \\\"Hello World\\\" on the Emulator - DevOps Support\",\"isPartOf\":{\"@id\":\"https:\/\/www.devopssupport.in\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13.png\",\"datePublished\":\"2023-07-25T06:25:05+00:00\",\"dateModified\":\"2023-07-25T06:25:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/ee29c62455ded10b2424fb9ca585e347\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#primaryimage\",\"url\":\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13.png\",\"contentUrl\":\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13.png\",\"width\":906,\"height\":382},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.devopssupport.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creating Your First Project and Running &#8220;Hello World&#8221; on the Emulator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/#website\",\"url\":\"https:\/\/www.devopssupport.in\/blog\/\",\"name\":\"DevOps Support\",\"description\":\"DevOps Support | DevSecOps Support | SRE Support | MLOps SRE Support\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.devopssupport.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/ee29c62455ded10b2424fb9ca585e347\",\"name\":\"Avinash kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/db01f522798b98f8f474a1dfdd200df1c0e7ada232088d7a8192e14919e4de0a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/db01f522798b98f8f474a1dfdd200df1c0e7ada232088d7a8192e14919e4de0a?s=96&d=mm&r=g\",\"caption\":\"Avinash kumar\"},\"sameAs\":[\"www.linkedin.com\/in\/avinash-kumar-150791240\"],\"url\":\"https:\/\/www.devopssupport.in\/blog\/author\/avinash\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Creating Your First Project and Running \"Hello World\" on the Emulator - DevOps Support","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/","og_locale":"en_US","og_type":"article","og_title":"Creating Your First Project and Running \"Hello World\" on the Emulator - DevOps Support","og_description":"Create a New Flutter Project To create a new Flutter project, run the following command in the terminal. This command creates a new directory named &#8220;hello_world_app&#8221; with...","og_url":"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/","og_site_name":"DevOps Support","article_published_time":"2023-07-25T06:25:05+00:00","article_modified_time":"2023-07-25T06:25:07+00:00","og_image":[{"url":"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13.png","type":"","width":"","height":""}],"author":"Avinash kumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Avinash kumar","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#article","isPartOf":{"@id":"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/"},"author":{"name":"Avinash kumar","@id":"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/ee29c62455ded10b2424fb9ca585e347"},"headline":"Creating Your First Project and Running &#8220;Hello World&#8221; on the Emulator","datePublished":"2023-07-25T06:25:05+00:00","dateModified":"2023-07-25T06:25:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/"},"wordCount":216,"commentCount":0,"image":{"@id":"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#primaryimage"},"thumbnailUrl":"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/","url":"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/","name":"Creating Your First Project and Running \"Hello World\" on the Emulator - DevOps Support","isPartOf":{"@id":"https:\/\/www.devopssupport.in\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#primaryimage"},"image":{"@id":"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#primaryimage"},"thumbnailUrl":"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13.png","datePublished":"2023-07-25T06:25:05+00:00","dateModified":"2023-07-25T06:25:07+00:00","author":{"@id":"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/ee29c62455ded10b2424fb9ca585e347"},"breadcrumb":{"@id":"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#primaryimage","url":"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13.png","contentUrl":"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2023\/07\/image-13.png","width":906,"height":382},{"@type":"BreadcrumbList","@id":"https:\/\/www.devopssupport.in\/blog\/creating-your-first-project-and-running-hello-world-on-the-emulator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.devopssupport.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Creating Your First Project and Running &#8220;Hello World&#8221; on the Emulator"}]},{"@type":"WebSite","@id":"https:\/\/www.devopssupport.in\/blog\/#website","url":"https:\/\/www.devopssupport.in\/blog\/","name":"DevOps Support","description":"DevOps Support | DevSecOps Support | SRE Support | MLOps SRE Support","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.devopssupport.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/ee29c62455ded10b2424fb9ca585e347","name":"Avinash kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.devopssupport.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/db01f522798b98f8f474a1dfdd200df1c0e7ada232088d7a8192e14919e4de0a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/db01f522798b98f8f474a1dfdd200df1c0e7ada232088d7a8192e14919e4de0a?s=96&d=mm&r=g","caption":"Avinash kumar"},"sameAs":["www.linkedin.com\/in\/avinash-kumar-150791240"],"url":"https:\/\/www.devopssupport.in\/blog\/author\/avinash\/"}]}},"_links":{"self":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/comments?post=741"}],"version-history":[{"count":1,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/741\/revisions"}],"predecessor-version":[{"id":745,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/741\/revisions\/745"}],"wp:attachment":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/media?parent=741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/categories?post=741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/tags?post=741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}