How to get timezone, Language and County Id in flutter by the location of device in flutter?

后端 未结 7 748
长情又很酷
长情又很酷 2020-12-24 10:59

I am new to flutter, and I want to get Timezone, language, and county Id when I run my project on my device android or iOS. It should detect Timezone, language and country I

相关标签:
7条回答
  • 2020-12-24 11:44

    Try this:

    import 'dart:ui' as ui;
    ......
     @override
      Widget build(BuildContext context) {
    // get system language code
        _sysLng = ui.window.locale.languageCode;    
    ...
    
    0 讨论(0)
提交回复
热议问题