.. | ||
example | ||
lib | ||
test | ||
.gitignore | ||
.travis.yml | ||
analysis_options.yaml | ||
AUTHORS.md | ||
CHANGELOG.md | ||
LICENSE | ||
LICENSE.orig | ||
pubspec.yaml | ||
README.md |
user_agent
Simple Dart user agent detection library.
Runs anywhere.
Incorporates some code from the old package:r2d2
.
main() async {
app.get('/', (req, res) async {
var ua = new UserAgent(req.headers.value('user-agent'));
if (ua.isChrome) {
res.redirect('/upgrade-your-browser');
return;
} else {
// ...
}
});
}