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
// 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. | |
// Future -> Stream | |
// FutureBuilder -> StreamBuilder | |
import 'dart:convert'; | |
import 'dart:math'; |
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'; | |
import 'package:http/http.dart' as http; | |
void main() async { | |
final data = await getData(); | |
// get the record list of any keys, 'Score' as an example | |
final recordList = (data['Information'] as List) | |
.firstWhere((t) => (t as Map).keys.first == 'Score')['Score'] |
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() { | |
// Bir dizi tanımlayarak içerisine bazı sayılar yerleştirelim | |
List<int> sayilar = [5, 10, 12, 15, 1]; | |
// Toplam değeri tutacak bir sayi tipinde değişken tanımlayalım | |
int toplam = 0; | |
// Dizideki elemanları toplam değişkenine eklemek için `for`döngüsü oluşturalım | |
for (int sayi in sayilar) { | |
toplam = toplam + sayi; |
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'; | |
import 'package:cloud_firestore/cloud_firestore.dart'; | |
import 'package:firebase_auth/firebase_auth.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:whisperp/consts/index.dart'; | |
import 'package:whisperp/messaging_ui/constants.dart'; | |
import 'package:http/http.dart' as http; | |
class WelcomeScreen extends StatefulWidget { |
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() { | |
for (int i = 0; i < 5; i++) { | |
print('hello ${i + 1}'); | |
getData(i + 1); | |
} | |
} | |
Future<void> getData(int sec) async { | |
await Future.delayed(Duration(seconds: sec)); | |
print("Merhaba"); |
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
name: Analyze, build and deploy for Web and Android | |
on: | |
push: | |
branches: | |
- alpha | |
pull_request: | |
branches: | |
- alpha |
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
name: Take screenshots | |
on: | |
workflow_dispatch: | |
jobs: | |
android: | |
name: Take Android screenshots | |
runs-on: macos-10.15 |
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; |