.. | ||
example | ||
lib | ||
test | ||
.gitignore | ||
.travis.yml | ||
analysis_options.yaml | ||
AUTHORS.md | ||
CHANGELOG.md | ||
LICENSE | ||
LICENSE.orig | ||
pubspec.yaml | ||
README.md |
User Agent Analyzer
Forked from user_agent
to support NNBD
A library to identify the type of devices and web browsers based on User-Agent
string.
Runs anywhere.
void main() async {
app.get('/', (req, res) async {
var ua = UserAgent(req.headers.value('user-agent'));
if (ua.isChrome) {
res.redirect('/upgrade-your-browser');
return;
} else {
// ...
}
});
}