This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
/// This is the state class, maintaining the current state of the provider data that we want to expose. | |
class ExampleState { | |
final bool isLoading; | |
final bool error; | |
final String? errorMessage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:http/http.dart' as http; | |
import 'package:twilio_video_tutorial/twilio_video_tutorial.dart'; | |
void main() => runApp( | |
MaterialApp( | |
title: "Twilio Video Call Example", | |
home: MyApp(), | |
), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as express from "express"; | |
import * as twilio from "twilio"; | |
const app = express(); | |
const accessToken = twilio.jwt.AccessToken; | |
const videoGrant = accessToken.VideoGrant; | |
const twilioAccountSid = "*************"; | |
const twilioApiKey = "**********"; | |
const twilioApiSecret = "**********"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import android.util.Log | |
import android.view.View | |
import android.widget.FrameLayout | |
import com.twilio.video.* | |
import io.flutter.plugin.common.BinaryMessenger | |
import io.flutter.plugin.common.MethodCall | |
import io.flutter.plugin.common.MethodChannel | |
import io.flutter.plugin.common.MethodChannel.MethodCallHandler | |
import io.flutter.plugin.common.MethodChannel.Result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import io.flutter.plugin.common.BinaryMessenger | |
import io.flutter.plugin.common.StandardMessageCodec | |
import io.flutter.plugin.platform.PlatformView | |
import io.flutter.plugin.platform.PlatformViewFactory | |
/** | |
* A *Video View Factory* used to define the view for the twilio video plugin. | |
* | |
* @param messenger the registrar messenger used to register the method channel. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.flutter.plugin.common.BinaryMessenger | |
import androidx.annotation.NonNull | |
import io.flutter.embedding.engine.plugins.FlutterPlugin | |
/** TwilioVideoTutorialPlugin */ | |
class TwilioVideoTutorialPlugin: FlutterPlugin { | |
override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { | |
val messenger: BinaryMessenger = flutterPluginBinding.binaryMessenger | |
val plugin = TwilioVideoTutorialPlugin() | |
flutterPluginBinding.platformViewRegistry.registerViewFactory("twilioVideoPlugin", TwilioVideoTutorialViewFactory(messenger, plugin)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def localProperties = new Properties() | |
def localPropertiesFile = rootProject.file('local.properties') | |
if (localPropertiesFile.exists()) { | |
localPropertiesFile.withReader('UTF-8') { reader -> | |
localProperties.load(reader) | |
} | |
} | |
def flutterRoot = localProperties.getProperty('flutter.sdk') | |
if (flutterRoot == null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
typedef void VideoCreatedCallback(VideoController controller); | |
class TwilioVideoTutorial extends StatefulWidget { | |
TwilioVideoTutorial({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
typedef void VideoCreatedCallback(VideoController controller); | |
class Video extends StatefulWidget { | |
Video({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
typedef void VideoCreatedCallback(VideoController controller); | |
class Video extends StatefulWidget { | |
Video({ |