tellam 0.1.5 copy "tellam: ^0.1.5" to clipboard
tellam: ^0.1.5 copied to clipboard

Tellam flutter package to integrate FAQ and live support chat using firebase.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:tellam/tellam.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  //initialize tellam with firebase database url
  await Tellam.initialize(
    databaseUrl: "https://tellam-6ee8e.firebaseio.com/",
  );

  //setting the user data
  TellamUser tellamUser = TellamUser(
    id: 6,
    firstName: "Ambrose",
    lastName: "Bako",
  );

  //register user data
  Tellam.client().register(tellamUser);

  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Tellam Demo',
      theme: ThemeData(
        primarySwatch: Colors.teal,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Tellam Demo Home Page'),
    );
  }
}

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: Text("Tellam Inc."),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          //display tellam faq and live chat if needed
          Tellam.show(
            context,
            enableChat: true,
          );
        },
        tooltip: 'Help',
        child: Icon(Icons.chat),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
4
likes
40
pub points
0%
popularity

Publisher

unverified uploader

Tellam flutter package to integrate FAQ and live support chat using firebase.

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

bubble, cached_network_image, firebase_database, floor, flutter, flutter_gradient_colors, flutter_html, flutter_icons, flutter_svg, intl, rxdart, sqflite, timeago, url_launcher

More

Packages that depend on tellam