1
0
mirror of https://github.com/flutter/samples.git synced 2026-04-03 18:22:45 +00:00

Add flutter_lints to form_app (#822)

This commit is contained in:
Brett Morgan
2021-06-08 08:57:23 +10:00
committed by GitHub
parent fc1fe989fb
commit 12ba3b2245
23 changed files with 225 additions and 122 deletions

View File

@@ -11,10 +11,10 @@ class MockClient extends Mock implements http.Client {
MockClient() {
when(post('https://example.com/signin', body: anyNamed('body')))
.thenAnswer((answering) {
var body = answering.namedArguments[Symbol('body')];
dynamic body = answering.namedArguments[const Symbol('body')];
if (body != null && body is String) {
var decodedJson = json.decode(body);
var decodedJson = json.decode(body) as Map<String, String>;
if (decodedJson['email'] == 'root' &&
decodedJson['password'] == 'password') {