Skip to main content

im_plugin_tencent 0.0.9 copy "im_plugin_tencent: ^0.0.9" to clipboard
im_plugin_tencent: ^0.0.9 copied to clipboard

[pending analysis]

The Flutter plugin integrated with Tencent instant messaging supports chatting and audio/video calling. Provide two usage modes: API calling and using with UI. Real out of the box use.

example/lib/main.dart

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import 'home_mobile.dart';
import 'home_web.dart';

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

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

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

final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();

class _MyAppState extends State<MyApp> {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      navigatorKey: navigatorKey,
      home: _buildHome(),
    );
  }

  Widget _buildHome() {
    if (kIsWeb) {
      return const HomeWebWidget();
    }
    switch (defaultTargetPlatform) {
      case TargetPlatform.android:
      case TargetPlatform.iOS:
        return const HomeMobileWidget();
      default:
        return const SizedBox.shrink();
    }
  }
}

/// 定义的显示 toast 消息的方法
void showTipAboveDrawer(BuildContext context, String message) {
  final overlay = Overlay.of(context);
  late OverlayEntry entry;

  entry = OverlayEntry(
    builder: (context) => Positioned(
      top: MediaQuery.of(context).padding.top + 16,
      left: 0,
      right: 0,
      child: IgnorePointer(
        child: Material(
          color: Colors.transparent,
          child: Center(
            child: Container(
              padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
              decoration: BoxDecoration(
                color: Colors.black87,
                borderRadius: BorderRadius.circular(8),
              ),
              child: Text(
                message,
                style: const TextStyle(color: Colors.white),
              ),
            ),
          ),
        ),
      ),
    ),
  );

  overlay.insert(entry);

  Future.delayed(const Duration(seconds: 2), () {
    entry.remove();
  });
}
1
likes
0
points
154
downloads

Publisher

unverified uploader

Weekly Downloads

The Flutter plugin integrated with Tencent instant messaging supports chatting and audio/video calling. Provide two usage modes: API calling and using with UI. Real out of the box use.

Repository

License

(pending) (license)

Dependencies

archive, atomic_x_core, audioplayers, cached_network_image, crypto, easy_refresh, flutter, flutter_web_plugins, meta, permission_handler, plugin_platform_interface, rtc_room_engine, rtc_room_engine_impl, scrollview_observer, shared_preferences, smart_keyboard_insets, tencent_cloud_chat_sdk, universal_web

More

Packages that depend on im_plugin_tencent

Packages that implement im_plugin_tencent