dash_chat_2 0.0.21 copy "dash_chat_2: ^0.0.21" to clipboard
dash_chat_2: ^0.0.21 copied to clipboard

The most complete Chat UI for flutter. Easy to use, highly customizable and fully featured

example/lib/main.dart

import 'package:examples/samples/avatar.dart';
import 'package:examples/samples/basic.dart';
import 'package:examples/samples/media.dart';
import 'package:examples/samples/mention.dart';
import 'package:examples/samples/quick_replies_sample.dart';
import 'package:examples/samples/send_on_enter.dart';
import 'package:examples/samples/theming.dart';
import 'package:examples/samples/typing_users_sample.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: 'Dash Chat Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.tealAccent),
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  State<MyHomePage> createState() => MyHomePageState();
}

class MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Dash Chat Demo'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
              onPressed: () => push(Basic()),
              child: const Text('Basic'),
            ),
            ElevatedButton(
              onPressed: () => push(Media()),
              child: const Text('Chat media'),
            ),
            ElevatedButton(
              onPressed: () => push(AvatarSample()),
              child: const Text('All user possibilities'),
            ),
            ElevatedButton(
              onPressed: () => push(QuickRepliesSample()),
              child: const Text('Quick replies'),
            ),
            ElevatedButton(
              onPressed: () => push(TypingUsersSample()),
              child: const Text('Typing users'),
            ),
            ElevatedButton(
              onPressed: () => push(SendOnEnter()),
              child: const Text('Send on enter'),
            ),
            ElevatedButton(
              onPressed: () => push(MentionSample()),
              child: const Text('Mention'),
            ),
            ElevatedButton(
              onPressed: () => push(ThemeSample()),
              child: const Text('Theming'),
            ),
          ],
        ),
      ),
    );
  }

  void push(Widget page) {
    Navigator.of(context).push(
      MaterialPageRoute<String>(
        builder: (BuildContext context) {
          return page;
        },
      ),
    );
  }
}
277
likes
120
points
5.3k
downloads

Publisher

verified publishermolteo.com

Weekly Downloads

The most complete Chat UI for flutter. Easy to use, highly customizable and fully featured

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

cached_network_image, flutter, flutter_markdown, flutter_parsed_text, intl, url_launcher, video_player

More

Packages that depend on dash_chat_2