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

PlatformAndroid

自定义Android原生插件库

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:hh_android_webview/hh_android.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('AI Assistant'),
        ),
        body: Center(
          child: Column(
            children: [
              ElevatedButton(
                onPressed: () {
                  hhAndroid.openAssistantSheet("http://172.16.130.108:3002/");
                },
                child: Text("Open Assistant"),
              ),
              ElevatedButton(
                onPressed: () {
                  hhAndroid.openUrl("http://172.16.130.108:3002/#/settings", {'id': 123});
                },
                child: Text("Open Settings"),
              )
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
125
points
12
downloads

Publisher

unverified uploader

Weekly Downloads

自定义Android原生插件库

Repository

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on hh_android_webview

Packages that implement hh_android_webview