Skip to content

Feature/deeplink android #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
379ac72
refactor: organize asset constants
Jul 10, 2024
255019f
fix: correct path typo from 'assets/image' to 'assets/images'
Jul 10, 2024
fed66e8
Add Firebase configuration and setup Android/iOS platforms
neminsheth Jul 12, 2024
c11c794
Working: TODO: Ensure Reset Password has Email verification
neminsheth Jul 12, 2024
7f2c166
Working: TODO: Ensure Reset Password has Email verification
neminsheth Jul 12, 2024
39ab12e
Merge pull request #1 from HardikSJain/main
anshumandas Jul 13, 2024
80a4999
interim commit for merging PRs
anshumandas Jul 13, 2024
688306c
Merge branch 'main' of https://github.com/anshumandas/get-flutter-fire
anshumandas Jul 13, 2024
038adb5
Fix null check error in ImagePickerButton and improve null handling i…
neminsheth Jul 13, 2024
50e9bdb
fix: bottom navigation current index
Jul 14, 2024
c1fedc4
fix: handled bottom nav index for path & query parameters
Jul 14, 2024
ad6278c
added image picker
Aas11223 Jul 15, 2024
4125c29
change readme
Aas11223 Jul 15, 2024
0d780ef
added check if the path mentioned is for bottom navigation
Jul 15, 2024
1180864
using full path for bottom navigation
Jul 17, 2024
b99f3fd
Added Search Bar (Toggle Button for phones) on Top Center with Title
Aas11223 Jul 19, 2024
134d8a4
Removed firebase.json
neminsheth Jul 19, 2024
47427f9
Merge branch 'main' into feature/reset-password-email-verification
neminsheth Jul 19, 2024
1dee2ce
fixed async bug
anshumandas Jul 20, 2024
4882d04
Merge pull request #3 from neminsheth/feature/reset-password-email-ve…
anshumandas Jul 20, 2024
8b3ecff
Merge pull request #6 from HardikSJain/bug-fix
anshumandas Jul 20, 2024
aa7f6fa
Merge pull request #13 from Aastha-Gadhvi/main
anshumandas Jul 20, 2024
170bedb
Revert "Bugs, ToDo 13.3"
anshumandas Jul 20, 2024
47dc1d1
Merge pull request #15 from anshumandas/revert-13-main
anshumandas Jul 20, 2024
a5a56a5
Revert "Feature/reset password email verification"
anshumandas Jul 20, 2024
626531f
Merge pull request #16 from anshumandas/revert-3-feature/reset-passwo…
anshumandas Jul 20, 2024
2142393
Merge branch 'anshumandas:main' into main
HardikSJain Aug 19, 2024
40ce1dd
handle deeplinks
Aug 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ios/Flutter/Generated.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/Users/hardik/development/flutter
FLUTTER_APPLICATION_PATH=/Users/hardik/Developer/get-flutter-fire
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_TARGET=lib/main.dart
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.dart_tool/package_config.json
13 changes: 13 additions & 0 deletions ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/hardik/development/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/hardik/Developer/get-flutter-fire"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
19 changes: 19 additions & 0 deletions ios/Runner/GeneratedPluginRegistrant.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// Generated file. Do not edit.
//

// clang-format off

#ifndef GeneratedPluginRegistrant_h
#define GeneratedPluginRegistrant_h

#import <Flutter/Flutter.h>

NS_ASSUME_NONNULL_BEGIN

@interface GeneratedPluginRegistrant : NSObject
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
@end

NS_ASSUME_NONNULL_END
#endif /* GeneratedPluginRegistrant_h */
98 changes: 98 additions & 0 deletions ios/Runner/GeneratedPluginRegistrant.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
//
// Generated file. Do not edit.
//

// clang-format off

#import "GeneratedPluginRegistrant.h"

#if __has_include(<app_links/AppLinksPlugin.h>)
#import <app_links/AppLinksPlugin.h>
#else
@import app_links;
#endif

#if __has_include(<desktop_webview_auth/DesktopWebviewAuthPlugin.h>)
#import <desktop_webview_auth/DesktopWebviewAuthPlugin.h>
#else
@import desktop_webview_auth;
#endif

#if __has_include(<file_picker/FilePickerPlugin.h>)
#import <file_picker/FilePickerPlugin.h>
#else
@import file_picker;
#endif

#if __has_include(<firebase_analytics/FLTFirebaseAnalyticsPlugin.h>)
#import <firebase_analytics/FLTFirebaseAnalyticsPlugin.h>
#else
@import firebase_analytics;
#endif

#if __has_include(<firebase_auth/FLTFirebaseAuthPlugin.h>)
#import <firebase_auth/FLTFirebaseAuthPlugin.h>
#else
@import firebase_auth;
#endif

#if __has_include(<firebase_core/FLTFirebaseCorePlugin.h>)
#import <firebase_core/FLTFirebaseCorePlugin.h>
#else
@import firebase_core;
#endif

#if __has_include(<firebase_dynamic_links/FLTFirebaseDynamicLinksPlugin.h>)
#import <firebase_dynamic_links/FLTFirebaseDynamicLinksPlugin.h>
#else
@import firebase_dynamic_links;
#endif

