chat_list 0.0.1+1 copy "chat_list: ^0.0.1+1" to clipboard
chat_list: ^0.0.1+1 copied to clipboard

outdated

A flutter package to incorporate a chat view in a simple way

example/lib/main.dart

import 'package:chat_list/chat_easy_list.dart';
import 'package:chat_list/models/message_model.dart';
import 'package:chat_list/models/owner_type_enum.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'ChatList Example',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'ChatList Example'),
    );
  }
}

class MyHomePage extends StatefulWidget {

  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;

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

class _MyHomePageState extends State<MyHomePage> {

  List<MessageModel> _messageList = [ MessageModel("Hi, how are you?", OwnerType.SENDER, ownerName: "Higor Lapa"), MessageModel("Hi, I'm fine and you?!", OwnerType.RECEIVER, ownerName: "Bill Gates")  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: ChatList(_messageList))
    );
  }
}
35
likes
0
pub points
74%
popularity

Publisher

unverified uploader

A flutter package to incorporate a chat view in a simple way

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

bubble, flare_flutter, flutter

More

Packages that depend on chat_list