Skip to content

Commit

Permalink
deep_links setup
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisamank committed Jul 16, 2022
1 parent ab554b4 commit 88a948e
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ migrate_working_dir/
/build/
/lib/firebase_options.dart
/android/app/google-services.json
/ios/firebase_app_id_file.json
lib/constants/secrets.dart
# Web related
lib/generated_plugin_registrant.dart
Expand Down
9 changes: 9 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with https://YOUR_HOST -->
<data
android:scheme="https"
android:host="shhh.crossknotcommunity.tech" />
</intent-filter>
</activity>
<activity android:name="com.linusu.flutter_web_auth.CallbackActivity" android:exported="true">
<intent-filter android:label="flutter_web_auth">
Expand Down
7 changes: 0 additions & 7 deletions ios/firebase_app_id_file.json

This file was deleted.

2 changes: 2 additions & 0 deletions lib/constants/app_constants.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class AppConstants {
AppConstants._();
static const String userCollectionId = 'users';
static const String profileLinkPrefix =
'https://shhh.crossknotcommunity.tech';
}
1 change: 1 addition & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:secret_dms/utils/provider_logger.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
setupDependencies();

runApp(
ProviderScope(
observers: [Logger()],
Expand Down
4 changes: 3 additions & 1 deletion lib/ui/pages/register/register_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flutter_svg/svg.dart';
import 'package:iconsax/iconsax.dart';
import 'package:secret_dms/constants/app_assets.dart';
import 'package:secret_dms/constants/app_colors.dart';
import 'package:secret_dms/constants/app_constants.dart';
import 'package:secret_dms/di/di.dart';
import 'package:secret_dms/models/states/auth_states.dart';
import 'package:secret_dms/themes/size_config.dart';
Expand Down Expand Up @@ -46,7 +47,8 @@ class _RegisterPageState extends ConsumerState<RegisterPage> {
if (_userController.text.isNotEmpty) {
ref.watch(authNotifierProvider.notifier).registerUser(
username: _userController.text,
dmLink: 'dmLink',
dmLink:
'${AppConstants.profileLinkPrefix}/${_userController.text}',
sessionToken: widget.sessionToken,
);
}
Expand Down
4 changes: 3 additions & 1 deletion lib/utils/provider_logger.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:developer';

import 'package:flutter_riverpod/flutter_riverpod.dart';

class Logger extends ProviderObserver {
Expand All @@ -8,7 +10,7 @@ class Logger extends ProviderObserver {
Object? newValue,
ProviderContainer container,
) {
print('''
log('''
{
"provider": "${provider.name ?? provider.runtimeType}",
"newValue": "$newValue"
Expand Down

0 comments on commit 88a948e

Please sign in to comment.