at_chat_flutter 1.0.0 copy "at_chat_flutter: ^1.0.0" to clipboard
at_chat_flutter: ^1.0.0 copied to clipboard

outdated

A flutter plugin project to provide chat feature using atsigns and atprotocol.

Now for some internet optimism. #

at_chat_flutter #

A flutter plugin to provide chat feature between two atsigns.

Getting Started #

This plugin provides a chat screen - ChatScreen that can be accessed as a bottom sheet or as a navigated screen.

Initialising #

The chat service needs to be initialised. It is expected that the app will first create an AtClientService instance using the preferences and then use it to initialise the chat service.

initializeChatService(
        clientSdkService.atClientServiceInstance.atClient, activeAtSign,
        rootDomain: MixedConstants.ROOT_DOMAIN);

Sample Usage #

As a bottom sheet

FlatButton(
    onPressed: () {
        scaffoldKey.currentState
        .showBottomSheet((context) => ChatScreen());
    },
    child: Container(
        height: 40,
        child: Text('Open chat in bottom sheet'),
    ),
),

As a screen

class ThirdScreen extends StatefulWidget {
  @override
  _ThirdScreenState createState() => _ThirdScreenState();
}

class _ThirdScreenState extends State<ThirdScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Chat Screen')),
      body: ChatScreen(
        height: MediaQuery.of(context).size.height,
        incomingMessageColor: Colors.blue[100],
        outgoingMessageColor: Colors.green[100],
        isScreen: true,
      ),
    );
  }
}
5
likes
0
pub points
37%
popularity

Publisher

verified publisheratsign.org

A flutter plugin project to provide chat feature using atsigns and atprotocol.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

at_client_mobile, at_common_flutter, at_commons, at_contact, at_lookup, flutter, pedantic

More

Packages that depend on at_chat_flutter