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
| List<int> mergeSort(List<int> array) { | |
| // Stop recursion if array contains only one element | |
| if(array.length <= 1) { | |
| return array; | |
| } | |
| // split in the middle of the array | |
| int splitIndex = array.length ~/ 2; |
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'; |
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
| // 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
| 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
| // 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'; | |
| 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
| 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
| // 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 |