user_agent 1.0.0-beta copy "user_agent: ^1.0.0-beta" to clipboard
user_agent: ^1.0.0-beta copied to clipboard

outdatedDart 1 only

A Dart user agent detection library.

user_agent #

Dart user agent detection library. Uses the code from both dart:html and package:r2d2.

Runs anywhere.

main() async {
    app.before.add('*', (req, res) async {
        var ua = new UserAgent(req.headers.value('user-agent'));

        if (ua.isChrome) {
            res.redirect('/upgrade-your-browser');
            return;
        } else {
            // ...
        }
    });
}
3
likes
0
pub points
19%
popularity

Publisher

unverified uploader

A Dart user agent detection library.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

r2d2

More

Packages that depend on user_agent