• This project
    • Loading...
  • Sign in

xt / Flutter-ReserveApp · Files

Go to a project

GitLab

  • Go to group
  • Project
  • Activity
  • Files
  • Commits
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Members
  • Labels
  • Wiki
  • Forks
  • Network
  • Flutter-ReserveApp
  • library
  • fluttertpc_flutter_sms-b91cabe9da1811...
  • lib
  • src
  • user_agent
  • web.dart
  • 发短信插件放在本地,需要更改部分代码
    3b263c8b
    by weixin_45529955
    2025-12-31 16:51:20 +0800  
    Browse Files
web.dart 372 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import 'dart:html' as html;

bool isCupertino() {
  final _devices = [
    'iPad Simulator',
    'iPhone Simulator',
    'iPod Simulator',
    'iPad',
    'iPhone',
    'iPod',
    'Mac OS X',
  ];
  final String _agent = html.window.navigator.userAgent;
  for (final device in _devices) {
    if (_agent.contains(device)) {
      return true;
    }
  }
  return false;
}