feat(deepLinks): added chat and profile deeplinks

This commit is contained in:
Username1548
2025-09-10 08:08:58 +03:00
parent 77666aca0e
commit 82bc51e45c
17 changed files with 69 additions and 122 deletions

View File

@@ -84,7 +84,7 @@ class AppRouter {
navigatorKey: navigatorKey,
redirect: (context, state) {
final segments = state.uri.pathSegments;
if (segments.length >= 3) {
if (segments.length == 3) {
final type = segments[1];
final contentIdentifier = segments[2];
@@ -101,6 +101,17 @@ class AppRouter {
case 'diet':
FlutterNativeSplash.remove();
return '/about-diet-screen?slug=$contentIdentifier';
case 'chat':
FlutterNativeSplash.remove();
return '/chat-screen';
}
}
if (segments.length == 2) {
final type = segments[1];
switch (type) {
case 'chat':
FlutterNativeSplash.remove();
return '/chat-screen';
}
}
@@ -279,7 +290,7 @@ class AppRouter {
GoRoute(
path: '/profile-screen',
name: 'profileScreen',
builder: (context, state) => ProfileScreen(author: state.extra as Author),
builder: (context, state) => ProfileScreen(slug: state.extra as String),
),
GoRoute(
path: '/subs-screen/:slug',

View File

@@ -1,6 +1,6 @@
import 'package:eatvio_app/core/env_config.dart';
String baseUrl = EnvConfig.baseUrl;
String baseUrl = EnvConfig.devBaseUrl;
bool hidePlans = const bool.fromEnvironment('HIDE_PLANS', defaultValue: false);
const buildDate = String.fromEnvironment('BUILD_DATE', defaultValue: '');