reetags_widgets 0.0.8 copy "reetags_widgets: ^0.0.8" to clipboard
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.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:reetags_widgets/reetags_widgets.dart';
import 'product_page.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Reetags',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Reetags Demo'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  final String title;

  const MyHomePage({
    super.key,
    required this.title,
  });

  Future<bool> _handleProductRedirect(
      BuildContext context, String productId) async {
    await Navigator.push(
      context,
      MaterialPageRoute(
        builder: (context) => ProductPage(productId: productId),
      ),
    );
    return true;
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
        actions: [
          // Test button in app bar
          TextButton.icon(
            onPressed: () => _handleProductRedirect(context, '123'),
            icon: const Icon(Icons.shopping_bag),
            label: const Text('Test Product Page'),
            style: TextButton.styleFrom(foregroundColor: Colors.white),
          ),
        ],
      ),
      body: Column(
        children: [
          // Story Circles
          StoryCircleList(
            height: 100,
            token:
                '3d32dfa5f78019888901f4c32eeb464634fb3053d72f46ac8d38279fa9d7ad52',
            onProductRedirect: (productId) =>
                _handleProductRedirect(context, productId),
          ),

          const SizedBox(height: 20),

          // Story Cards
          StoryCardList(
            cardHeight: 250,
            token:
                '3d32dfa5f78019888901f4c32eeb464634fb3053d72f46ac8d38279fa9d7ad52',
            onProductRedirect: (productId) =>
                _handleProductRedirect(context, productId),
          ),
        ],
      ),
    );
  }
}
2
likes
150
points
114
downloads

Publisher

unverified uploader

Weekly Downloads

Official Reetags widgets for displaying stories in Flutter applications. Features include story cards, story circles, and built-in story viewer with web support.

Homepage

Topics

#reetags #reetags-widgets #reetags-flutter #video-shopping #video-shopping-app

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_inappwebview, http

More

Packages that depend on reetags_widgets