The Webview Univeral Flutter package for Appeto SDK.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

70 lignes
1.2 KiB

  1. import 'webview_controller_web.dart';
  2. export 'webview_controller_web.dart';
  3. extension WebViewControllerExtension on WebViewController {
  4. void goBackSync() {
  5. if (is_init == false) {
  6. return;
  7. }
  8. if (is_mobile) {
  9. webview_mobile_controller.goBack();
  10. }
  11. if (is_desktop) {}
  12. }
  13. void goForwardSync() async {
  14. if (is_init == false) {
  15. return;
  16. }
  17. if (is_mobile) {
  18. webview_mobile_controller.goForward();
  19. }
  20. if (is_desktop) {}
  21. }
  22. void goSync({
  23. required Uri uri,
  24. }) async {
  25. if (is_init == false) {
  26. return;
  27. }
  28. if (is_mobile) {
  29. webview_mobile_controller.loadRequest(uri);
  30. }
  31. if (is_desktop) {}
  32. }
  33. Future<void> goBack() async {
  34. if (is_init == false) {
  35. return;
  36. }
  37. if (is_mobile) {
  38. await webview_mobile_controller.goBack();
  39. }
  40. if (is_desktop) {}
  41. }
  42. Future<void> goForward() async {
  43. if (is_init == false) {
  44. return;
  45. }
  46. if (is_mobile) {
  47. await webview_mobile_controller.goForward();
  48. }
  49. if (is_desktop) {}
  50. }
  51. Future<void> go({
  52. required Uri uri,
  53. }) async {
  54. if (is_init == false) {
  55. return;
  56. }
  57. if (is_mobile) {
  58. await webview_mobile_controller.loadRequest(uri);
  59. }
  60. if (is_desktop) {}
  61. }
  62. }