opengraph

Last updated:

0 purchases

opengraph Image
opengraph Images
Add to Cart

Description:

opengraph

OpenGraph Preview Widget #


This widget allows you to preview the OpenGraph data of a URL.
Screenshots #

Getting Started #
Initialize the widget with the URL you want to preview.
Max Objects #
maxObjects.
Define in the maxObjects variable the maximum number of objects that the app will store in memory to avoid making constant requests.
Objects are only available during the session, that is, in ephemeral memory. It is not stored in persistent memory.
Example #
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(MyApp());
}

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('OpenGraph Preview'),
),
body: Center(
child: OpenGraphPreview(
url: "https://www.youtube.com/watch?v=6g4dkBF5anU",
),
),
),
);
}
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.