flutter_fb_news 1.1.1+1-dev.1 copy "flutter_fb_news: ^1.1.1+1-dev.1" to clipboard
flutter_fb_news: ^1.1.1+1-dev.1 copied to clipboard

discontinued
outdated

Flutter plugin for displaying Facebook page feed with photos and videos

flutter_fb_news #

Flutter plugin for displaying Facebook page feed with photos and videos

platform pub donate

Getting Started #

You should ensure that you add the flutter_fb_news as a dependency in your flutter project.

dependencies:
  flutter_fb_news: '^1.1.1'

You should then run flutter packages get in your terminal so as to get the package.

Using #

import 'package:flutter_fb_news/flutter_fb_news.dart';

Center(
    child: FbNews(
        accesToken:"xyz",
        pageId: "123567890",
        limit: 25,
        config: FbNewsConfig(
            subtitle = "from Facebook",
            waiting: Column(
                children: [
                    CircularProgressIndicator(),
                    SizedBox(
                        height: 10,
                    )
                ],
            ),
            noDataOrError: Card(
                color: Colors.red,
                child: Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                        Text(
                            snapshot.error.toString(),
                            style: TextStyle(
                                color: Colors.white,
                            ),
                        )
                    ],
                ),
            ),
            fields: [
                FbNewsFields.header,
                FbNewsFields.attachmentsPhotos,
                FbNewsFields.attachmentsVideos,
                FbNewsFields.message,
                FbNewsFields.footer,
            ],
            borderColor: Colors.black,
            showBorder = true,
            backgroundColor: Colors.white,
            textColor: Colors.black,
            linkColor: Colors.blue,
        ),
    ),
),

Demo #

Demo

Parameters #

| Parameter | Type | Required | Description | | ---- | ---- | ---- | ---- | ---- | | pageId | String | yes | is required to identify the Facebook page, for example (253146702201895)| | accesToken | String | yes |is required to authorize for the Facebook Api Docu to get the authToken https://developers.facebook.com/docs/facebook-login/access-tokens#pagetokens| | limit | int | no | Limits the number of elements that are loaded Default: 20| | config | FbNewsConfig | no | Customize the appearance of the posts|

FbNewsConfig Params #

Parameter Type Required Description
subtitle String no Subtitle in the every feeditem Default: "von Facebook"
waiting Widget no The waiting widget is displayed when the data is loaded
noDataOrError Widget no The noDataOrErrorwidget is displayed if the response contains no data or an error
fields List no Select which fields to display
borderColor Color no Set the Color of the border
showBorder Boolean no Toogle the display of the border
backgroundColor Color no Set the Color of the background
textColor Color no Set the Color of the text
linkColor Color no Set the Color of a link

FbNewsFieldName #

The possible filds are

  • FbNewsFields.header
  • FbNewsFields.attachmentsPhotos
  • FbNewsFields.attachmentsVideos
  • FbNewsFields.message
  • FbNewsFields.footer
16
likes
0
pub points
37%
popularity

Publisher

verified publishercedtegapps.de

Flutter plugin for displaying Facebook page feed with photos and videos

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

carousel_slider, chewie, flutter, flutter_linkify, http, url_launcher, video_player

More

Packages that depend on flutter_fb_news