opengraph 0.1.0 copy "opengraph: ^0.1.0" to clipboard
opengraph: ^0.1.0 copied to clipboard

A Dart/Flutter package for seamless integration of OpenGraph metadata, allowing easy display of website information via API.

example/example.dart

// ignore_for_file: non_constant_identifier_names

import 'package:flutter/material.dart';
import 'package:opengraph/opengraph.dart';

class OpenGraphProvider {
  static OpenGraphConfiguration CONFIG =
      OpenGraphConfiguration(maxObjects: 1000);
}

main() async {
  WidgetsFlutterBinding.ensureInitialized();
  // Initialize the provider
  OpenGraphRequest().initProvider(OpenGraphProvider.CONFIG);
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('OpenGraph Preview'),
        ),
        body: const Center(
          child: OpenGraphPreview(
            url: "https://www.youtube.com/watch?v=6g4dkBF5anU",
          ),
        ),
      ),
    );
  }
}
2
likes
140
points
140
downloads

Publisher

verified publisherdatogedon.com

Weekly Downloads

A Dart/Flutter package for seamless integration of OpenGraph metadata, allowing easy display of website information via API.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, freezed_annotation, html, json_annotation

More

Packages that depend on opengraph