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
// Constructor function. Code run by the "new" operator | |
var Rabbit = function(name) { | |
// All Rabbit instances have their own property "name" | |
this.name = name; | |
} | |
// All Rabbit instances can speak, of course! | |
Rabbit.prototype.speak = function(what) { | |
return this.name + " says: " + what; | |
} |
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'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: RelayoutBoundariesCrash(), |
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
// Provided by flutter/plugins or similar | |
class Plugin { | |
@override | |
void noSuchMethod(Invocation i) { | |
throw Exception('Plugin does not implement method ${i.memberName}'); | |
} | |
} | |
class MockPlugin extends Plugin { | |
@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
Future<String> asyncFunctionn() async { | |
return Future<String>.delayed( | |
const Duration(milliseconds: 10), | |
() => "Async function", | |
); | |
} | |
String syncFunction() { | |
return "Sync function"; | |
} |
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
{ | |
"hosting": { | |
"public": "build/web", | |
"ignore": [ | |
"firebase.json", | |
"**/.*", | |
"**/node_modules/**" | |
], | |
"headers": [ | |
{ |