flutter_tawk 0.1.0 flutter_tawk: ^0.1.0 copied to clipboard
Tawk widget for Flutter.
import 'package:flutter/material.dart';
import 'package:flutter_tawk/flutter_tawk.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Flutter Tawk'),
backgroundColor: const Color(0XFFF7931E),
elevation: 0,
),
body: Tawk(
directChatLink: 'YOUR_DIRECT_CHAT_LINK',
visitor: TawkVisitor(
name: 'Ayoub AMINE',
email: 'ayoubamine2a@gmail.com',
),
onLoad: () {
print('Hello Tawk!');
},
onLinkTap: (String url) {
print(url);
},
placeholder: const Center(
child: Text('Loading...'),
),
),
),
);
}
}