#if __has_include(<firebase_remote_config/FLTFirebaseRemoteConfigPlugin.h>)
#import <firebase_remote_config/FLTFirebaseRemoteConfigPlugin.h>
#else
@import firebase_remote_config;
#endif

#if __has_include(<firebase_storage/FLTFirebaseStoragePlugin.h>)
#import <firebase_storage/FLTFirebaseStoragePlugin.h>
#else
@import firebase_storage;
#endif

#if __has_include(<google_sign_in_ios/FLTGoogleSignInPlugin.h>)
#import <google_sign_in_ios/FLTGoogleSignInPlugin.h>
#else
@import google_sign_in_ios;
#endif

#if __has_include(<image_picker_ios/FLTImagePickerPlugin.h>)
#import <image_picker_ios/FLTImagePickerPlugin.h>
#else
@import image_picker_ios;
#endif

#if __has_include(<path_provider_foundation/PathProviderPlugin.h>)
#import <path_provider_foundation/PathProviderPlugin.h>
#else
@import path_provider_foundation;
#endif

@implementation GeneratedPluginRegistrant

+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
[AppLinksPlugin registerWithRegistrar:[registry registrarForPlugin:@"AppLinksPlugin"]];
[DesktopWebviewAuthPlugin registerWithRegistrar:[registry registrarForPlugin:@"DesktopWebviewAuthPlugin"]];
[FilePickerPlugin registerWithRegistrar:[registry registrarForPlugin:@"FilePickerPlugin"]];
[FLTFirebaseAnalyticsPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseAnalyticsPlugin"]];
[FLTFirebaseAuthPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseAuthPlugin"]];
[FLTFirebaseCorePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseCorePlugin"]];
[FLTFirebaseDynamicLinksPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseDynamicLinksPlugin"]];
[FLTFirebaseRemoteConfigPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseRemoteConfigPlugin"]];
[FLTFirebaseStoragePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseStoragePlugin"]];
[FLTGoogleSignInPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTGoogleSignInPlugin"]];
[FLTImagePickerPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTImagePickerPlugin"]];
[PathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"PathProviderPlugin"]];
}

@end
3 changes: 2 additions & 1 deletion lib/app/modules/profile/views/profile_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:get/get.dart';

import '../../../../services/auth_service.dart';
import '../../../../models/screens.dart';
import '../../../utils/img_constants.dart';
import '../../../widgets/change_password_dialog.dart';
import '../../../widgets/image_picker_button.dart';
import '../controllers/profile_controller.dart';
Expand Down Expand Up @@ -62,7 +63,7 @@ class ProfileView extends GetView<ProfileController> {
)
: Center(
child: Image.asset(
'assets/images/dash.png',
ImgConstants.dash,
width: size,
fit: BoxFit.contain,
),
Expand Down
38 changes: 21 additions & 17 deletions lib/app/modules/root/views/drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import '../../../../models/role.dart';
import '../../../../services/auth_service.dart';

import '../../../../models/screens.dart';
import '../controllers/my_drawer_controller.dart';
import '../../../../services/remote_config.dart';
import '../../../widgets/remotely_config_obx.dart';

class DrawerWidget extends StatelessWidget {
const DrawerWidget({
Expand All @@ -16,23 +17,26 @@ class DrawerWidget extends StatelessWidget {

@override
Widget build(BuildContext context) {
MyDrawerController controller = Get.put(MyDrawerController([]),
permanent: true); //must make true else gives error
Screen.drawer().then((v) => {controller.values.value = v});
return Obx(() => Drawer(
//changing the shape of the drawer
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topRight: Radius.circular(0), bottomRight: Radius.circular(20)),
),
width: 200,
child: Column(
children: drawerItems(context, controller.values),
),
));
return RemotelyConfigObxVal.noparam(
(data) => Drawer(
//changing the shape of the drawer
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topRight: Radius.circular(0), bottomRight: Radius.circular(20)),
),
width: 200,
child: Column(
children: drawerItems(context, data),
),
),
List<Screen>.empty().obs,
"useBottomSheetForProfileOptions",
Typer.boolean,
func: Screen.drawer,
);
}

List<Widget> drawerItems(BuildContext context, Rx<Iterable<Screen>> values) {
List<Widget> drawerItems(BuildContext context, Iterable<Screen> values) {
List<Widget> list = [
Container(
height: 100,
Expand Down Expand Up @@ -67,7 +71,7 @@ class DrawerWidget extends StatelessWidget {
}
}

for (Screen screen in values.value) {
for (Screen screen in values) {
list.add(ListTile(
title: Text(screen.label ?? ''),
onTap: () {
Expand Down
15 changes: 4 additions & 11 deletions lib/app/modules/root/views/root_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import 'package:get/get.dart';
import 'package:get_flutter_fire/services/auth_service.dart';
import '../../../routes/app_pages.dart';
import '../../../../models/screens.dart';
import '../../../utils/icon_constants.dart';
import '../../../widgets/screen_widget.dart';
import '../controllers/root_controller.dart';
import 'drawer.dart';

Expand All @@ -31,14 +33,14 @@ class RootView extends GetView<RootController> {
)
: IconButton(
icon: ImageIcon(
const AssetImage("icons/logo.png"),
const AssetImage(IconConstants.logo),
color: Colors.grey.shade800,
),
onPressed: () => AuthService.to.isLoggedInValue
? controller.openDrawer()
: {Screen.HOME.doAction()},
),
actions: topRightMenuButtons(current),
actions: ScreenWidgetExtension.topRightMenuButtons(current),
// automaticallyImplyLeading: false, //removes drawer icon
),
body: GetRouterOutlet(
Expand All @@ -52,13 +54,4 @@ class RootView extends GetView<RootController> {
},
);
}

//This could be used to add icon buttons in expanded web view instead of the context menu
List<Widget> topRightMenuButtons(GetNavConfig current) {
return [
Container(
margin: const EdgeInsets.only(right: 15),
child: Screen.LOGIN.widget(current))
]; //TODO add seach button
}
}
12 changes: 12 additions & 0 deletions lib/app/modules/search/bindings/search_binding.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'package:get/get.dart';

import '../controllers/search_controller.dart';

class SearchBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut<SearchController>(
() => SearchController(),
);
}
}
23 changes: 23 additions & 0 deletions lib/app/modules/search/controllers/search_controller.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import 'package:get/get.dart';

class SearchController extends GetxController {
//TODO: Implement SearchController

final count = 0.obs;
@override
void onInit() {
super.onInit();
}

@override
void onReady() {
super.onReady();
}

@override
void onClose() {
super.onClose();
}

void increment() => count.value++;
}
24 changes: 24 additions & 0 deletions lib/app/modules/search/views/search_view.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import 'package:flutter/material.dart' hide SearchController;

import 'package:get/get.dart';

import '../controllers/search_controller.dart';

class SearchView extends GetView<SearchController> {
const SearchView({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('SearchView'),
centerTitle: true,
),
body: const Center(
child: Text(
'SearchView is working',
style: TextStyle(fontSize: 20),
),
),
);
}
}
9 changes: 8 additions & 1 deletion lib/app/routes/app_pages.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import 'package:flutter/material.dart';

import 'package:get/get.dart';

import '../../models/access_level.dart';
import '../../models/role.dart';
import '../../models/screens.dart';
import '../middleware/auth_middleware.dart';
import '../modules/cart/bindings/cart_binding.dart';
import '../modules/cart/views/cart_view.dart';
Expand All @@ -28,6 +30,8 @@ import '../modules/register/bindings/register_binding.dart';
import '../modules/register/views/register_view.dart';
import '../modules/root/bindings/root_binding.dart';
import '../modules/root/views/root_view.dart';
import '../modules/search/bindings/search_binding.dart';
import '../modules/search/views/search_view.dart';
import '../modules/settings/bindings/settings_binding.dart';
import '../modules/settings/views/settings_view.dart';
import '../modules/task_details/bindings/task_details_binding.dart';
Expand All @@ -36,7 +40,6 @@ import '../modules/tasks/bindings/tasks_binding.dart';
import '../modules/tasks/views/tasks_view.dart';
import '../modules/users/bindings/users_binding.dart';
import '../modules/users/views/users_view.dart';
import '../../models/screens.dart';

part 'app_routes.dart';
part 'screen_extension.dart';
Expand Down Expand Up @@ -150,5 +153,9 @@ class AppPages {
)
],
),
Screen.SEARCH.getPage(
page: () => const SearchView(),
binding: SearchBinding(),
),
];
}
2 changes: 2 additions & 0 deletions lib/app/routes/app_routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ abstract class Routes {
'${Screen.LOGIN.route}?then=${Uri.encodeQueryComponent(afterSuccessfulLogin)}';
static String REGISTER_THEN(String afterSuccessfulLogin) =>
'${Screen.REGISTER.route}?then=${Uri.encodeQueryComponent(afterSuccessfulLogin)}';
// static const SEARCH = _Paths.SEARCH;
}

// Keeping this as Get_Cli will require it. Any addition can later be added to Screen
Expand All @@ -51,4 +52,5 @@ abstract class _Paths {
// static const USERS = '/users';
// static const USER_PROFILE = '/:uId';
// static const MY_PRODUCTS = '/my-products';
// static const SEARCH = '/search';
}
9 changes: 6 additions & 3 deletions lib/app/routes/screen_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,14 @@ extension ScreenExtension on Screen {

extension RoleExtension on Role {
int getCurrentIndexFromRoute(GetNavConfig? currentRoute) {
final String? currentLocation = currentRoute?.location;
final String? currentLocation = currentRoute?.uri.path;
int currentIndex = 0;
if (currentLocation != null) {
currentIndex =
tabs.indexWhere((tab) => currentLocation.startsWith(tab.path));
currentIndex = tabs.indexWhere((tab) {
String parentPath = tab.parent?.path ?? '';
String fullPath = '$parentPath${tab.path}';
return currentLocation.startsWith(fullPath);
});
}
return (currentIndex > 0) ? currentIndex : 0;
}
Expand Down
Loading