user_agent_analyzer 5.0.0-beta.1 user_agent_analyzer: ^5.0.0-beta.1 copied to clipboard
A library to identify the type of devices and web browsers based on User-Agent string.
User Agent Analyzer #
Replacement of package:user_agent
with breaking changes 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 {
// ...
}
});
}