oghref_builder 4.1.3 copy "oghref_builder: ^4.1.3" to clipboard
oghref_builder: ^4.1.3 copied to clipboard

A Flutter widget for displaying rich information link with callback action provided.

example/main.dart

/*
  This library can be uses in various theme of widget apps.

  In this example, it implement under Material.
*/
import 'package:flutter/material.dart';
import 'package:oghref_builder/oghref_builder.dart';

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

  Widget _onRetrived(
      BuildContext context, MetaInfo metaInfo, VoidCallback openLink) {
    return ListTile(onTap: openLink, title: Text(metaInfo.title ?? ""));
  }

  Widget _onFetchFailed(
      BuildContext context, Object exception, VoidCallback openLink) {
    return ListTile(onTap: openLink, title: const Text("Error"));
  }

  @override
  Widget build(BuildContext context) {
    return OgHrefBuilder.updatable(Uri.parse("example.com"),
        onRetrived: _onRetrived, onFetchFailed: _onFetchFailed);
  }
}
0
likes
160
pub points
0%
popularity

Publisher

verified publisherrk0cc.xyz

A Flutter widget for displaying rich information link with callback action provided.

Repository (GitHub)
View/report issues

Documentation

API reference

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

flutter, http, meta, oghref_model, url_launcher, url_launcher_platform_interface

More

Packages that depend on oghref_builder