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
Showing
11 changed files
with
108 additions
and
39 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
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
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
19 changes: 19 additions & 0 deletions
19
lib/app/modules/item/widgets/web_view/web_view_body_controller.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,19 @@ | ||
import 'package:flutter_inappwebview/flutter_inappwebview.dart'; | ||
import 'package:flutter_modular/flutter_modular.dart'; | ||
import 'package:mobx/mobx.dart'; | ||
|
||
part 'web_view_body_controller.g.dart'; | ||
|
||
@Injectable() | ||
class WebViewBodyController = _WebViewBodyControllerBase with _$WebViewBodyController; | ||
|
||
abstract class _WebViewBodyControllerBase with Store { | ||
InAppWebViewController webViewController; | ||
|
||
@observable | ||
bool isLoadingWebContent = false; | ||
|
||
void reload() { | ||
webViewController?.reload(); | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
lib/app/modules/item/widgets/web_view/web_view_body_controller.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
test/app/modules/item/widgets/web_view/web_view_body_controller_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import 'package:flutter_modular/flutter_modular_test.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:zone/app/modules/item/item_module.dart'; | ||
import 'package:zone/app/modules/item/widgets/web_view/web_view_body_controller.dart'; | ||
|
||
void main() { | ||
initModule(ItemModule()); | ||
WebViewBodyController webviewbody; | ||
// | ||
setUp(() { | ||
// webviewbody = ItemModule.to.get<WebViewBodyController>(); | ||
}); | ||
|
||
group('WebViewBodyController Test', () { | ||
// test("First Test", () { | ||
// expect(webviewbody, isInstanceOf<WebViewBodyController>()); | ||
// }); | ||
|
||
// test("Set Value", () { | ||
// expect(webviewbody.value, equals(0)); | ||
// webviewbody.increment(); | ||
// expect(webviewbody.value, equals(1)); | ||
// }); | ||
}); | ||
} |
9 changes: 9 additions & 0 deletions
9
test/app/modules/item/widgets/web_view/web_view_body_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
void main() { | ||
testWidgets('WebViewBody has message', (tester) async { | ||
// await tester.pumpWidget(buildTestableWidget(WebViewBody())); | ||
// final textFinder = find.text('WebViewBody'); | ||
// expect(textFinder, findsOneWidget); | ||
}); | ||
} |
7 changes: 0 additions & 7 deletions
7
test/app/modules/item/widgets/webview_stack/webview_stack_test.dart
This file was deleted.
Oops, something went wrong.