Skip to content

Commit

Permalink
Merge pull request #3 from palladiumkenya/new_UI
Browse files Browse the repository at this point in the history
New UI
  • Loading branch information
Eugene600 authored Jul 16, 2024
2 parents 330f5ca + 2031f0c commit 841b0fc
Show file tree
Hide file tree
Showing 67 changed files with 2,388 additions and 800 deletions.
12 changes: 6 additions & 6 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "54e66469a933b60ddf175f858f82eaeb97e48c8d"
revision: "300451adae589accbece3490f4396f10bdf15e6e"
channel: "stable"

project_type: app
Expand All @@ -13,11 +13,11 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: linux
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
create_revision: 300451adae589accbece3490f4396f10bdf15e6e
base_revision: 300451adae589accbece3490f4396f10bdf15e6e
- platform: android
create_revision: 300451adae589accbece3490f4396f10bdf15e6e
base_revision: 300451adae589accbece3490f4396f10bdf15e6e

# User provided section

Expand Down
40 changes: 4 additions & 36 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
plugins {
id "com.android.application"
// START: FlutterFire Configuration
id 'com.google.gms.google-services'
// END: FlutterFire Configuration
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()

//def keystorePropertiesFile = rootProject.file("key.properties")
//def keystoreProperties = new Properties()
//
//if (keystorePropertiesFile.exists()) {
// keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
//} else {
// throw new GradleException("Cannot find 'key.properties' file: " + keystorePropertiesFile)
//}




def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
Expand All @@ -36,29 +26,10 @@ if (flutterVersionName == null) {
}

android {
// namespace "org.kenyahmis.nishauri.nishauri"
// Modified the namespace to match the package name in the AndroidManifest.xml
namespace "com.mhealth.nishauri"
// compileSdkVersion flutter.compileSdkVersion
compileSdkVersion 34
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion


// signingConfigs {
// release {
// keyAlias keystoreProperties['keyAlias']
// keyPassword keystoreProperties['keyPassword']
// storeFile file("C:/Users/This/new_UIrecent/android/app/key.jks")
// storePassword keystoreProperties['storePassword']
// }
// }







compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand All @@ -74,9 +45,6 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// applicationId "org.kenyahmis.nishauri.nishauri"
// applicationId "org.kenyahmis.nishauri.nishauri"
// Modified applicationId to mmatch the package name in the AndroidManifest.xml
applicationId "com.mhealth.nishauri"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
Expand Down
48 changes: 48 additions & 0 deletions android/app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"project_info": {
"project_number": "921170637462",
"project_id": "nishauri-new-2",
"storage_bucket": "nishauri-new-2.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:921170637462:android:5e50f392a12562c59b48b7",
"android_client_info": {
"package_name": "com.mhealth.nishauri"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDDhK2nErRy_-SajzArNonosAo5nWaF9Us"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:921170637462:android:69b9ba4fc66399099b48b7",
"android_client_info": {
"package_name": "org.kenyahmis.nishauri.nishauri"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDDhK2nErRy_-SajzArNonosAo5nWaF9Us"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
2 changes: 1 addition & 1 deletion android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mhealth.nishauri" >
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mhealth.nishauri">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
21 changes: 18 additions & 3 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!-- <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.kenyahmis.nishauri"> -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mhealth.nishauri">
<application
android:label="NiShauri"
Expand All @@ -20,6 +19,13 @@
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>


<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/default_notification_channel_id"
/>

<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand All @@ -30,7 +36,16 @@
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCQVOAQW36FpGPPYYDJMc0_N257RuXh76s"/>
</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility?hl=en and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.mhealth.nishauri

import io.flutter.embedding.android.FlutterActivity

class MainActivity: FlutterActivity()

This file was deleted.

1 change: 1 addition & 0 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
<string name="default_notification_channel_id">high_importance_channel</string>
</resources>
2 changes: 1 addition & 1 deletion android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mhealth.nishauri" >
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mhealth.nishauri" >
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
13 changes: 0 additions & 13 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
buildscript {
ext.kotlin_version = '1.9.24'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
43 changes: 13 additions & 30 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,20 @@ pluginManagement {

includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")

plugins {
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

include ":app"

apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"

// pluginManagement {
// def flutterSdkPath = {
// def properties = new Properties()
// file("local.properties").withInputStream { properties.load(it) }
// def flutterSdkPath = properties.getProperty("flutter.sdk")
// assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
// return flutterSdkPath
// }()

// includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

// repositories {
// google()
// mavenCentral()
// gradlePluginPortal()
// }
// }

// plugins {
// id "dev.flutter.flutter-plugin-loader" version "1.0.0"
// id "com.android.application" version "7.2.0" apply false
// id "org.jetbrains.kotlin.android" version "1.7.20" apply false
// }
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
// START: FlutterFire Configuration
id "com.google.gms.google-services" version "4.3.15" apply false
// END: FlutterFire Configuration
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
}

// include ":app"
include ":app"
1 change: 1 addition & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"flutter":{"platforms":{"android":{"default":{"projectId":"nishauri-new-2","appId":"1:921170637462:android:5e50f392a12562c59b48b7","fileOutput":"android/app/google-services.json"}},"dart":{"lib/firebase_options.dart":{"projectId":"nishauri-new-2","configurations":{"android":"1:921170637462:android:5e50f392a12562c59b48b7","ios":"1:921170637462:ios:9e081fc27a5afdf29b48b7","web":"1:921170637462:web:12ab142f7ee98c799b48b7"}}}}}}
76 changes: 76 additions & 0 deletions lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// File generated by FlutterFire CLI.
// ignore_for_file: type=lint
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
import 'package:flutter/foundation.dart'
show defaultTargetPlatform, kIsWeb, TargetPlatform;

/// Default [FirebaseOptions] for use with your Firebase apps.
///
/// Example:
/// ```dart
/// import 'firebase_options.dart';
/// // ...
/// await Firebase.initializeApp(
/// options: DefaultFirebaseOptions.currentPlatform,
/// );
/// ```
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
if (kIsWeb) {
return web;
}
switch (defaultTargetPlatform) {
case TargetPlatform.android:
return android;
case TargetPlatform.iOS:
return ios;
case TargetPlatform.macOS:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for macos - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.windows:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for windows - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.linux:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for linux - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
default:
throw UnsupportedError(
'DefaultFirebaseOptions are not supported for this platform.',
);
}
}

static const FirebaseOptions web = FirebaseOptions(
apiKey: 'AIzaSyCCPK_MO0d0QUCHaBGqEylgzTZw9hWRDD8',
appId: '1:921170637462:web:12ab142f7ee98c799b48b7',
messagingSenderId: '921170637462',
projectId: 'nishauri-new-2',
authDomain: 'nishauri-new-2.firebaseapp.com',
storageBucket: 'nishauri-new-2.appspot.com',
measurementId: 'G-YME8KHDKM3',
);

static const FirebaseOptions android = FirebaseOptions(
apiKey: 'AIzaSyDDhK2nErRy_-SajzArNonosAo5nWaF9Us',
appId: '1:921170637462:android:5e50f392a12562c59b48b7',
messagingSenderId: '921170637462',
projectId: 'nishauri-new-2',
storageBucket: 'nishauri-new-2.appspot.com',
);

static const FirebaseOptions ios = FirebaseOptions(
apiKey: 'AIzaSyDqmcg2s_uXkJwQq__3Lg6akV3NTbQf1Ps',
appId: '1:921170637462:ios:9e081fc27a5afdf29b48b7',
messagingSenderId: '921170637462',
projectId: 'nishauri-new-2',
storageBucket: 'nishauri-new-2.appspot.com',
iosBundleId: 'org.kenyahmis.nishauri.nishauri',
);

}
16 changes: 15 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:nishauri/firebase_options.dart';
import 'package:nishauri/src/app/app.dart';
import 'package:nishauri/src/shared/interfaces/notification_service.dart';

Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);

// Initialize firebase messaging
await NotificationService.initializeFirebaseMessaging();

// Initialize local notifications
await NotificationService.initializeLocalNotifications();

void main() {
runApp(
const ProviderScope(child: NishauriApp()),
);
Expand Down
Loading

0 comments on commit 841b0fc

Please sign in to comment.