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
@override | |
void initState() { | |
super.initState(); | |
random = Random(); | |
refreshList(); | |
} | |
Future<Null> refreshList() async { | |
refreshKey.currentState?.show(); | |
await Future.delayed(Duration(seconds: 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
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text("Hala para refrescar"), | |
), | |
body: list != null | |
? RefreshIndicator( | |
key: refreshKey, | |
child: ListView.builder( |
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
/** | |
* {@link WordAdapter} is an {@link ArrayAdapter} that can provide the layout for each list | |
* based on a data source, which is a list of {@link Word} objects. | |
* | |
*/ | |
public class WordAdapter extends ArrayAdapter<Word> { | |
WordAdapter(@NonNull Context context, ArrayList<Word> wordArrayList) { | |
// Here, we initialize the ArrayAdapter's internal storage for the context and the list. | |
// the second argument is used when the ArrayAdapter is populating a single TextView. |
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
function Stopwatch() { | |
let isStarted = false; | |
let startTime; | |
let stopTime; | |
Object.defineProperty(this, "duration", { | |
get: () => { | |
if(startTime && stopTime) { | |
return (stopTime - startTime) / 1000; | |
} |
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
package product.methods; | |
import com.sun.net.httpserver.HttpExchange; | |
import com.sun.net.httpserver.HttpHandler; | |
import java.net.URLDecoder; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; |
OlderNewer