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:parallax_image/parallax_image.dart'; | |
class ArticlePage extends StatefulWidget { | |
@override | |
ArticlePageState createState() { | |
return new ArticlePageState(); | |
} | |
} |
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
/// This is pseudo-code which drafts possible way of using Google's `actions-on-google` Node.js package. | |
/// This code has not been tested, compiled or ran anywhere. | |
@JS() | |
library actionssdk; | |
import 'package:firebase_functions_interop/firebase_functions_interop.dart'; | |
import 'package:js/js.dart'; | |
import 'package:js/js_util.dart'; | |
import 'package:node_interop/node_interop.dart'; |
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/widgets.dart'; | |
class Annotation extends Comparable<Annotation> { | |
Annotation({@required this.range, this.style}); | |
final TextRange range; | |
final TextStyle style; | |
@override | |
int compareTo(Annotation other) { | |
return range.start.compareTo(other.range.start); |
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 _MyHomePageState extends State<MyHomePage> { | |
int _counter = 0; | |
bool _hide = false; | |
FocusNode _focusNode; | |
@override | |
void initState() { | |
super.initState(); | |
_focusNode = new FocusNode(); | |
_focusNode.addListener(_handleFocusChange); |
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 <assert.h> | |
#include <chrono> | |
#include <embedder.h> | |
#include <glfw3.h> | |
#include <iostream> | |
static_assert(FLUTTER_ENGINE_VERSION == 1, ""); | |
static const size_t kInitialWindowWidth = 800; |
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:async'; | |
void main() { | |
// We retrieve boolean value 3 times in the for-loop below and print it. | |
for (var i = 1; i <= 3; i++) { | |
print('Printing "$value" $i time.'); | |
} | |
} | |
/// Internal cache for our 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
# Workaround which: | |
# * Starts observatory in background | |
# * Runs the test suite | |
# * Collects coverage and sends it to Codecov | |
# | |
# Someday the `test` package will support observatory and below steps | |
# could be simplified. | |
# | |
# Prerequisites: | |
# * Have Travis CI build for your repo |