automatic_animated_chat 0.0.5 automatic_animated_chat: ^0.0.5 copied to clipboard
This package is like a message that appears in the screen while the letter are popping up animated on the chat baloon.
import 'package:example_chat/widget_chat.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
// This widget is the root of your application.
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Automatic Chat Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(title: 'Automatic Chat Demo'),
);
}
}
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
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
ChatAnimatedMessage(
message:
"Hello, i'm the message that will appears letter by letter on baloon",
baloonColor: Colors.red,
timeToStart: 1000,
roundedBorder: BorderRadius.only(
// topLeft: Radius.circular(23),
bottomLeft: Radius.circular(23),
topRight: Radius.circular(23),
bottomRight: Radius.circular(23),
),
)
],
),
// This trailing comma makes auto-formatting nicer for build methods.
);
}
}