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
// static => bu kelimenin en temel varlık sebebi sınıftaki method veya property'e sınıftan örnek | |
// oluşturmadan erişmektir. | |
// factory => bu kelime sayesinde constructor methoduna müdahale imkanı elde ederiz. | |
class Kitap { | |
final String baslik; | |
static int? toplamKitapSayisi; | |
static toplamdanDus() { |
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'; | |
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
// primitive (değer tipler) variables = değişkenler | |
// sayılar num, int, double | |
// metinsel ifadeler string | |
// evet-hayır ifadeleri bool |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override |
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'; | |
extension StringExts on String { | |
String toLowerCaseTr() { | |
return replaceAll('I', 'ı').replaceAll('İ', 'i').toLowerCase(); | |
} | |
} | |
void main() { | |
runApp( |
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'; | |
import 'package:firebase_core/firebase_core.dart'; | |
import 'package:cloud_firestore/cloud_firestore.dart'; | |
import 'package:firebase_auth/firebase_auth.dart'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() async { | |
try { | |
WidgetsFlutterBinding.ensureInitialized(); |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
import 'dart:math' show Random; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { |
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( | |
theme: ThemeData(primarySwatch: Colors.indigo), | |
home: MyHomePage(), | |
), | |
); | |
} |
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
// Burada bir fonksiyon tanımı görüyoruz. | |
void sayiYazdir(int sayi) { | |
// print ifadesini derinlemesine öğrenmek isteyenler => System call | |
print("The number is $sayi"); // Print to console. | |
} | |
int toplamaIslemiYap(int sayi1, int sayi2) { | |
return sayi1 + sayi2; | |
} |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
void main() { | |
sayiYazdir(sayi1: 5); | |
runApp(BenimWidgetim()); |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
// calback => başka bir fonksiyona parametre olarak gönderilen fonksiyon | |
// Birinci yönü kullanım şekli | |
// İkinci yönü ise tanımlanma şekli | |
import 'dart:io'; |