oghref_material 2.1.1 copy "oghref_material: ^2.1.1" to clipboard
oghref_material: ^2.1.1 copied to clipboard

Material themed widget for generating rich information link from URL.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:oghref_material/oghref_material.dart';
import 'package:provider/provider.dart';

import 'app.dart';
import 'theme_preference.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  OgHrefMaterialBinding.ensureInitialized();
  runApp(const OgHrefMaterialExampleApp());
}

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

  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider<ThemePreference>(
        create: (context) => ThemePreference(),
        builder: (context, child) {
          final ThemePreference pref = context.watch<ThemePreference>();

          return MaterialApp(
              theme: ThemeData(useMaterial3: pref.materialThree),
              darkTheme: ThemeData.dark(useMaterial3: pref.materialThree),
              themeMode: pref.darkMode ? ThemeMode.dark : ThemeMode.light,
              home: const OgHrefMaterialExampleHome());
        });
  }
}
3
likes
150
points
137
downloads
screenshot

Publisher

verified publisherrk0cc.xyz

Weekly Downloads

Material themed widget for generating rich information link from URL.

Repository (GitHub)
View/report issues

Topics

#web #link #graph #http #material

Documentation

API reference

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

flutter, media_kit, meta, oghref_builder, oghref_media_control, oghref_model, page_view_dot_indicator

More

Packages that depend on oghref_material