pub package gitHub license

Overview

The at_events_flutter package is for Flutter developers who would like to integrate event management feature in their apps.

This open source package is written in Dart, supports Flutter and follows the @‎platform's decentralized, edge computing model with the following features:

  • Cryptographic control of data access through personal data stores
  • No application backend needed
  • End to end encryption where only the data owner has the keys
  • Private and surveillance free connectivity
  • Create and update event with location and participants

We call giving people control of access to their data “flipping the internet” and you can learn more about how it works by reading this overview.

Get Started:

There are three options to get started using this package.

1. Quick start - generate a skeleton app with at_app

This package includes a working sample application in the Example directory that you can use to create a personalized copy using at_app create in four commands.

$ flutter pub global activate at_app 
$ at_app create --sample=<package ID> <app name> 
$ cd <app name>
$ flutter run

Notes:

  1. You only need to run flutter pub global activate once
  2. Use at_app.bat for Windows

2. Clone it from GitHub

Feel free to fork a copy of the source from the GitHub repo. The example code contained there is the same as the template that is used by at_app above.

$ git clone https://github.com/atsign-foundation/at_widgets.git

3. 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.

How it works

Setup

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 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.

Libraries

at_event_notification_listener
at_events_flutter
bottom_sheet
colors
concurrent_event_request_dialog
constants
contact_list_tile
This widget is a list tile to display contacts selected for sharing it takes onlyRemovemethod as a boolean with default value as false if true trailing icon remains close icon onAdd method is disabled all isSelected functionalities are disabled
contact_service
contacts_initials
This is a widget to display the initials of an atsign which does not have a profile picture it takes in @param size as a double and @param initials as String and display those initials in a circular avatar with random colors
create_event
custom_button
custom_circle_avatar
custom_heading
custom_popup_route
custom_toast
display_tile
draggable_symbol
enums_model
error_screen
event_key_location_model
event_key_stream_service
event_member_location
event_notification
event_notification_dialog
event_services
event_time_selection
events_collapsed_content
events_map_screen
floating_icon
home_event_service
hybrid_notifiation_model
init_events_service
invite_card
loading_widget
location_tile
one_day_event
overlapping_contacts
participants
pop_button
recurring_event
select_location
selected_location
text_styles
text_tile
texts
triple_dot_loading
venues_services