at_events_flutter 3.1.7 at_events_flutter: ^3.1.7 copied to clipboard
A Flutter plugin project to manage events (time, place and attendees) using the @platform.
at_events_flutter example #
The [at_events_flutter] package is designed to make it easy to manage events between atsigns.
Give it a try #
This package includes a working sample application in the example directory that demonstrates the key features of the package. To create a personalized copy, use at_app create
as shown below or check it out on GitHub.
$ flutter pub global activate at_app
$ at_app create --sample=<package ID> <app name>
$ cd <app name>
$ flutter run
Notes:
- You only need to run
flutter pub global activate
once - Use
at_app.bat
for Windows
How it works #
Like most applications built for the @platform, we start with the at_onboarding_flutter widget which handles secure management of secret keys for an atsign as cryptographically secure replacement for usernames and passwords.
We use the [Onboarding()] widget in our [main.dart] and navigate to our [second_screen.dart] after successfully onboarding.
If you want to remove any already paired atsign, use the Clear paired atsigns
button, it will remove all the paired atsigns for this example package.
As the [at_events_flutter] package has to be initialised, so we initialise it in the [init()] of second_screen.dart
by calling
initialiseEventService(NavService.navKey,
mapKey: dotenv.get('MAP_KEY'),
apiKey: dotenv.get('API_KEY'),
rootDomain: 'root.atsign.org',
streamAlternative: updateEvents
);
NOTE:
- Make sure to pass in the [MAP_KEY] and the [API_KEY] in the
.env
file. - The [at_events_flutter] depends on [at_location_flutter] for location sharing, so we use the default value of [initLocation] (true) in [initialiseEventService()].
We also pass a function [updateEvents] to [initialiseEventService()] in the [streamAlternative] parameter which will give us a list of updated events from the [at_events_flutter] package.
The [second_screen.dart] consists of the following functions:
- Create event - Will build the default create event bottomsheet. To use this functionality call [CreateEvent()].
- Move to the map screen for an event - Call [HomeEventService().onEventModelTap()] and pass in the event parameter.
Open source usage and contributions #
Like everything else we do, this package and even the sample application are open source software which means we love it when you gift us with your feedback, contributions and even any bugs that you help us to discover. See CONTRIBUTING.md for detailed guidance on how to setup tools, tests and make a pull request.