Derin Bağlantı ve URL Gezintisi
Flutter uygulamalarında derin bağlantıları ve URL tabanlı gezintiyi yönetmeyi öğrenin; böylece harici bağlantılar ve web URL çubuğu kullanıcıları doğru ekrana yönlendirebilir.
Derin Bağlantı ve URL Gezintisi, CoddyKit'te ücretsiz bir Flutter Mobile Development dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Flutter Mobile Development öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Flutter Mobile Development kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Why Deep Linking Matters
Deep linking lets an external source — an email, a notification, or a browser URL — open a specific screen inside your app instead of the home page.
- Improves user experience for shared content
- Essential for marketing campaigns and notifications
- On Flutter web, it ties your app to the browser URL bar
You will use a URL-based router to make this work cleanly.
Two Kinds of Deep Links
There are two common forms:
- Custom scheme links like
myapp://product/42 - Universal / App Links using real
https://URLs
Universal links are preferred because they fall back to a website if the app is not installed.
Meet the Router API
Flutter's Router API (Navigator 2.0) maps URLs to screens. Packages like go_router wrap it in a friendly declarative API.
You define routes with path patterns, and the router parses incoming URLs for you.
final router = GoRouter(
routes: [
GoRoute(path: '/', builder: (c, s) => HomeScreen()),
GoRoute(path: '/product/:id', builder: (c, s) => ProductScreen(s.pathParameters['id']!)),
],
);Path Parameters
The :id segment is a path parameter. When a user opens /product/42, you read it with state.pathParameters['id'].
This is how a deep link carries data into your screen.
GoRoute(
path: '/product/:id',
builder: (context, state) {
final id = state.pathParameters['id'];
return ProductScreen(productId: id!);
},
);Query Parameters
For optional values use query parameters: /search?q=phones&sort=price.
Read them via state.uri.queryParameters.
GoRoute(
path: '/search',
builder: (context, state) {
final q = state.uri.queryParameters['q'] ?? '';
return SearchScreen(query: q);
},
);Wiring the Router In
Use MaterialApp.router instead of MaterialApp so the app delegates navigation to the router.
MaterialApp.router(
routerConfig: router,
title: 'My App',
);Navigating Programmatically
You can still navigate from code with context.go() (replace stack) or context.push() (add to stack).
ElevatedButton(
onPressed: () => context.go('/product/42'),
child: const Text('Open product'),
);Android Configuration
For real https App Links on Android, add an intent-filter with autoVerify to AndroidManifest.xml and host an assetlinks.json file on your domain.
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="myapp.com" />
</intent-filter>iOS Configuration
On iOS, configure Associated Domains in Xcode with applinks:myapp.com and host an apple-app-site-association file at your domain root.
<!-- Associated Domains entitlement -->
applinks:myapp.comHandling Unknown Routes
Always provide an errorBuilder so a bad or unknown deep link shows a friendly 404 screen instead of crashing.
GoRouter(
routes: [...],
errorBuilder: (context, state) => const NotFoundScreen(),
);Redirects & Guards
Use the redirect callback to guard routes — for example send unauthenticated users from /profile to /login.
GoRouter(
redirect: (context, state) {
final loggedIn = auth.isLoggedIn;
if (!loggedIn && state.uri.path == '/profile') return '/login';
return null;
},
routes: [...],
);Quick Check
How do you read the value of id from a deep link matching /product/:id?
Recap
You learned how to add deep linking and URL navigation to a Flutter app:
- Custom scheme vs universal/App Links
- Path and query parameters with the Router API
- Native config on Android and iOS
- Error handling and route guards
Now external links and the browser URL bar can drive your app's navigation.
Sıkça Sorulan Sorular
“Derin Bağlantı ve URL Gezintisi” dersi ücretsiz mi?
Evet — “Derin Bağlantı ve URL Gezintisi” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Flutter Mobile Development kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Flutter Mobile Development kursu toplamda 4 dersten oluşur.
“Derin Bağlantı ve URL Gezintisi” dersinde ne öğreneceğim?
Flutter uygulamalarında derin bağlantıları ve URL tabanlı gezintiyi yönetmeyi öğrenin; böylece harici bağlantılar ve web URL çubuğu kullanıcıları doğru ekrana yönlendirebilir. Flutter Mobile Development ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
Flutter Mobile Development öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te Flutter Mobile Development, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.
“Derin Bağlantı ve URL Gezintisi” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu Flutter Mobile Development dersinde kod yazıp çalıştırabilir miyim?
Evet. Her Flutter Mobile Development dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- Temel Sayfa Gezinmesi
- Adlandırılmış Rotalar ve Bağımsız Değişkenler
- TabBars ve Çekmeceler
- Derin Bağlantı ve URL Gezintisi