zego_express_engine 1.16.0 copy "zego_express_engine: ^1.16.0" to clipboard
zego_express_engine: ^1.16.0 copied to clipboard

outdated

ZegoExpressEngine Flutter SDK is a flutter plugin wrapper based on ZegoExpressEngine native Android / iOS SDK, providing live video and real-time audio/video services.

example/lib/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:zego_express_engine_example/pages/init_sdk_page.dart';
import 'package:zego_express_engine_example/config/zego_config.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'ZegoExpressExample',
      theme: ThemeData(

        primarySwatch: Colors.blue,
      ),
      home: HomePage(title: 'ZegoExpressExample'),
    );
  }
}

class HomePage extends StatelessWidget {
  HomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  Widget build(BuildContext context) {

    print(ZegoConfig.instance); // Load config instance

    return Scaffold(
        appBar: AppBar(

          title: Text(title),
        ),
        body: SafeArea(
            child: Center(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                  Padding(
                    padding: const EdgeInsets.only(bottom: 10.0),
                  ),
                  CupertinoButton(
                      color: Color(0xff0e88eb),
                      child: Text('Publish Stream'),
                      onPressed: () {
                        Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext context) {
                          return InitPage(true);
                        }));
                      }
                  ),
                  Padding(
                    padding: const EdgeInsets.only(bottom: 10.0),
                  ),
                  CupertinoButton(
                      color: Color(0xff0e88eb),
                      child: Text('   Play Stream   '),
                      onPressed: () {
                        Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext context) {
                          return InitPage(false);
                        }));
                      }
                  ),
                ],
              ),
            )
        )
    );
  }
}
40
likes
0
pub points
93%
popularity

Publisher

verified publisherzego.im

ZegoExpressEngine Flutter SDK is a flutter plugin wrapper based on ZegoExpressEngine native Android / iOS SDK, providing live video and real-time audio/video services.

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on zego_express_engine