Code Monkey home page Code Monkey logo

morristech / flutter-ui-designs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hackerhgl/flutter-ui-designs

0.0 1.0 0.0 35.99 MB

Just collection of UI designs build with flutter. Can run on any mobile, web & desktop.

Home Page: https://flutter-ui-challenges-hgl.firebaseapp.com/

License: MIT License

Kotlin 0.08% JavaScript 0.02% Ruby 1.34% Objective-C 0.16% Swift 0.32% Dart 90.44% C++ 4.35% C 0.27% HTML 0.20% CMake 2.80% Shell 0.03%

flutter-ui-designs's Introduction

Flutter UI Designs

Features

UI Scaling
Scales UI on any size of device wether it be tablet, small screen mobile, phablet or desktop screen.
True Cross Platform
Just download the app for your OS and run it without installing any dependencies.
Offline-first
Run app without an internet connection. All assets are saved locally.
Simple UI
Just simple and straight forward UI.
Modularized Structure
Helps maintain a readable code, easy to fix and more room to add new features.
Open Source
Any piece of code is free to use anywhere except UI Designs you've to ask permission from relevant designers. Designer's information can be found in app.
Multi Language
Available 3 in languages at the moment.

Requirements to run locally

Just in case if you ran into errors make sure you're using correct flutter & dart version. In order to support desktop build master branch is a requirement & Master branch is not stable so breaking changes happen very often.

A formal warning. In order to compile app properly on your machine you'll need to switch master channel with exact revision. By doing so the process will delete any previous stable/beta flutter/dart sdk. Thank you @3mrdev for letting me know of this issue. I'll look into the fvm or any other version manger when I get more free time to spend on it.

I did spent some time to integrate FVM in Windows but I ran into some sorts of errors. After spending some hours to solve the issue & not getting any success I parked the idea on side as currently using master branch directly is much easier & stable solution.

  • Flutter master channel & Framework โ€ข revision 54c9441723
    • Run flutter --version to check it
  • Dart VM version: 2.7.1
    • Run dart --version to check it
  • Follow these step to use correct revision version
    • Run cd \$FLUTTER_HOME (or the path where your flutter is installed)
    • Run git checkout master
    • Run git checkout 54c9441723
  • To enable desktop & web builds run the relevant command
    • Run flutter --enable-web
    • Run flutter --enable-macos-desktop
    • Run flutter --enable-linux-desktop
    • Run flutter --enable-windows-desktop
  • Run flutter doctor this command will show you what dependencies you need to install.

Getting started with code

Please note that this project's code is not meant for beginners! If you're just getting started with flutter I recommend you to explore some ToDo and basic setState apps and get yourself familiar with flutter and dart eco-system because in this project intermediate and advance implementations are use which will confuse you and won't help much in terms of learning.

  • There are 2 entry files for this project main.dart & main.mobile.dart. It was necessary because I'm using Firebase analytics and crashlytics and there isn't desktop support for Firebase yet.
  • Navigator.dart is responsible for managing routes, handles custom transition, pass parameter in screens and control navigation with keyboard shortcuts.
  • UI.dart provides constant for building responsive UI.
  • configs/AppDimensions.dart this is the magical file. It provides the app with:
    • My custom size unit based on device's width, height & pixel density.
    • Responsive containers.
    • Padding multiplier unit (I learned it with experience instead of using 1,2,3px should use multiplier. it helps maintain constancy around the app).
  • Widgets/Screen.dart This widget is necessary when building a new screen.
    • configure theme & font style.
    • You can show popUps. final screenKey = GlobalKey<ScreenState>(); & this.screenKey.showPopUp(message: "your message");
    • It also receive a belowBuilder parameter which builds custom background (This enables us to build Parallax, Animated background & Any thing you could imagine in background). you can find an example in Screens/Download/Download.dart
  • Code structure is pretty much simple.
    • Don't import anything form ScreenA in ScreenB.
    • Don't import anything from Screen/Widget in universal files.
    • Don't import anything from ScreenA specific Widget in universal files.
    • Each Screen will have Dimensions.dart where you can write Screen's responsive logic.
    • I didn't use snake_case in naming convention just because I don't prefer it.
    • I use this for class's properties & methods I helps keep track of variables & functions.

Scripts

Just run npm run setup once

  • scripts/upload.js
    • npm run upload platform // platforms: [apk, windows, linux, macos]
    • This script will upload the release build to your firebase storage
    • I intended to integrate this script with github actions but the use account access key was visible on logs that's why I stick with github-release downloads.
  • scripts/runAlliOS.js
    • Need work currently not a priority.
  • vslaunch.js
    • npm run vslaunch
    • This script will make vscode configuration file with all of your connected devices.
    • You can live debug app on multiple devices at once from vs code.
    • Each device's debug logs on separate DEBUG CONSOLE.
    • Very useful for testing UI for multiple devices simultaneously.

Show support

If you like the project and want to appreciate my effort. Then please perform any of these steps :)

Download

License

This project is licensed under the MIT license, Copyright (c) 2020 Hamza Iqbal. For more information see LICENSE.md.

flutter-ui-designs's People

Contributors

hackerhgl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.