vascular_flutter 0.0.5 copy "vascular_flutter: ^0.0.5" to clipboard
vascular_flutter: ^0.0.5 copied to clipboard

outdated

The Vascular flutter plugin. This package implements a cross-platform plugin interface to vascular's iOS and Android native SDKs. This allows core Vascular functionality to be implemented by Flutter a [...]

Vascular Plugin #

The Vascular Flutter plugin allows using Vascular's native iOS and Android APIs with Flutter apps written in Dart.

Usage #

  1. Add the vascular_flutter dependency to your package's pubspec.yaml file:
dependencies:
  vascular_flutter: ^0.0.5
  1. Install your flutter package dependencies by running the following in the command line at your project's root directory:
$ flutter pub get
  1. Import vascular into your project:
import 'package:vascular_flutter/vascular_flutter.dart';

Example Usage

// Import package
import 'package:vascular_flutter/vascular.dart';

// initializeApp
final vascular = initializeApp(
    APP_KEY, USER_ID);

// User
vascular.CreateUser();

// Inbox
final inbox = await vascular.Inbox();

// Next inbox (pagination)

final inbox = await vascular.InboxNext();

// Read
vascular.ReadMessages(inbox.newMessagesIds);

// Open 
vascular.OpenMessages(inbox.readMessagesIds);

// Delete
vascular.DeleteMessage(inbox.messages[0].uuid);

// Add tags
vascular.AddTags(["music", "sport"]);

// Delete tags
vascular.DeleteTags(["music", "sport"]);

// List Tags
vascular.Tags();



List<InboxMessage> messages = inbox.messages;

@override
Widget build(BuildContext context) {
    return MaterialApp(
            home: Scaffold(
                appBar: AppBar(
                    title: Text(widget.title),
            ),
            body: Center(
                child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: <Widget>[
                        TextButton(
                        onPressed: () {
                            vascular.InboxNext();
                        },
                        child: Text('TextButton'),
                        ),
                        new Text(_newInbox.toString(), style: Theme.TextStyles.Badge),
                        Expanded(
                            child: new ListView.builder(
                                itemCount: messages.length,
                                itemBuilder: (BuildContext ctxt, int Index) {
                                return messageCard.MessageCard(
                                    messages[Index]);
                                }))
                    ],
                ),
            ),
        )
    );
}
1
likes
0
points
3
downloads

Publisher

unverified uploader

Weekly Downloads

The Vascular flutter plugin. This package implements a cross-platform plugin interface to vascular's iOS and Android native SDKs. This allows core Vascular functionality to be implemented by Flutter apps written in dart. The available core Vascular functionality currently includes: message center, and user manager.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

async, fixnum, grpc, protobuf

More

Packages that depend on vascular_flutter