lori_sdk 0.1.8 lori_sdk: ^0.1.8 copied to clipboard
A Flutter package to access Neomode's API (LORI). The package encapsulates most of the complexity and provide an easy way to connect to the best omnichannel platform.
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:lori_sdk/data/lori_api.dart';
void main() {
// SDK init
LoriApi.init(
'<LORI_API_URL>',
'<LORI_CLIENT_ID>',
'<LORI_CLIENT_SECRET>',
1,
Platform.operatingSystem,
Platform.operatingSystemVersion);
// Start running the app
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'LORI SDK Sample',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'LORI SDK Sample'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'Look inside the main method to find the sample :)',
),
],
),
), // T
);
}
}