-
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.
- Loading branch information
1 parent
69bca5e
commit 3f68abb
Showing
101 changed files
with
3,263 additions
and
119 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This file configures the analyzer, which statically analyzes Dart code to | ||
# check for errors, warnings, and lints. | ||
# | ||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled | ||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be | ||
# invoked from the command line by running `flutter analyze`. | ||
|
||
# The following line activates a set of recommended lints for Flutter apps, | ||
# packages, and plugins designed to encourage good coding practices. | ||
include: package:flutter_lints/flutter.yaml | ||
|
||
linter: | ||
# The lint rules applied to this project can be customized in the | ||
# section below to disable rules from the `package:flutter_lints/flutter.yaml` | ||
# included above or to enable additional rules. A list of all available lints | ||
# and their documentation is published at | ||
# https://dart-lang.github.io/linter/lints/index.html. | ||
# | ||
# Instead of disabling a lint rule for the entire project in the | ||
# section below, it can also be suppressed for a single line of code | ||
# or a specific dart file by using the `// ignore: name_of_lint` and | ||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file | ||
# producing the lint. | ||
rules: | ||
# avoid_print: false # Uncomment to disable the `avoid_print` rule | ||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule | ||
|
||
# Additional information about this file can be found at | ||
# https://dart.dev/guides/language/analysis-options |
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
12 changes: 12 additions & 0 deletions
12
android/app/src/main/res/drawable-v21/launch_background.xml
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Modify this file to customize your launch splash screen --> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:drawable="?android:colorBackground" /> | ||
|
||
<!-- You can insert your own image assets here --> | ||
<!-- <item> | ||
<bitmap | ||
android:gravity="center" | ||
android:src="@mipmap/launch_image" /> | ||
</item> --> | ||
</layer-list> |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --> | ||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> | ||
<!-- Show a splash screen on the activity. Automatically removed when | ||
Flutter draws its first frame --> | ||
<item name="android:windowBackground">@drawable/launch_background</item> | ||
</style> | ||
<!-- Theme applied to the Android Window as soon as the process has started. | ||
This theme determines the color of the Android Window while your | ||
Flutter UI initializes, as well as behind your Flutter UI while its | ||
running. | ||
This Theme is only used starting with V2 of Flutter's Android embedding. --> | ||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> | ||
<item name="android:windowBackground">?android:colorBackground</item> | ||
</style> | ||
</resources> |
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,4 +1,3 @@ | ||
org.gradle.jvmargs=-Xmx1536M | ||
android.enableR8=true | ||
android.useAndroidX=true | ||
android.enableJetifier=true |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,22 +1,57 @@ | ||
PODS: | ||
- connectivity (0.0.1): | ||
- Flutter | ||
- Reachability | ||
- Flutter (1.0.0) | ||
- fluttertoast (0.0.2): | ||
- Flutter | ||
- Toast | ||
- integration_test (0.0.1): | ||
- Flutter | ||
- path_provider (0.0.1): | ||
- Flutter | ||
- Reachability (3.2) | ||
- shared_preferences (0.0.1): | ||
- Flutter | ||
- Toast (4.0.0) | ||
|
||
DEPENDENCIES: | ||
- connectivity (from `.symlinks/plugins/connectivity/ios`) | ||
- Flutter (from `Flutter`) | ||
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) | ||
- integration_test (from `.symlinks/plugins/integration_test/ios`) | ||
- path_provider (from `.symlinks/plugins/path_provider/ios`) | ||
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) | ||
|
||
SPEC REPOS: | ||
trunk: | ||
- Reachability | ||
- Toast | ||
|
||
EXTERNAL SOURCES: | ||
connectivity: | ||
:path: ".symlinks/plugins/connectivity/ios" | ||
Flutter: | ||
:path: Flutter | ||
fluttertoast: | ||
:path: ".symlinks/plugins/fluttertoast/ios" | ||
integration_test: | ||
:path: ".symlinks/plugins/integration_test/ios" | ||
path_provider: | ||
:path: ".symlinks/plugins/path_provider/ios" | ||
shared_preferences: | ||
:path: ".symlinks/plugins/shared_preferences/ios" | ||
|
||
SPEC CHECKSUMS: | ||
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec | ||
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467 | ||
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a | ||
fluttertoast: 6122fa75143e992b1d3470f61000f591a798cc58 | ||
integration_test: 5ed24a436eb7ec17b6a13046e9bf7ca4a404e59e | ||
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c | ||
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 | ||
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d | ||
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 | ||
|
||
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c | ||
|
||
COCOAPODS: 1.10.0 | ||
COCOAPODS: 1.11.2 |
2 changes: 1 addition & 1 deletion
2
ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import UIKit | ||
import Flutter | ||
import GoogleMaps | ||
|
||
@UIApplicationMain | ||
@objc class AppDelegate: FlutterAppDelegate { | ||
override func application( | ||
_ application: UIApplication, | ||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? | ||
) -> Bool { | ||
GMSServices.provideAPIKey("AIzaSyC9UyXEkIayXCAUkMOxA0nDKqyfCTyLKUo") | ||
GeneratedPluginRegistrant.register(with: self) | ||
return super.application(application, didFinishLaunchingWithOptions: launchOptions) | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import 'package:equatable/equatable.dart'; | ||
|
||
abstract class Failure extends Equatable { | ||
// If the subclasses have some properties, they'll get passed to this constructor | ||
// so that Equatable can perform value comparison. | ||
Failure([List properties = const <dynamic>[]]) : super(); | ||
} |
13 changes: 13 additions & 0 deletions
13
lib/CleanArchitectureTDD/features/number_trivia/domain/entities/number_trivia.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import 'package:equatable/equatable.dart'; | ||
import 'package:meta/meta.dart'; | ||
|
||
class NumberTrivia extends Equatable { | ||
final String text; | ||
final int number; | ||
|
||
NumberTrivia({@required this.text, @required this.number}) : super(); | ||
|
||
@override | ||
// TODO: implement props | ||
List<Object> get props => throw UnimplementedError(); | ||
} |
9 changes: 9 additions & 0 deletions
9
...nArchitectureTDD/features/number_trivia/domain/repositories/number_trivia_repository.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
import 'package:all_flutter_gives/CleanArchitectureTDD/core/error/failures.dart'; | ||
import 'package:all_flutter_gives/CleanArchitectureTDD/features/number_trivia/domain/entities/number_trivia.dart'; | ||
import 'package:dartz/dartz.dart'; | ||
|
||
abstract class NumberTriviaRepository { | ||
Future<Either<Failure, NumberTrivia>> getConcreteNumberTrivia(int number); | ||
Future<Either<Failure, NumberTrivia>> getRandomNumberTrivia(); | ||
} |
15 changes: 15 additions & 0 deletions
15
...eanArchitectureTDD/features/number_trivia/domain/usecases/get_concrete_number_trivia.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'package:all_flutter_gives/CleanArchitectureTDD/core/error/failures.dart'; | ||
import 'package:all_flutter_gives/CleanArchitectureTDD/features/number_trivia/domain/entities/number_trivia.dart'; | ||
import 'package:all_flutter_gives/CleanArchitectureTDD/features/number_trivia/domain/repositories/number_trivia_repository.dart'; | ||
import 'package:dartz/dartz.dart'; | ||
import 'package:meta/meta.dart'; | ||
|
||
class GetConcreteNumberTrivia { | ||
final NumberTriviaRepository repository; | ||
|
||
GetConcreteNumberTrivia(this.repository); | ||
|
||
Future<Either<Failure, NumberTrivia>> call({@required int number}) async{ | ||
return await repository.getConcreteNumberTrivia(number); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import 'package:all_flutter_gives/FlutterIntTesting/main.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:integration_test/integration_test.dart'; | ||
|
||
void main() { | ||
IntegrationTestWidgetsFlutterBinding.ensureInitialized(); | ||
|
||
testWidgets( | ||
"Not inputting a text and wanting to go to the display page shows " | ||
"an error and prevents from going to the display page.", | ||
(WidgetTester tester) async { | ||
await tester.pumpWidget(MyApp()); | ||
|
||
await tester.tap(find.byType(FloatingActionButton)); | ||
await tester.pumpAndSettle(); | ||
|
||
expect(find.byType(TypingPage), findsOneWidget); | ||
expect(find.byType(DisplayPage), findsNothing); | ||
expect(find.text('Input at least one character'), findsOneWidget); | ||
}, | ||
); | ||
|
||
testWidgets( | ||
"After inputting a text, go to the display page which contains that same text " | ||
"and then navigate back to the typing page where the input should be clear", | ||
(WidgetTester tester) async { | ||
await tester.pumpWidget(MyApp()); | ||
|
||
final inputText = 'Hello there, this is an input.'; | ||
await tester.enterText(find.byKey(Key('your-text-field')), inputText); | ||
|
||
await tester.tap(find.byType(FloatingActionButton)); | ||
await tester.pumpAndSettle(); | ||
|
||
expect(find.byType(TypingPage), findsNothing); | ||
expect(find.byType(DisplayPage), findsOneWidget); | ||
expect(find.text(inputText), findsOneWidget); | ||
|
||
await tester.tap(find.byType(BackButton)); | ||
await tester.pumpAndSettle(); | ||
|
||
expect(find.byType(TypingPage), findsOneWidget); | ||
expect(find.byType(DisplayPage), findsNothing); | ||
expect(find.text(inputText), findsNothing); | ||
}, | ||
); | ||
} |
Oops, something went wrong.