<?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: TannerHornsby7</title>
    <description>The latest articles on DEV Community by TannerHornsby7 (@tannerhornsby7).</description>
    <link>https://dev.to/tannerhornsby7</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%2F888175%2F208d4904-9732-49c4-b358-62f628bd1de2.jpg</url>
      <title>DEV Community: TannerHornsby7</title>
      <link>https://dev.to/tannerhornsby7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tannerhornsby7"/>
    <language>en</language>
    <item>
      <title>CATalog App: Info Page</title>
      <dc:creator>TannerHornsby7</dc:creator>
      <pubDate>Sat, 09 Jul 2022 00:57:59 +0000</pubDate>
      <link>https://dev.to/tannerhornsby7/catalog-app-info-page-aee</link>
      <guid>https://dev.to/tannerhornsby7/catalog-app-info-page-aee</guid>
      <description>&lt;h2&gt;
  
  
  The Idea
&lt;/h2&gt;

&lt;p&gt;In my last post, I built the basic homepage UI for the CATalog. Today, I plan on expanding the app by adding info pages for each cat.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Process
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Writing the Base CatInfo Class
&lt;/h3&gt;

&lt;p&gt;To begin today's work, I build a CatInfo class which displayed a cat, its name, its info, and its stats. I used a rating package I found online that is really good, &lt;em&gt;Flutter Rating Bar&lt;/em&gt;! Special thanks to &lt;a href="https://pub.dev/publishers/sarbagyastha.com.np"&gt;Sarba Gyastha&lt;/a&gt; for creating this great package. I implemented a basic stat bar for Health, and plan to add two more for Stamina, and Strength. Here is what the basic CatInfo Page was looking like!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1Wx17q2P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/26iwy49i3x93yjicwgkp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1Wx17q2P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/26iwy49i3x93yjicwgkp.png" alt="basic CatInfo" width="880" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Navigation Station
&lt;/h3&gt;

&lt;p&gt;The implementation of navigation was way easier than I thought it would be. I simply placed a Navigator.push function inside of the onPressed attribute as shown below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ogYvKh0P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kjks9qg8c60umkwm4rji.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ogYvKh0P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kjks9qg8c60umkwm4rji.png" alt="code snippet" width="623" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Navigator automatically adds a pop method to the CatInfo class, which meant that my work was done when it came to navigation. With this final addition of code, I had a working framework for navigating from the home page to a cat page:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uesfgym0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1zjnkhdofl54fo7xihmz.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uesfgym0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1zjnkhdofl54fo7xihmz.gif" alt="final product" width="880" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;Next time, I want the cat image, stats, and descriptions to be unique to the selected cat. To do this, there are two methods I thought of. I can either use provider for a short term solution to the changing state, or use Firebase to create a basic back end which I can pull the cats from. &lt;/p&gt;

&lt;p&gt;For now, I am thinking of using Firebase and integrating provider where needed, but if you guys know of a better method, please let me know!&lt;/p&gt;

&lt;p&gt;Thank you for reading. Feel free to comment with tips/suggestions and follow if you want to join me on this flutter journey!&lt;/p&gt;

&lt;p&gt;Github Repo: &lt;a href="https://github.com/TannerHornsby7/CATalog"&gt;https://github.com/TannerHornsby7/CATalog&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>CATalog App: First Steps</title>
      <dc:creator>TannerHornsby7</dc:creator>
      <pubDate>Wed, 06 Jul 2022 23:50:03 +0000</pubDate>
      <link>https://dev.to/tannerhornsby7/catalog-app-first-steps-82n</link>
      <guid>https://dev.to/tannerhornsby7/catalog-app-first-steps-82n</guid>
      <description>&lt;h2&gt;
  
  
  The Idea
&lt;/h2&gt;

&lt;p&gt;For my first public flutter app, I decided to do something meaningful. Something that could actually change the world. I decided to make a catalog.&lt;/p&gt;

&lt;p&gt;But this wasn't going to be just any catalog. No, this was to be the CATalog. A directory for all cats, listing their images, names, and stats. But to do this, I need to work on my Flutter skills.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Process
&lt;/h2&gt;

&lt;h3&gt;
  
  
  UI Diagram
&lt;/h3&gt;

&lt;p&gt;In order to turn my idea into a reality, I first came up with a diagram of how the homepage and navigation would occur. I decided upon the following structure:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TtarQ8ev--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w5heepdunwpqr9wzufr1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TtarQ8ev--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w5heepdunwpqr9wzufr1.png" alt="UI Diagram" width="880" height="998"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;... yea I'm a bit of an artist what can I say ...&lt;/em&gt;  &lt;/p&gt;

&lt;h3&gt;
  
  
  Initial Roadblocks
&lt;/h3&gt;

&lt;p&gt;At first, I wanted to pull the cat images from &lt;a href="https://www.purina.com/cats/cat-breeds"&gt;Purina's Cat Breeds Site&lt;/a&gt;; however, I only knew how to use the &lt;a href="https://docs.flutter.dev/cookbook/networking/fetch-data"&gt;http request and response library&lt;/a&gt; for JSON data directly. The data on their site was formatted with html, giving me this weird error when I tried to implement the list builder:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xPtTBwKL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7upmz2vdm72xeo0vxrd2.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xPtTBwKL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7upmz2vdm72xeo0vxrd2.gif" alt="SpinsOfDeath" width="880" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Composing the List
&lt;/h3&gt;

&lt;p&gt;So instead I began by downloading pics of my favorite cats and saving them in an asset folder that I added to my pubspec.yaml file. Only the studs got selected, but eventually I want to include all breeds.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iK-jKQBw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mjj98ozz2acav0n0ck6h.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iK-jKQBw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mjj98ozz2acav0n0ck6h.jpg" alt="Maine Cat" width="880" height="880"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;one of the studs selected&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I then created the ListView builder with tiles composed of these images and their respective names. I also added a button for more info which would implement a Navigator.push method in its onPressed attribute when I finish the CatInfo class.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OWIJ-oIg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u1gsx0348rq804ywj4sc.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OWIJ-oIg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u1gsx0348rq804ywj4sc.gif" alt="Image description" width="880" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can probably tell, the pictures were pretty wanky. But this was an easy fix. I simply added a fit attribute to the image giving it the BoxFit.fill tribute. This, along with an added favorite IconButton, concluded my changes to the UI for the day. This is what it is looking like so far!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BD_DsvW4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gs9zz5emsgeynrkyqeg3.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BD_DsvW4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gs9zz5emsgeynrkyqeg3.gif" alt="Image description" width="880" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;All in all, today was a pretty fun day. I created the initial catalog with some cool lookin' cats. But there is much work to be done. Next time, I will implement the Cat Info Page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating the Cat Info Page Class
&lt;/h3&gt;

&lt;p&gt;The next stage of this project is to implement my Cat Info Page class, which contains an in depth view of a specific cat from the catalog, listing their stats/special abilities.&lt;/p&gt;

&lt;p&gt;In order to do this, I need to create a Stateless class which takes a cat name and returns its formatted jpg image and randomized stats. I will finish this in my next post&lt;/p&gt;

&lt;p&gt;Thank you for reading. Feel free to comment with tips/suggestions and follow if you want to join me on this flutter journey!&lt;/p&gt;

&lt;p&gt;Github Repo: &lt;a href="https://github.com/TannerHornsby7/CATalog"&gt;https://github.com/TannerHornsby7/CATalog&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
