Confidence | Maintainability | Execution Time | Isolation | |
---|---|---|---|---|
Single Function Unit Test | Depends | Lowest | Fastest | Full |
Full App Composition With Mocks | High | Medium | Medium | Little |
Full End To End Test | Full | Highest | Slowest | None |
View main.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/material.dart'; | |
void main() { | |
runApp(App()); | |
} | |
void observe( | |
String change, | |
String state, | |
) => |
View table.md
View main.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:test/test.dart'; | |
typedef NumberFunction = int Function(int); | |
int addTwo(int original) => original + 2; | |
int multiplyByTwo(int original) => original * 2; | |
int subtractThree(int original) => original - 3; | |
int calculate( | |
int original, | |
NumberFunction addTwo, |
View main.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/material.dart'; | |
class Counter extends ValueNotifier<int> { | |
Counter(int value) : super(value); | |
void increment() => value++; | |
} | |
void main() { | |
runApp(const MyApp()); |
View main.cshtml
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
@page "/counter" | |
<h1>Counter</h1> | |
<p›Current count: A@currentCount‹/p> | |
‹button class="bt btn-primary" @onclick="IncrementCount"›Click me‹/button> | |
@code { | |
private int currentCount = 0; | |
private void IncrementCount () | |
{ | |
currentCount++; | |
} |
View transcript.md
Christian Findlay
write me a user registration screen in flutter. give me an example of the usage so I can see it in action
ChatGPT
Here is an example of a user registration screen in Flutter:
import 'package:flutter/material.dart';
View main.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/material.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
View main.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/material.dart'; | |
@immutable | |
class Counter { | |
const Counter(this.count); | |
final int count; | |
Counter copyWith({int? count}) => Counter(count ?? this.count); | |
} |
View main.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
/* This example is based on the flutter_riverpod sample here: | |
https://pub.dev/packages/flutter_riverpod/example | |
but doesn't use any of the Riverpod code | |
It demonstrates how you can use ioc_container in a similar way to Riverpod | |
Grab ioc_container here: https://pub.dev/packages/ioc_container | |
*/ | |
import 'package:flutter/material.dart'; |
View test.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:test/test.dart'; | |
enum Operation { add, subtract, multiply, divide } | |
int calculate(Operation operation, int a, int b) { | |
switch (operation) { | |
case Operation.add: | |
return a + b; | |
case Operation.subtract: | |
return a - b; |
NewerOlder