drupal_linkset_menu 1.0.0 copy "drupal_linkset_menu: ^1.0.0" to clipboard
drupal_linkset_menu: ^1.0.0 copied to clipboard

Flutter package to generate drupal menu from application/linkset+json mimetype.

drupal_menu #

A Flutter package that parses application/linkset+json mimetype and generates a Menu Object. (Primarily intended to be used for Drupal Decoupled Menus Module)

Using #

The easiest way to use this library is via the provided functions

With an ApiUrl

import 'package:drupal_linkset_menu/drupal_linkset_menu.dart';
String menu = "main";
String apiURL = 'http://localhost:50915/system/menu/${menu}/linkset';
Menu menu = await getDrupalMenuFromURL(apiURL, menu);

With a JSON string

import 'package:drupal_linkset_menu/drupal_linkset_menu.dart';
String menu = "footer";
String json = '{"linkset":[{"anchor":"\/system\/menu\/footer\/linkset","item":[{"href":"\/contact","title":"Contact","drupal-menu-hierarchy":[".000"],"drupal-menu-machine-name":["footer"]}]}]}';
Menu menu = await getDrupalMenuFromJSON(menu, json);
0
likes
110
pub points
11%
popularity

Publisher

verified publisheriamaqib.xyz

Flutter package to generate drupal menu from application/linkset+json mimetype.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, http

More

Packages that depend on drupal_linkset_menu