<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: kpheine</title>
    <description>The latest articles on DEV Community by kpheine (@kpheine).</description>
    <link>https://dev.to/kpheine</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F306553%2Faa655c10-565d-41c4-b775-65aeee3e733e.png</url>
      <title>DEV Community: kpheine</title>
      <link>https://dev.to/kpheine</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kpheine"/>
    <language>en</language>
    <item>
      <title>How to start a Flutter project (even with your low end computer) - A self tale</title>
      <dc:creator>kpheine</dc:creator>
      <pubDate>Tue, 21 Jan 2020 11:54:01 +0000</pubDate>
      <link>https://dev.to/kpheine/how-to-start-a-flutter-project-even-with-your-low-end-computer-a-self-tale-5b2f</link>
      <guid>https://dev.to/kpheine/how-to-start-a-flutter-project-even-with-your-low-end-computer-a-self-tale-5b2f</guid>
      <description>&lt;p&gt;As many Jr developers do, I've always flirted with the idea of being a mobile developer. And as we were approaching a new year, I decided to dive in this idea. Searched for some ways to start and really liked this dart flutter thing people were talking about. As a React developer, I felt that React Native would be "more of the same", and to be honest, I am always hyped about learning something new.&lt;br&gt;
First things first, I was really focused in getting a really nice environment setup. No long build times, no autofill with weird suggestions, just me and my code and my debug version. So this is what I got after some digging, and I think it looks great!&lt;/p&gt;
&lt;h2&gt;
  
  
  1 - VS Code
&lt;/h2&gt;

&lt;p&gt;Most programmers IDE of choice, and mine as well. there are some extensions to really get you up and running:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dart and Flutter&lt;/strong&gt; - Your bread and butter, these extensions are the basic, made by the Dart Code team, they have it all, snippets, debbuging, a smart autofill, auto commands for getting packages on save. They really made a great extension.&lt;/p&gt;

&lt;p&gt;And thats it! These are the only mobile specific extensions I had to use besides common plugins I use for everything, like &lt;strong&gt;indent-rainbow&lt;/strong&gt; and &lt;strong&gt;Todo Tree&lt;/strong&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  2 - Android Studio
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;"Wait, we're using two IDEs?"&lt;/em&gt; you might ask. But nope, we'll be using Android Studio just for managing our SDKs and emulate an Android via the Android Virtual Device (AVD). And this is how we do it:&lt;/p&gt;

&lt;p&gt;It is really easy, just follow the &lt;a href="[https://link](https://developer.android.com/studio/install)"&gt;installation guide&lt;/a&gt; and default setups. A key point is setting which SDKs you'll want to install, I definitely reccomend sticking to SDK 27 and up for compatibility reasons.&lt;/p&gt;

&lt;p&gt;If you have a PC with good emulation specs, you can setup your virtual devices now, we'll talk more about it on sequence.&lt;/p&gt;


&lt;h2&gt;
  
  
  3 - Getting it running
&lt;/h2&gt;

&lt;p&gt;Now &lt;strong&gt;this&lt;/strong&gt; is the main point of this article, getting your app to run smoothly. You have basically two options for Android, running a virtual device (AVD) or on your own smartphone.&lt;/p&gt;
&lt;h3&gt;
  
  
  Android Virtual Device
&lt;/h3&gt;

&lt;p&gt;The AVD is the most straightforward, just launch the Android emulator (you can do it via Android Studio or when you start the VS Code debug) and it automatically connects!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Foisuytgrlvmezve9rdp7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Foisuytgrlvmezve9rdp7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;One of my earliest apps getting to know flutter (not despicted: my computer crying and freezing from running this emulator)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If your PC is not very font of emulating smartphones (like my laptop), you can choose the second option:&lt;/p&gt;
&lt;h3&gt;
  
  
  Running on a physical device (USB)
&lt;/h3&gt;

&lt;p&gt;Now this one is tricky, but also the best option for low end PC users. First you need to &lt;strong&gt;enable Developer options&lt;/strong&gt; on your device.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Settings &amp;gt;  System &amp;gt; About Phone&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Build number&lt;/strong&gt; 7 times&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Congratulations! Now you're offically an Android Developer, at least for your phone. Now go to Developer Options and &lt;strong&gt;activate USB debbuging&lt;/strong&gt;. Connect your phone to your PC, it will prompt you to allow debbuging on the smartphone, tap "Ok".&lt;br&gt;
Now you re good to go! You can confirm by running &lt;code&gt;flutter devices&lt;/code&gt; on your terminal and check the name of your device there.&lt;/p&gt;

&lt;p&gt;This is really good and all, but you can improve even more the experience:&lt;/p&gt;
&lt;h3&gt;
  
  
  Running on a physical device (WiFi)
&lt;/h3&gt;

&lt;p&gt;For this to work, we'll be using the &lt;strong&gt;Android Debug Bridge (ADB)&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: You &lt;strong&gt;can&lt;/strong&gt; install the ADB via your package manager, but this can lead to version inconsistency between scripts. I highly reccomend just  running the following:&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo cp&lt;/span&gt; ~/Android/Sdk/platform-tools/adb /usr/bin/adb
&lt;span class="nb"&gt;sudo chmod&lt;/span&gt; +x /usr/bin/adb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;It will copy an existing ADB install that you may have from Android Studio setup into your bin folder, and allow you to run it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ADB creates a server on your local network, and connects to your phone. First you need to setup your phone via USB, as we did earlier. Then, with your phone connected by cable, you run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;adb tcpip 5555
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will set your phone to listen for ADB in port 5555. You can now disconnect your phone physically.&lt;br&gt;
Then search for your device's IP, it will be listed in &lt;strong&gt;Settings &amp;gt; About &amp;gt; Status &amp;gt; IP Address&lt;/strong&gt;. Then you run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;adb connect &lt;span class="o"&gt;[&lt;/span&gt;your IP here]:5555
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will start the bridge server and connect to your phone via IP, in the port you selected (5555). To check if you did it correctly, just run &lt;code&gt;adb devices&lt;/code&gt; or &lt;code&gt;flutter devices&lt;/code&gt; and it should show your phone. Check your VS Code and it should gracefully display your phone on the bottom right.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ff0rtnqtuhsxqgkg3znt3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ff0rtnqtuhsxqgkg3znt3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Proud owner of a Xiaomi Pocophone&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  4 - Get coding
&lt;/h2&gt;

&lt;p&gt;You should be all set! You can learn Flutter on the &lt;a href="https://flutter.dev/docs" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt; or the many courses and lectures you can find online about. It is that easy to get started, and very easy to get going if you already have some experience with React.&lt;/p&gt;

&lt;p&gt;Happy Coding!&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
