flutter_inappwebview_helper 1.0.0 copy "flutter_inappwebview_helper: ^1.0.0" to clipboard
flutter_inappwebview_helper: ^1.0.0 copied to clipboard

A Flutter package that provides helper functions and classes for working with InAppWebView. for esier get data from webview.

Flutter InAppWebView Helper #

A Flutter package that provides helper functions and classes for working with InAppWebView. for esier get data from webview.

Installation #

Add the following line to your pubspec.yaml file:

flutter_inappwebview doc #

Example #

class UserService extends GetxService {
  final WebViewService service;

  UserService({required this.service});

  Future<void> fetchData(UserController controller) async {
    await service.get(
      model: WebviewGETModel(
        // webViewController: controller.webViewController,
        url: '',
        handlerName: '',
        getDataCallback: (dataCallback) {},
        getLoadingCallback: () {},
      ),
    );
  }

  Future<void> someAction(UserController controller) async {
    List<Map<String, dynamic>> json = [{}];

    final model = WebviewPOSTModel(
      webViewController: controller.webViewController,
      funcName: "btn_01",
      handlerName: 'ProcessInsert',
      json: json,
      getDataCallback: (dataCallback) {},
    );

    await service.post(model: model);
  }
}

class WebView extends StatelessWidget {
  const WebView({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('WebView'),
      ),
      body: Stack(
        children: [
          WebViewPage(
            callback: (xcontroller) {},
            callbackError: (error) {},
          ),
          Positioned.fill(
            child: Container(
              color: Colors.white,
            ),
          ),
        ],
      ),
    );
  }
}
0
likes
130
points
20
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides helper functions and classes for working with InAppWebView. for esier get data from webview.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter, flutter_inappwebview

More

Packages that depend on flutter_inappwebview_helper