liblinphone_flutter/example/lib/main.dart
Andrew G 0375fe4d1a feat: implement Linphone SDK integration with video call support
Complete rewrite from stub plugin to (probably) functional liblinphone integration featuring:
- Core SDK bridge with registration, calls, and media controls
- Platform views for remote and local video rendering
- Event channels for registration and call state updates
2026-01-22 16:15:28 +07:00

54 lines
1.4 KiB
Dart

import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:liblinphone_flutter/liblinphone_flutter.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String _platformVersion = 'Unknown';
final _liblinphoneFlutterPlugin = LiblinphoneFlutter();
@override
void initState() {
super.initState();
initPlatformState();
}
// Platform messages are asynchronous, so we initialize in an async method.
Future<void> initPlatformState() async {
String platformVersion;
// Platform messages may fail, so we use a try/catch PlatformException.
// We also handle the message potentially returning null.
platformVersion = 'stub';
// 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')),
),
);
}
}