-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testes de unidade e Widget com mocks: Boas práticas no Flutter
- Loading branch information
Showing
25 changed files
with
577 additions
and
301 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
#!/bin/sh | ||
# This is a generated file; do not edit or check into version control. | ||
export "FLUTTER_ROOT=C:\flutter" | ||
export "FLUTTER_APPLICATION_PATH=C:\workspace\estudos\bytebank-alura" | ||
export "FLUTTER_APPLICATION_PATH=C:\Users\Murilo Oliveira\workspace\bytebank-alura" | ||
export "FLUTTER_TARGET=lib\main.dart" | ||
export "FLUTTER_BUILD_DIR=build" | ||
export "SYMROOT=${SOURCE_ROOT}/../build\ios" | ||
export "OTHER_LDFLAGS=$(inherited) -framework Flutter" | ||
export "FLUTTER_FRAMEWORK_DIR=C:\flutter\bin\cache\artifacts\engine\ios" | ||
export "FLUTTER_BUILD_NAME=1.0.0" | ||
export "FLUTTER_BUILD_NUMBER=1" | ||
export "DART_OBFUSCATION=false" | ||
export "TRACK_WIDGET_CREATION=false" | ||
export "TREE_SHAKE_ICONS=false" | ||
export "PACKAGE_CONFIG=.packages" |
This file was deleted.
Oops, something went wrong.
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,41 @@ | ||
import 'package:bytebank/database/dao/contact_dao.dart'; | ||
import 'package:bytebank/http/webclients/transaction_webclient.dart'; | ||
import 'package:bytebank/screens/dashboard.dart'; | ||
import 'package:bytebank/widgets/app_dependencies.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:uuid/uuid.dart'; | ||
|
||
void main() { | ||
runApp(BytebankApp()); | ||
runApp(BytebankApp( | ||
contactDao: ContactDao(), | ||
transactionWebClient: TransactionWebClient(), | ||
)); | ||
} | ||
|
||
class BytebankApp extends StatelessWidget { | ||
final ContactDao contactDao; | ||
final TransactionWebClient transactionWebClient; | ||
|
||
BytebankApp({ | ||
@required this.contactDao, | ||
@required this.transactionWebClient, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return MaterialApp( | ||
theme: ThemeData( | ||
primaryColor: Colors.green[900], | ||
accentColor: Colors.blueAccent[700], | ||
buttonTheme: ButtonThemeData( | ||
buttonColor: Colors.blueAccent[700], | ||
textTheme: ButtonTextTheme.primary, | ||
return AppDependencies( | ||
transactionWebClient: transactionWebClient, | ||
contactDao: contactDao, | ||
child: MaterialApp( | ||
theme: ThemeData( | ||
primaryColor: Colors.green[900], | ||
accentColor: Colors.blueAccent[700], | ||
buttonTheme: ButtonThemeData( | ||
buttonColor: Colors.blueAccent[700], | ||
textTheme: ButtonTextTheme.primary, | ||
), | ||
), | ||
home: Dashboard(), | ||
), | ||
home: Dashboard(), | ||
); | ||
} | ||
} |
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 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 file was deleted.
Oops, something went wrong.
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 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 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
Oops, something went wrong.