nertc_screen_share 1.1.0-rc.0 copy "nertc_screen_share: ^1.1.0-rc.0" to clipboard
nertc_screen_share: ^1.1.0-rc.0 copied to clipboard

PlatformiOS
unlisted

An iOS screen share plugin that works with `nertc`.

example/lib/main.dart

//  Copyright (c) 2021 NetEase, Inc.  All rights reserved.
// Use of this source code is governed by a MIT license that can be found in the LICENSE file.

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

import 'package:flutter/services.dart';
import 'package:nertc_screen_share/nertc_screen_share.dart';

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';

  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    String platformVersion = '1.0.0';
    // Platform messages may fail, so we use a try/catch PlatformException.
    // try {
    //   platformVersion = await IosScreenSharePlugin.platformVersion;
    // } on PlatformException {
    //   platformVersion = 'Failed to get platform version.';
    // }

    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted) return;

    setState(() {
      _platformVersion = platformVersion;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on: $_platformVersion\n'),
        ),
      ),
    );
  }
}
0
likes
140
points
14
downloads

Publisher

verified publisheryunxin.163.com

Weekly Downloads

An iOS screen share plugin that works with `nertc`.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, yunxin_alog

More

Packages that depend on nertc_screen_share

Packages that implement nertc_screen_share