|
| 1 | +# React Native Loop |
| 2 | + |
| 3 | +## Features |
| 4 | + |
| 5 | +<dl> |
| 6 | + <dt>UI Scaling</dt> |
| 7 | + <dd>Scales UI on any size of device wether it be tablet, small screen mobile or phablet.</dd> |
| 8 | + |
| 9 | + <dt>Offline-first</dt> |
| 10 | + <dd>Run app without an internet connection. All assets are saved locally.</dd> |
| 11 | + |
| 12 | + <dt>Simple UI</dt> |
| 13 | + <dd>Just simple and straight forward UI.</dd> |
| 14 | + |
| 15 | + <dt>Modularized Structure</dt> |
| 16 | + <dd>Helps maintain a readable code, easy to fix and more room to add new features.</dd> |
| 17 | + |
| 18 | + <dt>Open Source</dt> |
| 19 | + <dd>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.</dd> |
| 20 | +</dl> |
| 21 | + |
| 22 | +## Requirements to run locally |
| 23 | + |
| 24 | +> Just in case if you ran into errors make sure you're using correct react-native & nodejs version. |
| 25 | +
|
| 26 | +- Run `npm run setup` to install required global npm packages with correct versions |
| 27 | + |
| 28 | +## Getting started with code |
| 29 | + |
| 30 | +> 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 react eco-system becuase in this project intermediate and advance implementations are use which will confuse you and won't help much in terms of learning. |
| 31 | +
|
| 32 | +- `init.js` initialize default settings like styles, theme & API. |
| 33 | +- `UI.dart` provides constant for building responsive UI. |
| 34 | +- `blocs/` Intially I was going to implement Rest APIs but that seemed unnecessary & a lot of work So I'll probably remove `blocs/` in futrue. |
| 35 | +- `configs/AppDimensions.dart` this is the magical file. It provides the app with: |
| 36 | + - My custom size unit based on device's width, height & pixel density. |
| 37 | + - Responsive containers. |
| 38 | + - Padding multiplier unit (I learned it with experience instead of using 1,2,3px should use multiplier. it helps maintain constancy around the app). |
| 39 | +- `Widgets/Screen.dart` This widget is necessary when building a new screen. |
| 40 | + - configure theme & font style. |
| 41 | + - You can show popUps. `final screenKey = GlobalKey<ScreenState>();` & `this.screenKey.showPopUp(message: "your message");` |
| 42 | + - It also recieve 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` |
| 43 | +- Code structure is pretty much simple. |
| 44 | + - Don't import anything form ScreenA in ScreenB. |
| 45 | + - Don't import anthing from Screen/Widget in universal files. |
| 46 | + - Don't import anthing from ScreenA specific Widget in universal files. |
| 47 | + - Each Screen will have `Dimensions.dart` where you can write Screen's responsive logic. |
| 48 | + - I didn't use snake_case in naming convention just becuase I don't prefer it. |
| 49 | + - I use `this` for class's properties & methods I helps keep track of vriables & functions. |
| 50 | + |
| 51 | + |
| 52 | +## Show support |
| 53 | + |
| 54 | +> **If you like the project and want to appreciate my effort. Then please perform any of these steps :)** |
| 55 | +
|
| 56 | +- Star this repository. |
| 57 | +- Rate the app on <a href="https://play.google.com/store/apps/details?id=com.onemdev.flutter_ui_challenges" target="_playstore">Play Store</a>. |
| 58 | +- Endorse my skills on my <a href="https://www.linkedin.com/in/hackerhgl" target="linkedin">linkedin Profile</a>. |
| 59 | +- Favorite my gigs on <a href="https://www.fiverr.com/hackerhgl" target="fiver">Fiverr</a>. |
| 60 | +- Give a recommendation on <a href="https://www.freelancer.com/u/hackerhgl" target="freelance">Freelancer</a>. |
| 61 | + |
| 62 | +## Download |
| 63 | + |
| 64 | +<div id="downloads"> |
| 65 | + <a href="https://play.google.com/store/apps/details?id=com.onemdev.flutter_ui_challenges"> |
| 66 | + <img src="https://raw.githubusercontent.com/hackerhgl/flutter-ui-designs/master/.github/assets/google-play.png" alt="Play Store badge" width="200" /> |
| 67 | + </a> |
| 68 | + <a href="https://github.com/hackerhgl/flutter-ui-designs/releases/latest/download/app-release.apk"> |
| 69 | + <img src="https://raw.githubusercontent.com/hackerhgl/flutter-ui-designs/master/.github/assets/android.png" alt="Android badge" width="200" /> |
| 70 | + </a> |
| 71 | +</div> |
| 72 | + |
| 73 | +## License |
| 74 | + |
| 75 | +This project is licensed under the MIT license, Copyright (c) 2020 Hamza Iqbal. For more information see `LICENSE.md`. |
0 commit comments