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
// Dartpad: https://dartpad.dartlang.org/862be4c1fb446bbb36357a0615bba3b1 | |
class AsyncClass { | |
int value = 0; | |
int numberOfCalls = 0; | |
Future<String> getAsyncValue(Duration duration) async { | |
final callerNumber = ++numberOfCalls; | |
await Future.delayed(duration); | |
value++; |
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 SetStateScreen extends StatelessWidget { | |
const SetStateScreen({ | |
Key? key, | |
}) : super(key: key); | |
@override | |
Widget build(BuildContext context) => Scaffold( | |
appBar: AppBar( |
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
#!/usr/bin/env bash | |
# 1 | |
# Install the required GNU C Library and Java Dev Kit | |
# The especific packages may vary depending on your WSL distribution (these ones work for Ubuntu). | |
sudo apt-get install -y libc6-dev-i386 lib32z1 openjdk-8-jdk | |
# 2 | |
# Make the JDK globally accessible. | |
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 |
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
name: bloc_samples | |
packages: | |
- "*" | |
- analysis_options/* | |
- features/** | |
scripts: | |
gen:single: | |
run: melos exec -c 1 --fail-fast -- flutter pub run build_runner build --delete-conflicting-outputs |