automatic_animated_chat 0.1.3 copy "automatic_animated_chat: ^0.1.3" to clipboard
automatic_animated_chat: ^0.1.3 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.

example/lib/main.dart

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> {
  //Default build of class

  @override
  Widget build(BuildContext context) {
    //Default build of class
    return MaterialApp(
      //Title of page

      title: 'Automatic Chat Demo',
      //Theme of page
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      //passing te home
      home: MyHomePage(title: 'Automatic Chat Demo'),
    );
  }
}

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

  //Creating title
  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  //Init state method
  @override
  void initState() {
    super.initState();
  }

  //Default build of class

  @override
  Widget build(BuildContext context) {
    //Default build of class

    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      //Default build of class

      body: Column(
        mainAxisAlignment: MainAxisAlignment.start,
        children: <Widget>[
          // THIS IS THE WIDGET
          ChatAnimatedMessage(
            // Here u can write your message
            message:
                "Hello, i'm the message that will appears letter by letter on baloon",
            // Thats the color fof baloon
            baloonColor: Colors.red,
            // Time until Starts writing
            timeToStart: 1000,
            // The borders of baloon
            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.
    );
  }
}
6
likes
30
pub points
0%
popularity

Publisher

unverified uploader

This package is like a message that appears in the screen while the letter are popping up animated on the chat baloon.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on automatic_animated_chat