reetags_widgets 0.0.8
reetags_widgets: ^0.0.8 copied to clipboard
Official Reetags widgets for displaying stories in Flutter applications. Features include story cards, story circles, and built-in story viewer with web support.
Reetags Widgets #
Official Reetags widgets for displaying stories in Flutter applications.
Features #
- Display stories in multiple formats:
- Story Cards - Horizontal scrolling card format
- Story Circles - Instagram-style circle format
- Built-in story viewer with web support
- Customizable UI components
- Automatic error handling and loading states
- Responsive design for all screen sizes
Getting Started #
Installation #
Add this to your package's pubspec.yaml
file:
dependencies:
reetags_widgets: ^0.0.1
Then run:
flutter pub get
Usage #
Import the package:
import 'package:reetags_widgets/reetags_widgets.dart';
Story Circles
StoryCircleList(
token: 'YOUR_REETAGS_TOKEN',
onTap: (publication) {
// Handle redirection to your product page
// Setup the URL on your Reetags Dashboard
},
)
Story Cards
StoryCardList(
token: 'YOUR_REETAGS_TOKEN',
onTap: (publication) {
// Handle redirection to your product page
// Setup the URL on your Reetags Dashboard
},
)
Configuration #
Required Parameters #
Parameter | Type | Description |
---|---|---|
token |
String |
Your Reetags API authentication token |
Optional Parameters #
Parameter | Type | Default | Description |
---|---|---|---|
onTap |
Function(Publication) |
null |
Callback when a story is tapped |
backgroundColor |
Color |
Colors.white |
Background color of the widget |
loadingColor |
Color |
Colors.blue |
Color of the loading indicator |
Example #
import 'package:flutter/material.dart';
import 'package:reetags_widgets/reetags_widgets.dart';
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Reetags Stories'),
),
body: Column(
children: [
// Story Circles
SizedBox(
height: 100,
child: StoryCircleList(
token: 'YOUR_REETAGS_TOKEN',
onTap: (publication) {
print('Story tapped: ${publication.id}');
},
),
),
// Story Cards
StoryCardList(
token: 'YOUR_REETAGS_TOKEN',
onTap: (publication) {
print('Story tapped: ${publication.id}');
},
),
],
),
);
}
}
License #
This project is licensed under the MIT License - see the LICENSE file for details.