Skip to content

Commit

Permalink
Improved documentation in example app
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinbjornt committed May 17, 2023
1 parent c1abb75 commit db1128c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import 'package:embla_core/embla_core.dart';
...
var config = EmblaConfig();
var config = EmblaSessionConfig();
/* Set properties of config object... */
Expand Down
7 changes: 4 additions & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class _SessionPageState extends State<SessionPage> {
String msg = kDefaultPrompt;
final playIcon = const Icon(Icons.play_arrow);
final stopIcon = const Icon(Icons.stop);
Icon buttonIcon = const Icon(Icons.play_arrow);
var buttonIcon = const Icon(Icons.play_arrow);

void _stopSession() {
session!.cancel();
Expand All @@ -85,11 +85,12 @@ class _SessionPageState extends State<SessionPage> {
return;
}

const String serverURL = "https://staging.api.greynir.is"; // http://local-ip-address:8080
// The URL of the EmblaCore server to talk to. This is the production server.
const String serverURL = "https://api.greynir.is";

// Create new session config
config = EmblaSessionConfig(server: serverURL);
config!.apiKey = "YOUR_API_KEY_HERE";
config!.apiKey = "YOUR_API_KEY_HERE"; // Replace with your API key

config?.onStartStreaming = () {
setState(() {
Expand Down

0 comments on commit db1128c

Please sign in to comment.