This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 1- Flutter'daki RaisedButton widget'ı, daha yeni sürümlerde ElevatedButton ile değiştirildi. | |
Bu yüzden kodumuzdaki RaisedButton kullanımlarını ElevatedButton ile güncellememiz gerekiyor. | |
2- Null Safety: | |
Flutter'da Dart dilinin null safety özelliği ile, tüm değişkenler varsayılan olarak 'null olamaz' hâle geldi. | |
Bu, değişkenlerin değerlerini belirli bir değerle başlatmamız gerektiği anlamına gelir. | |
Örneğimizde bu değişkenlere başlangıç değeri verebiliriz: | |
num sayi1 = 0, sayi2 = 0, sonuc = 0; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; // JSON işlemleri için gerekli | |
import 'package:http/http.dart' as http; | |
class AuthService { | |
final String baseUrl = 'https://ornekapi.com'; // Kullanılacak API'nin temel URL adresi | |
// Kullanıcının giriş yapması için login fonksiyonu | |
Future<bool> login(String email, String password) async { | |
// API'ya POST isteği gönder | |
final response = await http.post( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
var window = _MainWindowState(); // _MainWindowState sınıfından bir nesne oluşturduk. | |
print(window.scoreText); | |
print(window.resultScore); | |
} | |
class _MainWindowState { | |
String scoreText = 'Your Score Is:'; | |
String score = '0'; | |
String? resultScore; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
İlk olarak bu tür bir durumda `.zshrc` dosyasının içeriğini kontrol etmek gereklidir. | |
`.zshrc` dosyası, zsh kabuğunun başlangıçta çalıştırdığı komutları içeren bir dosyadır. | |
Eğer bu dosyada bir hata varsa veya doğru PATH ayarları yapılmamışsa, bazı komutların | |
çalıştırılamayacağı durumları ortaya çıkarabilir. | |
Sorunun çözümü için aşağıdaki adımları takip edebilirsiniz: | |
1. **.zshrc Dosyasını Açma:** | |
Terminali açın ve `.zshrc` dosyasını düzenlemek için `vim .zshrc` komutunu çalıştırın. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); // Uygulamayı başlatan ana fonksiyon. | |
// Ana uygulama widget'ı. | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: "Temel mesajlaşma arayüzü", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Bu kodda, "DropdownButtonWidget" adında ayrı bir Dart dosyasında tanımlanan | |
bir "DropdownButton" widget'ı bulunmaktadır. Bu widget, bir değer seçildiğinde | |
ana dosyadaki bir callback fonksiyonunu çağırarak seçilen değeri iletmektedir. | |
Bu sayede ana dosyadaki "Text" widget'ı, seçilen değeri gösterebilir.*/ | |
### main.dart: | |
import 'package:flutter/material.dart'; | |
import 'dropdown_widget.dart'; // DropdownButton widget'ını içeren dosyayı import ediyoruz. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp( | |
MaterialApp( | |
home: GirisSayfasi(), | |
), | |
); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
var liste1 = List.filled(4, 0); // 4 elemanlı, tüm elemanları 0 olan bir liste oluşturur. | |
var liste2 = <int>[]; // Boş, dinamik büyüklüğe sahip bir liste. | |
print("Liste 1: $liste1"); | |
// liste2'ye eleman ekleyelim | |
liste2.add(10); | |
liste2.add(20); | |
liste2.add(30); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
initialRoute: "/", | |
routes: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); // Uygulamanın başlangıç noktası. | |
class MyApp extends StatelessWidget { | |
// Uygulamanın ana yapı taşı olan widget. Material tasarım stili kullanılıyor. | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
initialRoute: "/", |
NewerOlder