Gizem Malçok

Turkish documentation of the Route Management file has been prepared.

1 -- [Route Management](#route-management)  
2 - - [How to use](#how-to-use)  
3 - - [Navigation without named routes](#navigation-without-named-routes)  
4 - - [Navigation with named routes](#navigation-with-named-routes)  
5 - - [Send data to named Routes](#send-data-to-named-routes)  
6 - - [Dynamic urls links](#dynamic-urls-links) 1 +- [Rota Yönetimi (Route Management)](#route-management)
  2 + - [Nasıl kullanılır?](#how-to-use)
  3 + - [Adlandırılmış rotalar olmadan navigasyon](#navigation-without-named-routes)
  4 + - [Adlandırılmış rotalarla navigasyon](#adlandırılmış-rotalarla-navigasyon)
  5 + - [Verileri adlandırılmış Rotalara gönder](#send-data-to-named-routes)
  6 + - [Dinamik URL bağlantıları](#dynamic-urls-links)
7 - [Middleware](#middleware) 7 - [Middleware](#middleware)
8 - - [Navigation without context](#navigation-without-context) 8 + - [Bağlamsız(Context) Navigasyon](#navigation-without-context)
9 - [SnackBars](#snackbars) 9 - [SnackBars](#snackbars)
10 - [Dialogs](#dialogs) 10 - [Dialogs](#dialogs)
11 - [BottomSheets](#bottomsheets) 11 - [BottomSheets](#bottomsheets)
12 - - [Nested Navigation](#nested-navigation) 12 + - [İç İçe Navigasyon (Nested Navigation)](#nested-navigation)
13 13
14 -# Route Management 14 +# Rota Yönetimi (Route Management)
15 15
16 -This is the complete explanation of all there is to Getx when the matter is route management. 16 +Konu rota yönetimi olduğunda Getx için gereken her şeyin tam açıklaması budur.
17 17
18 -## How to use 18 +## Nasıl kullanılır?
19 19
20 -Add this to your pubspec.yaml file: 20 +Bunu pubspec.yaml dosyanıza ekleyin:
21 21
22 ```yaml 22 ```yaml
23 dependencies: 23 dependencies:
24 get: 24 get:
25 ``` 25 ```
26 26
27 -If you are going to use routes/snackbars/dialogs/bottomsheets without context, or use the high-level Get APIs, you need to simply add "Get" before your MaterialApp, turning it into GetMaterialApp and enjoy! 27 +Context olmadan routes/snackbars/dialogs/bottomsheets kullanacaksanız veya üst düzey Get API'lerini kullanacaksanız, `MaterialApp`'ınızdan önce `Get` eklemeniz, `GetMaterialApp`'a dönüştürmeniz ve keyfini çıkarmanız yeterlidir!
28 28
29 ```dart 29 ```dart
30 -GetMaterialApp( // Before: MaterialApp( 30 +GetMaterialApp( // Öncesi: MaterialApp(
31 home: MyHome(), 31 home: MyHome(),
32 ) 32 )
33 ``` 33 ```
34 34
35 -## Navigation without named routes 35 +## Adlandırılmış rotalar olmadan navigasyon
36 36
37 -To navigate to a new screen: 37 +Yeni bir ekrana gitmek için:
38 38
39 ```dart 39 ```dart
40 Get.to(NextScreen()); 40 Get.to(NextScreen());
41 ``` 41 ```
42 42
43 -To close snackbars, dialogs, bottomsheets, or anything you would normally close with Navigator.pop(context); 43 +Snackbar'ları, Dialog'ları, Bottomsheet'leri veya normalde kapatacağınız herhangi bir şeyi kapatmak için `Navigator.pop(context);`
44 44
45 ```dart 45 ```dart
46 Get.back(); 46 Get.back();
47 ``` 47 ```
48 48
49 -To go to the next screen and no option to go back to the previous screen (for use in SplashScreens, login screens and etc.) 49 +Bir sonraki ekrana gittikten sonra önceki ekrana geri dönme seçeneğinin olmaması için (SplashScreens, Login ekranlarında vb. kullanım için)
50 50
51 ```dart 51 ```dart
52 Get.off(NextScreen()); 52 Get.off(NextScreen());
53 ``` 53 ```
54 54
55 -To go to the next screen and cancel all previous routes (useful in shopping carts, polls, and tests) 55 +Bir sonraki ekrana gittikten sonra önceki tüm rotaları iptal etmek için (Alışveriş sepetlerinde, Anketlerde ve Testlerde kullanışlıdır)
56 56
57 ```dart 57 ```dart
58 Get.offAll(NextScreen()); 58 Get.offAll(NextScreen());
59 ``` 59 ```
60 60
61 -To navigate to the next route, and receive or update data as soon as you return from it: 61 +Bir sonraki rotaya gitmek ve geri döner dönmez verileri almak veya güncellemek için:
62 62
63 ```dart 63 ```dart
64 var data = await Get.to(Payment()); 64 var data = await Get.to(Payment());
65 ``` 65 ```
66 66
67 -on other screen, send a data for previous route: 67 +diğer ekrandan önceki rota için bir veri gönderin:
68 68
69 ```dart 69 ```dart
70 Get.back(result: 'success'); 70 Get.back(result: 'success');
71 ``` 71 ```
72 72
73 -And use it: 73 +Ve kullanın:
74 74
75 -ex: 75 +Örn:
76 76
77 ```dart 77 ```dart
78 if(data == 'success') madeAnything(); 78 if(data == 'success') madeAnything();
79 ``` 79 ```
80 80
81 -Don't you want to learn our syntax?  
82 -Just change the Navigator (uppercase) to navigator (lowercase), and you will have all the functions of the standard navigation, without having to use context  
83 -Example: 81 +Sözdizimimizi öğrenmek istemiyor musun? Navigator'ı (büyük harf) navigator (küçük harf) olarak değiştirin ve bağlam(context) kullanmak zorunda kalmadan standart navigasyonun tüm işlevlerine sahip olacaksınız.
  82 +Örnek:
84 83
85 ```dart 84 ```dart
86 85
87 -// Default Flutter navigator 86 +// Varsayılan Flutter Navigator
88 Navigator.of(context).push( 87 Navigator.of(context).push(
89 context, 88 context,
90 MaterialPageRoute( 89 MaterialPageRoute(
@@ -94,7 +93,7 @@ Navigator.of(context).push( @@ -94,7 +93,7 @@ Navigator.of(context).push(
94 ), 93 ),
95 ); 94 );
96 95
97 -// Get using Flutter syntax without needing context 96 +// Bağlama(context) ihtiyaç duymadan Flutter sözdizimini(syntax) kullanın
98 navigator.push( 97 navigator.push(
99 MaterialPageRoute( 98 MaterialPageRoute(
100 builder: (_) { 99 builder: (_) {
@@ -109,29 +108,29 @@ Get.to(HomePage()); @@ -109,29 +108,29 @@ Get.to(HomePage());
109 108
110 ``` 109 ```
111 110
112 -## Navigation with named routes 111 +### Adlandırılmış Rotalarla Navigasyon
113 112
114 -- If you prefer to navigate by namedRoutes, Get also supports this. 113 +- NamedRoutes ile gezinmeyi tercih ederseniz, Get de bunu destekler.
115 114
116 -To navigate to nextScreen 115 +nextScreen'e gitmek için
117 116
118 ```dart 117 ```dart
119 Get.toNamed("/NextScreen"); 118 Get.toNamed("/NextScreen");
120 ``` 119 ```
121 120
122 -To navigate and remove the previous screen from the tree. 121 +Ağaçta ve önceki ekranda gezinmek için.
123 122
124 ```dart 123 ```dart
125 Get.offNamed("/NextScreen"); 124 Get.offNamed("/NextScreen");
126 ``` 125 ```
127 126
128 -To navigate and remove all previous screens from the tree. 127 +Ağaçta gezinmek ve önceki tüm ekranları kaldırmak için
129 128
130 ```dart 129 ```dart
131 Get.offAllNamed("/NextScreen"); 130 Get.offAllNamed("/NextScreen");
132 ``` 131 ```
133 132
134 -To define routes, use GetMaterialApp: 133 +Rotaları tanımlamak için `GetMaterialApp`'i kullanın:
135 134
136 ```dart 135 ```dart
137 void main() { 136 void main() {
@@ -152,7 +151,7 @@ void main() { @@ -152,7 +151,7 @@ void main() {
152 } 151 }
153 ``` 152 ```
154 153
155 -To handle navigation to non-defined routes (404 error), you can define an unknownRoute page in GetMaterialApp. 154 +Tanımsız rotalara navigasyonu yönetmek için (404 hatası), `GetMaterialApp`'de bir `unknownRoute` sayfası tanımlayabilirsiniz.
156 155
157 ```dart 156 ```dart
158 void main() { 157 void main() {
@@ -169,30 +168,31 @@ void main() { @@ -169,30 +168,31 @@ void main() {
169 } 168 }
170 ``` 169 ```
171 170
172 -### Send data to named Routes 171 +### Verileri adlandırılmış Rotalara gönder
173 172
174 -Just send what you want for arguments. Get accepts anything here, whether it is a String, a Map, a List, or even a class instance. 173 +
  174 +Sadece argümanlar için istediğinizi gönderin. Get, burada bir String, Map, List veya hatta bir Class örneği olsun, her şeyi kabul eder.
175 175
176 ```dart 176 ```dart
177 Get.toNamed("/NextScreen", arguments: 'Get is the best'); 177 Get.toNamed("/NextScreen", arguments: 'Get is the best');
178 ``` 178 ```
179 179
180 -on your class or controller: 180 +sınıfınızda(class) veya denetleyicinizde(controller):
181 181
182 ```dart 182 ```dart
183 print(Get.arguments); 183 print(Get.arguments);
184 //print out: Get is the best 184 //print out: Get is the best
185 ``` 185 ```
186 186
187 -### Dynamic urls links 187 +### Dinamik URL bağlantıları
188 188
189 -Get offer advanced dynamic urls just like on the Web. Web developers have probably already wanted this feature on Flutter, and most likely have seen a package promise this feature and deliver a totally different syntax than a URL would have on web, but Get also solves that. 189 +Web'deki gibi gelişmiş dinamik url'ler sunun. Web geliştiricileri muhtemelen bu özelliği Flutter'da istemişlerdir ve büyük olasılıkla bir paketin bu özelliği vaat ettiğini ve bir URL'nin web'de bulunacağından tamamen farklı bir sözdizimi sunduğunu görmüşlerdir, ancak Get bunu da çözmektedir.
190 190
191 ```dart 191 ```dart
192 Get.offAllNamed("/NextScreen?device=phone&id=354&name=Enzo"); 192 Get.offAllNamed("/NextScreen?device=phone&id=354&name=Enzo");
193 ``` 193 ```
194 194
195 -on your controller/bloc/stateful/stateless class: 195 +controller/bloc/stateful/stateless Sınıfınıza:
196 196
197 ```dart 197 ```dart
198 print(Get.parameters['id']); 198 print(Get.parameters['id']);
@@ -201,7 +201,7 @@ print(Get.parameters['name']); @@ -201,7 +201,7 @@ print(Get.parameters['name']);
201 // out: Enzo 201 // out: Enzo
202 ``` 202 ```
203 203
204 -You can also receive NamedParameters with Get easily: 204 +Ayrıca Get ile Adlandırılmış Parametreleri kolayca alabilirsiniz:
205 205
206 ```dart 206 ```dart
207 void main() { 207 void main() {
@@ -217,7 +217,7 @@ void main() { @@ -217,7 +217,7 @@ void main() {
217 name: '/profile/', 217 name: '/profile/',
218 page: () => MyProfile(), 218 page: () => MyProfile(),
219 ), 219 ),
220 - //You can define a different page for routes with arguments, and another without arguments, but for that you must use the slash '/' on the route that will not receive arguments as above. 220 + //Argümanlı rotalar için farklı bir sayfa ve argümansız başka bir sayfa tanımlayabilirsiniz, ancak bunun için yukarıdaki gibi argüman almayacak olan rotada '/' eğik çizgisini kullanmanız gerekir.
221 GetPage( 221 GetPage(
222 name: '/profile/:user', 222 name: '/profile/:user',
223 page: () => UserProfile(), 223 page: () => UserProfile(),
@@ -233,31 +233,31 @@ void main() { @@ -233,31 +233,31 @@ void main() {
233 } 233 }
234 ``` 234 ```
235 235
236 -Send data on route name 236 +Rota adına veri gönder
237 237
238 ```dart 238 ```dart
239 Get.toNamed("/profile/34954"); 239 Get.toNamed("/profile/34954");
240 ``` 240 ```
241 241
242 -On second screen take the data by parameter 242 +İkinci ekranda verileri parametreye göre alın
243 243
244 ```dart 244 ```dart
245 print(Get.parameters['user']); 245 print(Get.parameters['user']);
246 // out: 34954 246 // out: 34954
247 ``` 247 ```
248 248
249 -or send multiple parameters like this 249 +veya bunun gibi birden çok parametre gönderin
250 250
251 ```dart 251 ```dart
252 Get.toNamed("/profile/34954?flag=true&country=italy"); 252 Get.toNamed("/profile/34954?flag=true&country=italy");
253 ``` 253 ```
254 -or 254 +veya
255 ```dart 255 ```dart
256 var parameters = <String, String>{"flag": "true","country": "italy",}; 256 var parameters = <String, String>{"flag": "true","country": "italy",};
257 Get.toNamed("/profile/34954", parameters: parameters); 257 Get.toNamed("/profile/34954", parameters: parameters);
258 ``` 258 ```
259 259
260 -On second screen take the data by parameters as usually 260 +İkinci ekranda, verileri genellikle olduğu gibi parametrelere göre alın
261 261
262 ```dart 262 ```dart
263 print(Get.parameters['user']); 263 print(Get.parameters['user']);
@@ -268,11 +268,11 @@ print(Get.parameters['country']); @@ -268,11 +268,11 @@ print(Get.parameters['country']);
268 268
269 269
270 270
271 -And now, all you need to do is use Get.toNamed() to navigate your named routes, without any context (you can call your routes directly from your BLoC or Controller class), and when your app is compiled to the web, your routes will appear in the url <3 271 +Ve şimdi tek yapmanız gereken, herhangi bir bağlam(context) olmaksızın adlandırılmış rotalarınızda gezinmek için Get.toNamed()'i kullanmaktır (rotalarınızı doğrudan BLoC veya Controller sınıfınızdan çağırabilirsiniz) ve uygulamanız web'de derlendiğinde, rotalar url'de görünecek <3
272 272
273 ### Middleware 273 ### Middleware
274 274
275 -If you want to listen Get events to trigger actions, you can to use routingCallback to it 275 +Eylemleri tetiklemek için olayları almak dinlemek istiyorsanız routingCallback'i kullanabilirsiniz.
276 276
277 ```dart 277 ```dart
278 GetMaterialApp( 278 GetMaterialApp(
@@ -284,7 +284,7 @@ GetMaterialApp( @@ -284,7 +284,7 @@ GetMaterialApp(
284 ) 284 )
285 ``` 285 ```
286 286
287 -If you are not using GetMaterialApp, you can use the manual API to attach Middleware observer. 287 +GetMaterialApp kullanmıyorsanız, Middleware gözlemcisini(observer) eklemek için manuel API'yi kullanabilirsiniz.
288 288
289 ```dart 289 ```dart
290 void main() { 290 void main() {
@@ -294,21 +294,21 @@ void main() { @@ -294,21 +294,21 @@ void main() {
294 initialRoute: "/", 294 initialRoute: "/",
295 navigatorKey: Get.key, 295 navigatorKey: Get.key,
296 navigatorObservers: [ 296 navigatorObservers: [
297 - GetObserver(MiddleWare.observer), // HERE !!! 297 + GetObserver(MiddleWare.observer), // Burası !!!
298 ], 298 ],
299 ), 299 ),
300 ); 300 );
301 } 301 }
302 ``` 302 ```
303 303
304 -Create a MiddleWare class 304 +Bir MiddleWare sınıfı oluşturun
305 305
306 ```dart 306 ```dart
307 class MiddleWare { 307 class MiddleWare {
308 static observer(Routing routing) { 308 static observer(Routing routing) {
309 - /// You can listen in addition to the routes, the snackbars, dialogs and bottomsheets on each screen.  
310 - ///If you need to enter any of these 3 events directly here,  
311 - ///you must specify that the event is != Than you are trying to do. 309 + /// Her ekranda rotalar, snackbarlar, diyaloglar ve bottomsheetleri ek olarak dinleyebilirsiniz.
  310 + ///Bu 3 olaydan herhangi birini doğrudan buraya girmeniz gerekiyorsa,
  311 + ///Yapmaya çalıştığınızdan daha fazla olayın olduğunu != kullanarak belirtmelisiniz.
312 if (routing.current == '/second' && !routing.isSnackbar) { 312 if (routing.current == '/second' && !routing.isSnackbar) {
313 Get.snackbar("Hi", "You are on second route"); 313 Get.snackbar("Hi", "You are on second route");
314 } else if (routing.current =='/third'){ 314 } else if (routing.current =='/third'){
@@ -318,7 +318,7 @@ class MiddleWare { @@ -318,7 +318,7 @@ class MiddleWare {
318 } 318 }
319 ``` 319 ```
320 320
321 -Now, use Get on your code: 321 +Şimdi, Get on kodunu kullanın:
322 322
323 ```dart 323 ```dart
324 class First extends StatelessWidget { 324 class First extends StatelessWidget {
@@ -391,11 +391,11 @@ class Third extends StatelessWidget { @@ -391,11 +391,11 @@ class Third extends StatelessWidget {
391 } 391 }
392 ``` 392 ```
393 393
394 -## Navigation without context 394 +## Bağlamsız(Context) Navigasyon
395 395
396 ### SnackBars 396 ### SnackBars
397 397
398 -To have a simple SnackBar with Flutter, you must get the context of Scaffold, or you must use a GlobalKey attached to your Scaffold 398 +Flutter ile basit bir SnackBar'a sahip olmak için Scaffold bağlamını(context) almalısınız veya Scaffold'unuza bağlı bir GlobalKey kullanmalısınız.
399 399
400 ```dart 400 ```dart
401 final snackBar = SnackBar( 401 final snackBar = SnackBar(
@@ -405,18 +405,18 @@ final snackBar = SnackBar( @@ -405,18 +405,18 @@ final snackBar = SnackBar(
405 onPressed: (){} 405 onPressed: (){}
406 ), 406 ),
407 ); 407 );
408 -// Find the Scaffold in the widget tree and use  
409 -// it to show a SnackBar. 408 +// Widget ağacında Scaffold'u bulun ve kullanın
  409 +// bir SnackBar göstermek için.
410 Scaffold.of(context).showSnackBar(snackBar); 410 Scaffold.of(context).showSnackBar(snackBar);
411 ``` 411 ```
412 412
413 -With Get: 413 +Get ile:
414 414
415 ```dart 415 ```dart
416 Get.snackbar('Hi', 'i am a modern snackbar'); 416 Get.snackbar('Hi', 'i am a modern snackbar');
417 ``` 417 ```
418 418
419 -With Get, all you have to do is call your Get.snackbar from anywhere in your code or customize it however you want! 419 +Get ile, Yapmanız gereken tek şey kodunuzun herhangi bir yerinden Get.snackbar'ınızı aramak veya onu istediğiniz gibi özelleştirmek!
420 420
421 ```dart 421 ```dart
422 Get.snackbar( 422 Get.snackbar(
@@ -468,18 +468,18 @@ Get.snackbar( @@ -468,18 +468,18 @@ Get.snackbar(
468 /////////////////////////////////// 468 ///////////////////////////////////
469 ``` 469 ```
470 470
471 -If you prefer the traditional snackbar, or want to customize it from scratch, including adding just one line (Get.snackbar makes use of a mandatory title and message), you can use  
472 -`Get.rawSnackbar();` which provides the RAW API on which Get.snackbar was built. 471 +Geleneksel snackbar'ı tercih ediyorsanız veya yalnızca bir satır eklemek de dahil olmak üzere sıfırdan özelleştirmek istiyorsanız (Get.snackbar zorunlu bir başlık ve mesaj kullanır),
  472 +Get.snackbar'ın üzerine inşa edildiği RAW API'sini sağlayan `Get.rawSnackbar();` kullanabilirsiniz.
473 473
474 ### Dialogs 474 ### Dialogs
475 475
476 -To open dialog: 476 +Dialog'u açmak için:
477 477
478 ```dart 478 ```dart
479 Get.dialog(YourDialogWidget()); 479 Get.dialog(YourDialogWidget());
480 ``` 480 ```
481 481
482 -To open default dialog: 482 +Varsayılan dialog açmak için:
483 483
484 ```dart 484 ```dart
485 Get.defaultDialog( 485 Get.defaultDialog(
@@ -488,15 +488,15 @@ Get.defaultDialog( @@ -488,15 +488,15 @@ Get.defaultDialog(
488 ); 488 );
489 ``` 489 ```
490 490
491 -You can also use Get.generalDialog instead of showGeneralDialog. 491 +showGeneralDialog yerine Get.generalDialog'u da kullanabilirsiniz.
492 492
493 -For all other Flutter dialog widgets, including cupertinos, you can use Get.overlayContext instead of context, and open it anywhere in your code.  
494 -For widgets that don't use Overlay, you can use Get.context.  
495 -These two contexts will work in 99% of cases to replace the context of your UI, except for cases where inheritedWidget is used without a navigation context. 493 +Cupertinos dahil olmak üzere tüm diğer Flutter Dialog widget'ları için bağlam(context) yerine Get.overlayContext'i kullanabilir ve kodunuzun herhangi bir yerinde açabilirsiniz.
  494 +Overlay kullanmayan widget'lar için Get.context'i kullanabilirsiniz.
  495 +Bu iki bağlam(context), inheritedWidget'ın bir gezinme bağlamı(context) olmadan kullanıldığı durumlar dışında, kullanıcı arayüzünüzün bağlamını(context) değiştirmek için vakaların %99'unda çalışacaktır.
496 496
497 ### BottomSheets 497 ### BottomSheets
498 498
499 -Get.bottomSheet is like showModalBottomSheet, but don't need of context. 499 +Get.bottomSheet, showModalBottomSheet gibidir, ancak bağlama(context) ihtiyaç duymaz.
500 500
501 ```dart 501 ```dart
502 Get.bottomSheet( 502 Get.bottomSheet(
@@ -519,18 +519,18 @@ Get.bottomSheet( @@ -519,18 +519,18 @@ Get.bottomSheet(
519 ); 519 );
520 ``` 520 ```
521 521
522 -## Nested Navigation 522 +## İç İçe Navigasyon (Nested Navigation)
523 523
524 -Get made Flutter's nested navigation even easier.  
525 -You don't need the context, and you will find your navigation stack by Id. 524 +Flutter'ın iç içe gezinmesini daha da kolaylaştırın.
  525 +İçeriğe ihtiyacınız yoktur ve navigasyon yığınınızı kimliğe(ID) göre bulacaksınız.
526 526
527 -- NOTE: Creating parallel navigation stacks can be dangerous. The ideal is not to use NestedNavigators, or to use sparingly. If your project requires it, go ahead, but keep in mind that keeping multiple navigation stacks in memory may not be a good idea for RAM consumption. 527 +- NOT: Paralel gezinme yığınları oluşturmak tehlikeli olabilir. İdeal olan, NestedNavigators'ı kullanmamak veya idareli kullanmaktır. Projeniz gerektiriyorsa, devam edin, ancak bellekte birden çok gezinme yığınını tutmanın RAM tüketimi için iyi bir fikir olmayabileceğini unutmayın.
528 528
529 -See how simple it is: 529 +Bakın ne kadar basit:
530 530
531 ```dart 531 ```dart
532 Navigator( 532 Navigator(
533 - key: Get.nestedKey(1), // create a key by index 533 + key: Get.nestedKey(1), // index göre anahtar oluşturma
534 initialRoute: '/', 534 initialRoute: '/',
535 onGenerateRoute: (settings) { 535 onGenerateRoute: (settings) {
536 if (settings.name == '/') { 536 if (settings.name == '/') {
@@ -543,7 +543,7 @@ Navigator( @@ -543,7 +543,7 @@ Navigator(
543 child: TextButton( 543 child: TextButton(
544 color: Colors.blue, 544 color: Colors.blue,
545 onPressed: () { 545 onPressed: () {
546 - Get.toNamed('/second', id:1); // navigate by your nested route by index 546 + Get.toNamed('/second', id:1); // indexe göre iç içe geçmiş rotanıza göre gezinin
547 }, 547 },
548 child: Text("Go to second"), 548 child: Text("Go to second"),
549 ), 549 ),