This file contains 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() { | |
final stack = Stack<int>.of([42, 12, 1000]); | |
// final stack = Stack<int>(); | |
// stack.push(42); | |
// stack.push(12); | |
// stack.push(1000); | |
final lastValue = stack.pop(); | |
final letsPeek = stack.peek(); |
This file contains 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() { | |
// types | |
int a = 1; | |
double b = 2.1; | |
String c = 'hello'; | |
Object d = 2.1; | |
d = 1; | |
d = 'hello'; | |
dynamic e = 1; | |
e = 'hello'; |
This file contains 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
/// Homework | |
/// | |
/// Give me an example of: | |
/// | |
/// 1. Constant time - O(1) | |
/// 2. Linear time - O(n) | |
/// 3. Quadratic time - O(n2) | |
void main(List<String> arguments) { | |
final startTime = DateTime.now(); |
This file contains 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
/// Homework | |
/// | |
/// Give me an example of: | |
/// | |
/// 1. Constant time - O(1) | |
/// 2. Linear time - O(n) | |
/// 3. Quadratic time - O(n2) | |
void main(List<String> arguments) { | |
final startTime = DateTime.now(); |
This file contains 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() { | |
// 1. Comment | |
// This is a comment. | |
// 2. Printing | |
print('Hello'); | |
// 3. Math | |
print(3 + 7); | |
print(6 - 2); |
This file contains 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 'dart:io'; | |
import 'package:mailer/mailer.dart'; | |
import 'package:mailer/smtp_server.dart'; | |
Future<void> main() async { | |
final server = await createServer(); | |
print('Server started: ${server.address} port ${server.port}'); | |
await _handleRequests(server); | |
} |
This file contains 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
include: package:pedantic/analysis_options.yaml | |
analyzer: | |
strong-mode: | |
implicit-casts: false | |
implicit-dynamic: false |
This file contains 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:http_request_demo/state_management.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
This file contains 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'; | |
class PageManager { | |
final progressNotifier = ValueNotifier<ProgressBarState>( | |
ProgressBarState( | |
current: Duration.zero, | |
buffered: Duration.zero, | |
total: Duration.zero, | |
), | |
); |
This file contains 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:audio_video_progress_bar/audio_video_progress_bar.dart'; | |
import 'package:flutter/material.dart'; | |
import 'page_manager.dart'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatefulWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@override |