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'; | |
typedef Widget FormWidgetBuilder<T>(T t); | |
class GenericShizzle<T> extends StatefulWidget { | |
final FormWidgetBuilder<T> builder; | |
const GenericShizzle({ | |
this.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
import 'package:flutter/material.dart'; | |
typedef Widget FormWidgetBuilder<T>(T t); | |
class GenericShizzle<T> extends StatefulWidget { | |
final FormWidgetBuilder<T> builder; | |
const GenericShizzle({ | |
this.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
[ +30 ms] executing: [/Users/<user>/<Company>/<appname>/.flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H | |
[ +33 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H | |
[ ] 27321ebbad34b0a3fafe99fac037102196d655ff | |
[ ] executing: [/Users/<user>/<Company>/<appname>/.flutter/] git describe --match v*.*.* --first-parent --long --tags | |
[ +10 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags | |
[ ] v1.12.13+hotfix.5-0-g27321ebba | |
[ +8 ms] executing: [/Users/<user>/<Company>/<appname>/.flutter/] git rev-parse --abbrev-ref --symbolic @{u} | |
[ +7 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} | |
[ ] origin/stable | |
[ ] executing: [/Users/<user>/<Company>/<appname>/.flutter/] git ls-remote --get-url origin |
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'; | |
void main() { | |
runApp( | |
MaterialApp( | |
home: Scaffold( | |
body: SizedBox( | |
height: 500, | |
width: 500, | |
child: FittedBox(child: Text("i scale!")) |
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
00:02 +0: loading /Users/user/company/app-mobile/test/s3/s3_test.dart Unhandled exception: | |
Crash when compiling file:///Users/user/company/app-mobile/test/medbase/medbase_risks_test.dart, | |
at character offset null: | |
NoSuchMethodError: The method '[]' was called on null. | |
Receiver: null | |
Tried calling: [](0) | |
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5) | |
#1 computeVariance (package:front_end/src/fasta/kernel/type_algorithms.dart:95:42) | |
#2 computeVariance (package:front_end/src/fasta/kernel/type_algorithms.dart:149:17) | |
#3 SourceLibraryBuilder.computeVariances (package:front_end/src/fasta/source/source_library_builder.dart:2423:15) |
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'; | |
void main() => runApp(NavigationRestoration()); | |
// save this state | |
// map from user id -> user object (just string here) | |
const userData = { | |
42: "second user", | |
4711: "third user", | |
1337: "first user", |
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
extension Nullable<T> on T { | |
bool get isNull => this == null; | |
bool get isNotNull => !isNull; | |
void runIfNotNull(Function(T) function) { | |
if (isNotNull) function(this); | |
} | |
} | |
void main(){ | |
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
part 'app_info.freezed.dart'; | |
@freezed | |
abstract class AppInfo with _$AppInfo { | |
const factory AppInfo({ | |
String buildNumber, | |
String version, | |
String appName, | |
String packageId, | |
}) = _AppInfo; |
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
part 'app_info.g.dart'; | |
abstract class AppInfo implements Built<AppInfo, AppInfoBuilder> { | |
String get buildNumber; | |
String get version; | |
String get appName; | |
String get packageId; | |
AppInfo._(); |
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
@freezed | |
abstract class AppInfo with _$AppInfo { | |
const factory AppInfo({ | |
String buildNumber, | |
String version, | |
String appName, | |
String packageId, | |
}) = _AppInfo; | |
factory AppInfo.fromJson(Map<String, dynamic> json) => |