flutter_instagram_story 0.0.2 copy "flutter_instagram_story: ^0.0.2" to clipboard
flutter_instagram_story: ^0.0.2 copied to clipboard

discontinued
PlatformiOS

Sharing photos to Instagram story.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_instagram_story/flutter_instagram_story.dart';
import 'package:screenshot/screenshot.dart';

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final ScreenshotController _screenshotController = ScreenshotController();

  @override
  void initState() {
    super.initState();
  }

  void _shareWithBackground() async {
    _screenshotController.capture().then(
          (img) async => {
            debugPrint(
              await FlutterInstagramStory.shareWithBackgroundFromImageBuffer(stickerData: img!),
            )
          },
        );
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Screenshot(
        controller: _screenshotController,
        child: Scaffold(
          appBar: AppBar(
            title: const Text('flutter_instagram_story'),
          ),
          body: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                const ElevatedButton(
                  onPressed: null,
                  child: Text('Test'),
                ),
                ElevatedButton(
                  onPressed: _shareWithBackground,
                  child: const Text('Share with background'),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
1
likes
130
pub points
0%
popularity

Publisher

unverified uploader

Sharing photos to Instagram story.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_instagram_story