Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fayeed committed Jan 18, 2020
0 parents commit 67c27b6
Show file tree
Hide file tree
Showing 110 changed files with 6,477 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.packages
.pub-cache/
.pub/
/build/

# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java

# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*

# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

fake_data
133 changes: 133 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<div align="center">
<div style="display: flex; align-items: center; width: 300px; justify-content: space-around;">
<img src="https://i.imgur.com/RSILLox.png" width="80" height="80" />
<h1 align="center" style="font-size: 48px;">Onehour</h1>
</div>
<h2 align="center">A time tracking app build using Flutter</h2>
</div>

## Screens

| First Header | Second Header |
| ----------------------------------------- | ----------------------------------------- |
| ![Imgur](https://i.imgur.com/up6aTDt.png) | ![Imgur](https://i.imgur.com/Xyz125b.png) |
| ![Imgur](https://i.imgur.com/ajovytu.png) | ![Imgur](https://i.imgur.com/Fc43Bdj.png) |
| ![Imgur](https://i.imgur.com/l9rMYHO.png) | ![Imgur](https://i.imgur.com/SaBkfNo.png) |
| ![Imgur](https://i.imgur.com/7zWX4QW.png) | ![Imgur](https://i.imgur.com/WoFmumm.png) |

## Tech Stack
- Flutter
- Flutter Bloc with Hydrated Bloc
- Firebase
- Admob

## Features
- Track time for all your task.
- Offline Support.
- Social Logins (Google, Facebook)
- Light & Dark theme support.
- Ads configured using remote config.

## Getting Started
1. [Fork repository](https://github.com/fayeed/Onehour-app/fork) and clone your fork locally
1. Install [Flutter 1.7.8](https://flutter.dev/docs/get-started/install)
1. Install [Android Studio / IntelliJ / VSCode](https://flutter.dev/docs/development/tools/android-studio)
1. [Preparing Release for Android](https://flutter.dev/docs/deployment/android)
1. [Preparing Release for iOS](https://flutter.dev/docs/deployment/ios)

## Building the project



## Android

### Missing Key.Properties file

If you try to build the project straight away, you'll get an error complaining that a `key.properties` file is missing and Exit code 1 from: /Onehour-appp/android/gradlew app:properties:. To resolve that,

1. Follow this guide to [Generate Keystor](https://flutter.dev/docs/deployment/android#create-a-keystore) and then move it to [Onehour-appp/android/app](https://github.com/fayeed/Onehour-app/blob/master/android/app)

2. Open [Onehour-appp/android](https://github.com/fayeed/Onehour-app/blob/master/android/) and create a new file `key.properties` and your key info:

```
storePassword=STORE_PASSWORD
keyPassword=KEY_PASSWORD
keyAlias=key
storeFile=key.jks
```

3. Integrate Firebase for [Android](https://firebase.google.com/docs/flutter/setup?platform=android)

4. Open [AndroidManifest.xml](https://github.com/fayeed/onehour/blob/master/android/app/src/main/AndroidManifest.xml) and replace `ADMOB_ID` with your id.
```xml
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ADMOB_ID"/>
```

5. Open [strings.xml](https://github.com/fayeed/onehour/blob/master/android/app/src/main/res/values/strings.xml) and replace `0000000000` with your id.

```xml
<!-- Replace "000000000000" with your Facebook App ID here. -->
<string name="facebook_app_id">000000000000</string>

<!--
Replace "000000000000" with your Facebook App ID here.
**NOTE**: The scheme needs to start with `fb` and then your ID.
-->
<string name="fb_login_protocol_scheme">fb000000000000</string>
```


## IOS

1. Integrate Firebase for [IOS](https://firebase.google.com/docs/flutter/setup)

2. Open [Info.plist](https://github.com/fayeed/onehour/blob/master/ios/Runner/Info.plist) replace `REVERSED_CLIENT_ID`,

```xml
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<!--
Replace "000000000000" with your Facebook App ID here.
**NOTE**: The scheme needs to start with `fb` and then your ID.
-->
<string>fb000000000000</string>
<!--Replace REVERSED_CLIENT_ID with your googleservice.plist REVERSED_CLIENT_ID-->
<string>REVERSED_CLIENT_ID</string>
</array>
</dict>
</array>

<!--Replace 000000000000 with your facebook app id-->
<key>FacebookAppID</key>
<string>000000000000</string>

<!--Replace FACEBOOK_DISPLAY_NAME with your facebook display name -->
<key>FacebookDisplayName</key>
<string>FACEBOOK_DISPLAY_NAME</string>

<!--Replace 00000ADMOB_ID0000000 with your admob id-->
<key>GADApplicationIdentifier</key>
<string>ADMOB_ID</string>
```

## Contributing

Awesome! Contributions of all kinds are greatly appreciated. To help smoothen the process we have a few non-exhaustive guidelines to follow which should get you going in no time.

### Using GitHub Issues

- Feel free to use GitHub issues for questions, bug reports, and feature requests
- Use the search feature to check for an existing issue
- Include as much information as possible and provide any relevant resources (Eg. screenshots)

## License

Project is published under the [MIT license](/LICENSE.md).
Feel free to clone and modify repo as you want, but don't forget to add reference to authors :)
17 changes: 17 additions & 0 deletions android/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>android</name>
<comment>Project android created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
6 changes: 6 additions & 0 deletions android/app/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
23 changes: 23 additions & 0 deletions android/app/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>app</name>
<comment>Project app created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions android/app/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
connection.project.dir=..
eclipse.preferences.version=1
81 changes: 81 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
compileSdkVersion 28

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
multiDexEnabled true
applicationId "com.codenimble.onehour"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}

buildTypes {
debug {
signingConfig signingConfigs.release
}
release {
signingConfig signingConfigs.release
}
}
}

flutter {
source '../..'
}

dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-analytics:17.0.1'
}

apply plugin: 'com.google.gms.google-services'
7 changes: 7 additions & 0 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.codenimble.onehour">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
Loading

0 comments on commit 67c27b6

Please sign in to comment.