at_events_flutter 3.1.2 copy "at_events_flutter: ^3.1.2" to clipboard
at_events_flutter: ^3.1.2 copied to clipboard

outdated

A Flutter plugin project to manage events (time, place and attendees) using the @‎platform.

Now for some internet optimism. #

pub package gitHub license

at_events_flutter #

Introduction #

A flutter plugin project to manage events between atsigns.

Get Started: #

Initially to get a basic overview of the SDK, you must read the atsign docs.

To use this package you must be having a basic setup, Follow here to get started.

Manually add the package to a project: #

Instructions on how to manually add this package to you project can be found on pub.dev here.

Clone it from github #

Feel free to fork a copy of the source from the GitHub Repo

Initialising: #

It is expected that the app will first authenticate an atsign using the Onboarding widget.

The event service needs to be initialised with a required GlobalKey

  initialiseEventService(
    navKey,
    mapKey: 'xxxx',
    apiKey: 'xxxx',
    rootDomain: 'root.atsign.org',
    streamAlternative: (__){},
    initLocation: true,
  );

As this package needs location permission, so add these for:

IOS: (ios/Runner/Info.plist)

<key>NSLocationWhenInUseUsageDescription</key>
<string>Explain the description here.</string>

Android: (android/app/src/main/AndroidManifest.xml)

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

at_events_flutter depends on at_location_flutter for the following features:

  • Sending/receiving location, make sure to initialise at_location_flutter inside/outside the at_events_flutter package, if location sharing is needed.
  • To render the map, pass [mapKey] to [initializeLocationService], if map is needed.
  • To calculate the ETA, pass [apiKey] to [initializeLocationService], if ETA is needed.

Usage #

To create a new event, using the default screen:

  CreateEvent(
    AtClientManager.getInstance(),
  ),

To use event creation/edit functions, use the [EventService()] singleton, make sure to call [EventService().init()] before using these functions:

  • createEvent() - Can create and edit based on [isEventUpdate] passed to [init()]
  • editEvent() - Will update the already created event
  • sendEventNotification() - Will create a new event

Navigating to the map screen for an event:

EventsMapScreenData().moveToEventScreen(eventNotificationModel);

Different datatypes used in the package:

 - EventNotificationModel: Contains the details of an event and is sent to atsigns while creating an event.
 - EventKeyLocationModel - The package uses this to keep a track of all the event notifications.

Steps to get mapKey #

Steps to get apiKey #

Example #

We have a good example with explanation in the at_events_flutter package.

Open source usage and contributions #

This is freely licensed open source code, so feel free to use it as is, suggest changes or enhancements or create your own version. See CONTRIBUTING.md for detailed guidance on how to setup tools, tests and make a pull request.