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:math' show Random; | |
import 'package:flutter/material.dart'; | |
List<bool> checkmarks = List.generate(10, (_) => false); | |
void main() { | |
runApp( | |
MaterialApp( | |
debugShowCheckedModeBanner: false, | |
title: 'Flutter Demo', |
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 'dart:math' as math; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); |
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
Future<void> repeat(void Function() repeat) async { | |
while (true) { | |
await Future.delayed(Duration(seconds: 1)); | |
repeat(); | |
} | |
} | |
void test() { | |
int a = 7; | |
repeat(() { |
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
class Test { | |
Map<String, String> data = {}; | |
Test(); | |
String toString() { | |
return '$data'; | |
} | |
} |
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
class Test { | |
final String text; | |
Test({ | |
required this.text, | |
}); | |
Future<void> hello() async { | |
await Future.delayed(Duration(seconds: 2)); | |
print(text); |
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:math'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(const AnimatedContainerExampleApp()); | |
class AnimatedContainerExampleApp extends StatelessWidget { | |
const AnimatedContainerExampleApp({super.key}); | |
@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'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
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'; | |
// https://dartpad.dev/6ff26f35a86f70855a10ef3a83cb721a | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); |
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
#!/bin/bash | |
# | |
# Create a template script. | |
# | |
# Add files containing "{Name}" to a script that will extract and change "{Name}" to something else | |
# | |
# Example: | |
# | |
#. NAME=mbench |
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
#!/bin/bash | |
function box() { | |
LEN=`expr "$1" : '.*'` | |
LINE=`printf "%${LEN}s" | tr " " "━"` | |
printf "┏━%s━┓\n" "$LINE" | |
printf "┃ %s ┃\n" "$1" | |
printf "┗━%s━┛\n" "$LINE" | |
} |
NewerOlder