Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

At follows documentation #326

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions at_follows_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 3.0.5
- Documentation improvements.
## 3.0.4
- updated dependencies and documentation
## 3.0.3
Expand Down
178 changes: 170 additions & 8 deletions at_follows_flutter/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,106 @@
<img src="https://atsign.dev/assets/img/@developersmall.png?sanitize=true">

<img width=250px src="https://atsign.dev/assets/img/@platform_logo_grey.svg?sanitize=true">

### Now for a little internet optimism
[![Pub Package](https://img.shields.io/pub/v/at_follows_flutter)](https://pub.dev/packages/at_follows_flutter)
[![Pub Package](https://img.shields.io/pub/v/at_follows_flutter)](https://pub.dev/packages/at_follows_flutter) [![pub points](https://badges.bar/at_follows_flutter/pub%20points)](https://pub.dev/packages/at_follows_flutter/score) [![gitHub license](https://img.shields.io/badge/license-BSD3-blue.svg)](./LICENSE)

# at_follows_flutter

A flutter package for implementing the **follow** feature.

Built to work with the @platform, this package can be used to implement the "follows" and "following" features for flutter applications.

---

### Features

The at_follows_flutter package implements the follow/unfollow feature just like on popular social media. Add this package to your flutter app to:
- Implement the "follows" and "following" feature for your flutter application.
- Follow/unfollow any active @sign from our @sign
- Collect and show the @signs *followed by* and *following* a particular @sign.

---

## Get started
There are three options to get started using this package.

<!---
If the package has a template that at_app uses to generate a skeleton app,
that is the quickest way for a developer to assess it and get going with
their app.
-->
### 1. Quick start - generate a skeleton app with at_app
This package includes a working sample application in the
[Example](./example) directory that you can use to create a personalized copy using ```at_app create``` in four commands.

```sh
$ 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


<!---
Cloning the repo and example app from GitHub is the next option for a
developer to get started.
-->
### 2. Clone it from GitHub
<!---
Make sure to edit the link below to refer to your package repo.
-->
Feel free to fork a copy the source from the [GitHub repo](https://github.com/atsign-foundation/at_client_sdk). The example code contained there is the same as the template that is used by at_app above.

```sh
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
```

<!---
The last option is to use the traditionaL instructions for adding the package to a project. This is basically the content generated on pub.dev under the "Installing" tab.
-->
### 3. Manually add the package to a project

#### Add it to to your project
Run the following command:
```sh
$ flutter pub add at_client_mobile
```
-or-

Add the package to the pubspec.yaml at the root of the project.
```yaml
dependencies:
at_client_mobile: ^3.1.2
```
And then run
```sh
$ flutter pub get
```

#### Import it
Now in your Dart code, you can use:

# at_follows_flutter
```dart
import 'package:at_client_mobile/at_client_mobile.dart';
```

A flutter plugin project to integrate follows feature for @signs.
#### How it works

<!---
Add details on how to setup the package
-->
## Setup

<!---
Add details on how to use the package in an application
-->

<details>
<summary>Android</summary>

### Android
Add the following permissions to AndroidManifest.xml

```
Expand All @@ -26,11 +119,14 @@ Also, the Android version support in app/build.gradle
compileSdkVersion 29

minSdkVersion 24
targetSdkVersion 29
targetSdkVersion 30
```
</details>

<details>
<summary>iOS</summary>


### iOS
Add the following permission string to info.plist

```
Expand Down Expand Up @@ -74,6 +170,9 @@ post_install do |installer|
end
end
```

</details>

### Plugin description
Supports for single @sign follows feature. This plugin provides two screens:

Expand All @@ -83,7 +182,9 @@ Displays all the @signs that are being followed and followers of the given @sign
### Add @sign to follow
Scan the QR code of an @sign or type the @sign to follow.

### Sample usage


## Sample usage
The plugin will takes AtClientService instance to show the follows list of an @sign.

```
Expand All @@ -107,6 +208,67 @@ TextButton(
3. followerAtsignTitle - follower @sign received from app's notification
4. followAtsignTitle - @sign followed from webapp.

## 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](CONTRIBUTING.md)
for detailed guidance on how to setup tools, tests and make a pull request.


<!---
Make sure your source code annotations are clear and comprehensive.
-->
For more information, please see the API documentation listed on pub.dev.

<!---
If we have any pages for these docs on atsign.dev site, it would be
good to add links.(optional)
-->
### Learn More
To learn more about this package or the @platform, visit [atsign.dev](https://atsign.dev/)

Get Started with the @platform by [setting up a project](https://atsign.dev/docs/get-started/create-a-project/).

<!---
You should include language like below if you would like others to contribute
to your package.
-->


<!---
Have we correctly acknowledged the work of others (and their Trademarks etc.)
where appropriate (per the conditions of their LICENSE?
-->

<!--- ## Acknowledgement/attribution

-->

<!---
Who created this?
Do they have complete GitHub profiles?
How can they be contacted?
Who is going to respond to pull requests?
-->

<!---
## Maintainers

-->

<!--- Add SEO researched keywords here for the package
-->
*Tags*

Making follows and unfollows button in Flutter using @platform,
How to create a follow and unfollow feature in Flutter,
Follow,
Follows,
Followers,
Following,
Unfollow,
Atsign,
@sign,




Expand Down
2 changes: 1 addition & 1 deletion at_follows_flutter/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.atsign.at_follows_flutter_example"
minSdkVersion 24
targetSdkVersion 29
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
3 changes: 2 additions & 1 deletion at_follows_flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: at_follows_flutter_example
description: Demonstrates how to use the at_follows_flutter plugin.

version: 1.0.0+1
homepage: https://atsign.com/
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
Expand Down
2 changes: 1 addition & 1 deletion at_follows_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: at_follows_flutter
description: A Flutter plugin project that provides a basic social "follows" functionality for @signs. Provides a list of followers and following for @signs with the option to unfollow them.
version: 3.0.4
version: 3.0.5
homepage: https://atsign.dev
repository: https://github.com/atsign-foundation/at_widgets

Expand Down