beam_ai_sdk 0.0.3 beam_ai_sdk: ^0.0.3 copied to clipboard
The beam_ai_sdk enables easy integration of advanced AI features like NLP, image recognition, speech processing, and ML for effortless creation of intelligent applications.
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:beam_ai_sdk/beam_ai_sdk.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 _beamAiSdkPlugin = BeamAiSdk();
@override
void initState() {
super.initState();
}
Future<void> startBeam() async {
String platformVersion;
try {
platformVersion =
await _beamAiSdkPlugin.startBeamSdk() ?? 'Unknown platform version';
} on PlatformException {
platformVersion = 'Failed to get platform version.';
}
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: Column(children: [
SizedBox(height: 20),
Text("Start $_platformVersion"),
SizedBox(height: 20),
ElevatedButton(
onPressed: () {
startBeam();
},
child: Text("Start Beam "))
])),
),
);
}
}