This file contains hidden or 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
void main() { | |
var sourceText = 'find me **this** and **my other string** please'; | |
var regexAsterisk = new RegExp("\*\*(.*?)\*\*"); | |
var splits = sourceText.split(regexAsterisk); | |
for (var split in splits) { | |
print(split); | |
} | |
} |
This file contains hidden or 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
void main() { | |
var sourceText = '**this** and **my other string** please'; | |
var regexAsterisk = new RegExp(r"\*\*(.*?)\*\*"); | |
var splits = sourceText.split(regexAsterisk); | |
for (var split in splits) { | |
print("IsEmpty:" + split.isEmpty.toString() + ":" + split); | |
} | |
} |
This file contains hidden or 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
/* | |
Firebase Security Rules | |
{ | |
"rules": { | |
".read": "auth != null", | |
} | |
} | |
*/ | |
This file contains hidden or 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 TextAndDropdown extends StatefulWidget { | |
@override | |
_TextAndDropdownState createState() => _TextAndDropdownState(); | |
} | |
class _TextAndDropdownState extends State<TextAndDropdown> { | |
int selectedDropdown; | |
String selectedText; |
This file contains hidden or 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:test/test.dart"; | |
void main() { | |
test("String.split() splits the string on the delimiter", () { | |
var string = "foo,bar,baz"; | |
expect(string.split(","), equals(["foo", "bar", "baz"])); | |
}); | |
} |
This file contains hidden or 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: testTesting | |
description: Its all about tests here. | |
dev_dependencies: | |
test: 1.3.0 |
This file contains hidden or 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 Parent {} | |
class Sub implements Parent { | |
String get blah => "blah"; | |
} | |
String fnSub(Sub sub) => sub.blah; | |
String aProblem(Parent parent) => fnSub(parent); |
This file contains hidden or 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
# updateFlutterVersion 1.23456 | |
function updateFlutterVersion { | |
cd $HOME/installs/flutter | |
CURRENTVERSION=$(git describe --tags) | |
if [ "${CURRENTVERSION}" == "$1" ]; then | |
echo "it looks like you're already on that branch" | |
echo "not changing version" | |
say 'failed' |
This file contains hidden or 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 slx { | |
echo "...stopping any backups, closing any programmes known to cause issues" | |
tmutil stopbackup | |
pkill -x qemu-system-i386 | |
pkill -x qemu-system-x86_64 | |
pkill -x Music | |
pkill -x VLC | |
echo "...turning off bluetooth & ejecting external drive" | |
blueutil --power 0 |
This file contains hidden or 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
analyzer: | |
linter: | |
rules: | |
prefer_single_quotes: true | |
curly_braces_in_flow_control_structures: false |
OlderNewer