xclud / window_location_href

window.location.href, similar to js, for flutter (all platforms)

Home Page:https://pub.dev/packages/window_location_href

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pub package

A cross-platfrom implementation of window.location.href & window.navigator.userAgent.

Supported platforms

  • Flutter Android
  • Flutter iOS
  • Flutter Web
  • Flutter Desktop

Getting Started

In your pubspec.yaml file add:

dependencies:
  window_location_href: any

Then, in your code:

import 'window_location_href/window_location_href.dart';

final location = href;

Above code returns current page url on web (window.location.href), and null on other platforms.

About

window.location.href, similar to js, for flutter (all platforms)

https://pub.dev/packages/window_location_href

License:MIT License


Languages

Language:Dart 54.4%Language:HTML 39.7%Language:Swift 4.2%Language:Kotlin 1.3%Language:Objective-C 0.4%