Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Latest commit

 

History

History
24 lines (20 loc) · 776 Bytes

README.md

File metadata and controls

24 lines (20 loc) · 776 Bytes

travis build

User Environment

This package allows to detect the platform and the browser version used to view a web page.

Differentiated browsers are: IE, Edge, Chrome, Safari, Firefox, Opera, Electron, Other along with Mac, Windows and Other platforms.

Usage

  import 'package:user_environment/user_environment.dart';
  void main() {
    UserEnvironment env = UserEnvironmentFactory();
    print([
      env.browser.type,
      env.browser.version?.value,
      env.browser.getFeatureVersion('AppleWebKit'),
      env.platform.type
    ]);
  }

Running tests

pub serve test pub run test -p chrome