flutter_dialogflow 0.1.3 copy "flutter_dialogflow: ^0.1.3" to clipboard
flutter_dialogflow: ^0.1.3 copied to clipboard

Flutter package for makes it easy to integrate dialogflow and support dialogflow v2

example/lib/main.dart

import 'package:example/dialogflow_v1.dart';
import 'package:example/dialogflow_v2.dart';
import 'package:flutter/material.dart';

import 'google_assistant.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Example Dialogflow Flutter',
      theme: new ThemeData(
        primarySwatch: Colors.deepOrange,
      ),
      home: new MyHomePage(title: 'Flutter Demo Dialogflow'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => new _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text(widget.title),
      ),
      body: new Column(children: <Widget>[
        new Container(
          margin: EdgeInsets.all(10.0),
          child: new RaisedButton(
            onPressed: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => PageDialogflowV1()),
              );
            },
            child: Text("Dialogflow v1"),
          ),
        ),
        new Container(
          margin: EdgeInsets.all(10.0),
          child: new RaisedButton(
            onPressed: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => HomePageDialogflowV2()),
              );
            },
            child: Text("Dialogflow v2"),
          ),
        ),
        new Container(
          margin: EdgeInsets.all(10.0),
          child: new RaisedButton(
            onPressed: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) => GoogleAssistant()),
              );
            },
            child: Text("GoogleAssistant"),
          ),
        )
      ]),
    );
  }
}
50
likes
40
points
71
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter package for makes it easy to integrate dialogflow and support dialogflow v2

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

flutter, googleapis_auth, http

More

Packages that depend on flutter_dialogflow