Advanced Flutter Project - Adding Fonts and Fuzzy Timestamps - Part Four

in #utopian-io6 years ago (edited)

Repository

https://github.com/flutter/flutter

What Will I Learn?

  • You will learn how to access Fonts in Flutter
  • You will learn about putting symbols into a font format
  • You will learn how to use Fuzzy timestamps
  • You will learn how to manipulate aesthetics
  • You will learn how to access and use circular avatars
  • You will learn how to use the URL Launcher Library

Requirements

System Requirements:
OS Support for Flutter:
  • Windows 7 SP1 or later (64-bit)
  • macOS (64-bit)
  • Linux (64-bit)

Required Knowledge

  • A basic knowledge Programming
  • A fair understanding of Mobile development and Imperative or Object Oriented Programming
  • Basic knowledge of the BLoC

Resources for Flutter and this Project:

Sources:

Flutter Logo (Google): https://flutter.io/

Difficulty

  • Advanced

Description

In this video we continue building the Utopian Rocks mobile application. Thus far we've mainly focused on the backend of the application. To allow the application to convey all of the information that we want, we need to change the aesthetics of the list tiles for each contribution. This includes adding minor font changes, category symbols, circular avatars, fuzzy timestamps and a gesture detector among a few other elements.

Expanding the Information of the Application

Much of the design for this application comes from the original utopian.rocks website. As such, it makes sense to recreate the layout and information displayed in the flutter application. This means that the application needs to access assets from both from network sources and local sources.


ur-listtile.png

From left to right, the list tiles contain a circular avatar which is taken from the steemit photos CDN (content delivery network). This circular avatar uses a network image widget which is wrapped in a circular avatar widget. Adding a box decoration element is what allows us to create perfect circles out of these photos. Towards the middle, there is the text; this includes the title of the contribution, the repository and a fuzzy timestamp. On the far right, each contribution has a associated category icon which is fed into the application from a font file.

Using Fonts and Fuzzy Timestamps

Flutter doesn't have a decent way of working with SVG files. It does however, have a very nice engine for working with ASCII fonts and code-points. With this functionality, it makes sense to take SVG elements and convert them into a font. In the case of this application, each of the contribution category icons is in a font called utopicons.


utopicons.png

The icons take the place of the capital A character all the way up to the Capital P character and this makes it easy for us to know which code-points to use.

Along with this font family, we also want to use a library called timeago to create a set of fuzzy timestamps for each contribution on the list. This makes the timestamps that are being pulled from the utopian.rocks API more readable at a glance.


fuzzy.png

As pictured above, a longer timestamp showing the date and time can be shrunk down into a single number with a denomination. This timestamp is an approximation and as it grows and shrinks it moves up and down denominations.

The Source Code for this video may be found here: https://github.com/tensor-programming/utopian-rocks-demo/tree/tensor-programming-part-4

Video Tutorial

Curriculum

Related Videos

Projects and Series

Stand Alone Projects:
Building a Calculator
Movie Searcher Application

Minesweeper Game

Weather Application

Redux Todo App

Curriculum

Proof of Work Done

https://github.com/tensor-programming

Sort:  

Hi @Tensor

Another fantastic tutorial.

Thank you for developing this series of mobile application for Utopian rocks.

It is very exciting for me to see the development of the entire project.

Again, you have done a lot of ground work providing great supplementary material.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

As always, thanks for moderating my contribution.

Thank you for your review, @rosatravels! Keep up the good work!

Hi, @tensor!

You just got a 6.02% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

Hi @tensor!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @tensor!

Thanks for contributing on Utopian.
Congratulations! Your contribution was Staff Picked to receive a maximum vote for the video-tutorials category on Utopian for being of significant value to the project and the open source community.

We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.17
TRX 0.13
JST 0.028
BTC 56570.01
ETH 3028.13
USDT 1.00
SBD 2.29