hanxu317317 / city_pickers Goto Github PK
View Code? Open in Web Editor NEWflutter ios city_pickers
License: MIT License
flutter ios city_pickers
License: MIT License
{
"id": 3,
"name": "安徽省",
"children": [
{
"id": 36,
"name": "安庆市",
"children": [
{
"id": 398,
"name": "迎江区"
},
{
"id": 399,
"name": "大观区"
},
{
"id": 400,
"name": "宜秀区"
},
{
"id": 401,
"name": "桐城市"
},
{
"id": 402,
"name": "怀宁县"
},
{
"id": 403,
"name": "枞阳县"
},
{
"id": 404,
"name": "潜山县"
},
{
"id": 405,
"name": "太湖县"
},
{
"id": 406,
"name": "宿松县"
},
{
"id": 407,
"name": "望江县"
},
{
"id": 408,
"name": "岳西县"
}
]
},
{
"id": 37,
"name": "蚌埠市",
"children": [
{
"id": 409,
"name": "中市区"
},
{
"id": 410,
"name": "东市区"
},
{
"id": 411,
"name": "西市区"
},
{
"id": 412,
"name": "郊区"
},
{
"id": 413,
"name": "怀远县"
},
{
"id": 414,
"name": "五河县"
},
{
"id": 415,
"name": "固镇县"
}
]
},
{
"id": 38,
"name": "巢湖市",
"children": [
{
"id": 416,
"name": "居巢区"
},
{
"id": 417,
"name": "庐江县"
},
{
"id": 418,
"name": "无为县"
},
{
"id": 419,
"name": "含山县"
},
{
"id": 420,
"name": "和县"
}
]
},
{
"id": 39,
"name": "池州市",
"children": [
{
"id": 421,
"name": "贵池区"
},
{
"id": 422,
"name": "东至县"
},
{
"id": 423,
"name": "石台县"
},
{
"id": 424,
"name": "青阳县"
}
]
},
{
"id": 40,
"name": "滁州市",
"children": [
{
"id": 425,
"name": "琅琊区"
},
{
"id": 426,
"name": "南谯区"
},
{
"id": 427,
"name": "天长市"
},
{
"id": 428,
"name": "明光市"
},
{
"id": 429,
"name": "来安县"
},
{
"id": 430,
"name": "全椒县"
},
{
"id": 431,
"name": "定远县"
},
{
"id": 432,
"name": "凤阳县"
}
]
},
{
"id": 41,
"name": "阜阳市",
"children": [
{
"id": 433,
"name": "蚌山区"
},
{
"id": 434,
"name": "龙子湖区"
},
{
"id": 435,
"name": "禹会区"
},
{
"id": 436,
"name": "淮上区"
},
{
"id": 437,
"name": "颍州区"
},
{
"id": 438,
"name": "颍东区"
},
{
"id": 439,
"name": "颍泉区"
},
{
"id": 440,
"name": "界首市"
},
{
"id": 441,
"name": "临泉县"
},
{
"id": 442,
"name": "太和县"
},
{
"id": 443,
"name": "阜南县"
},
{
"id": 444,
"name": "颖上县"
}
]
},
{
"id": 42,
"name": "淮北市",
"children": [
{
"id": 445,
"name": "相山区"
},
{
"id": 446,
"name": "杜集区"
},
{
"id": 447,
"name": "烈山区"
},
{
"id": 448,
"name": "濉溪县"
}
]
},
{
"id": 43,
"name": "淮南市",
"children": [
{
"id": 449,
"name": "田家庵区"
},
{
"id": 450,
"name": "大通区"
},
{
"id": 451,
"name": "谢家集区"
},
{
"id": 452,
"name": "八公山区"
},
{
"id": 453,
"name": "潘集区"
},
{
"id": 454,
"name": "凤台县"
}
]
},
{
"id": 44,
"name": "黄山市",
"children": [
{
"id": 455,
"name": "屯溪区"
},
{
"id": 456,
"name": "黄山区"
},
{
"id": 457,
"name": "徽州区"
},
{
"id": 458,
"name": "歙县"
},
{
"id": 459,
"name": "休宁县"
},
{
"id": 460,
"name": "黟县"
},
{
"id": 461,
"name": "祁门县"
}
]
},
{
"id": 45,
"name": "六安市",
"children": [
{
"id": 462,
"name": "金安区"
},
{
"id": 463,
"name": "裕安区"
},
{
"id": 464,
"name": "寿县"
},
{
"id": 465,
"name": "霍邱县"
},
{
"id": 466,
"name": "舒城县"
},
{
"id": 467,
"name": "金寨县"
},
{
"id": 468,
"name": "霍山县"
}
]
},
{
"id": 46,
"name": "马鞍山市",
"children": [
{
"id": 469,
"name": "雨山区"
},
{
"id": 470,
"name": "花山区"
},
{
"id": 471,
"name": "金家庄区"
},
{
"id": 472,
"name": "当涂县"
}
]
},
{
"id": 47,
"name": "宿州市",
"children": [
{
"id": 473,
"name": "埇桥区"
},
{
"id": 474,
"name": "砀山县"
},
{
"id": 475,
"name": "萧县"
},
{
"id": 476,
"name": "灵璧县"
},
{
"id": 477,
"name": "泗县"
}
]
},
{
"id": 48,
"name": "铜陵市",
"children": [
{
"id": 478,
"name": "铜官山区"
},
{
"id": 479,
"name": "狮子山区"
},
{
"id": 480,
"name": "郊区"
},
{
"id": 481,
"name": "铜陵县"
}
]
},
{
"id": 49,
"name": "芜湖市",
"children": [
{
"id": 482,
"name": "镜湖区"
},
{
"id": 483,
"name": "弋江区"
},
{
"id": 484,
"name": "鸠江区"
},
{
"id": 485,
"name": "三山区"
},
{
"id": 486,
"name": "芜湖县"
},
{
"id": 487,
"name": "繁昌县"
},
{
"id": 488,
"name": "南陵县"
}
]
},
{
"id": 50,
"name": "宣城市",
"children": [
{
"id": 489,
"name": "宣州区"
},
{
"id": 490,
"name": "宁国市"
},
{
"id": 491,
"name": "郎溪县"
},
{
"id": 492,
"name": "广德县"
},
{
"id": 493,
"name": "泾县"
},
{
"id": 494,
"name": "绩溪县"
},
{
"id": 495,
"name": "旌德县"
}
]
},
{
"id": 51,
"name": "亳州市",
"children": [
{
"id": 496,
"name": "涡阳县"
},
{
"id": 497,
"name": "蒙城县"
},
{
"id": 498,
"name": "利辛县"
},
{
"id": 499,
"name": "谯城区"
}
]
},
{
"id": 3401,
"name": "合肥市",
"children": [
{
"id": 3402,
"name": "庐阳区"
},
{
"id": 3403,
"name": "瑶海区"
},
{
"id": 3404,
"name": "蜀山区"
},
{
"id": 3405,
"name": "包河区"
},
{
"id": 3406,
"name": "长丰县"
},
{
"id": 3407,
"name": "肥东县"
},
{
"id": 3408,
"name": "肥西县"
}
]
}
]
}
某种情况下,有的用户不希望填写有效的地址,一般会用火星替代。需要在地址选择时加入火星选项
ios没有#import <city_pickers/CityPickersPlugin.h>这个文件 请问是怎么回事
NoSuchMethodError: The setter 'provinceName=' was called on null.
Receiver: null
Tried calling: provinceName=""
I/flutter ( 9938): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter ( 9938): The following NoSuchMethodError was thrown building InheritRouteWidget:
I/flutter ( 9938): The getter 'child' was called on null.
I/flutter ( 9938): Receiver: null
I/flutter ( 9938): Tried calling: child
I/flutter ( 9938):
I/flutter ( 9938): The relevant error-causing widget was:
I/flutter ( 9938): InheritRouteWidget
I/flutter ( 9938): file:///Users/hezhipeng/app/flutter/.pub-cache/hosted/pub.flutter-io.cn/city_pickers-0.1.30/lib/src/mod/picker_popup_route.dart:54:16
I/flutter ( 9938):
I/flutter ( 9938): When the exception was thrown, this was the stack:
I/flutter ( 9938): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
I/flutter ( 9938): #1 _BaseView._initController (package:city_pickers/src/base/base.dart:120:33)
I/flutter ( 9938): #2 _BaseView.initState (package:city_pickers/src/base/base.dart:96:5)
I/flutter ( 9938): #3 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4355:58)
I/flutter ( 9938): #4 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #5 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #6 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #7 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #8 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #9 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #10 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #11 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #12 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #13 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #14 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #15 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #16 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #17 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #18 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #19 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #20 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #21 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #22 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #23 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #24 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #25 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #26 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #27 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #28 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #29 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #30 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #31 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #32 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #33 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #34 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #35 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #36 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #37 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #38 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #39 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #40 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #41 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #42 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #43 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #44 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #45 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #46 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #47 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #48 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #49 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #50 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #51 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #52 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #53 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #54 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #55 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #56 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #57 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #58 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #59 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #60 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #61 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
I/flutter ( 9938): #62 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #63 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #64 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
I/flutter ( 9938): #65 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #66 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #67 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #68 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #69 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #70 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
I/flutter ( 9938): #71 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #72 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #73 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #74 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #75 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #76 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #77 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
I/flutter ( 9938): #78 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #79 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #80 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #81 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
I/flutter ( 9938): #82 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #83 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #84 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #85 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #86 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #87 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #88 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #89 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #90 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
I/flutter ( 9938): #91 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #92 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #93 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #94 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #95 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #96 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
I/flutter ( 9938): #97 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #98 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #99 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #100 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #101 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #102 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #103 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #104 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #105 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #106 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
I/flutter ( 9938): #107 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #108 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #109 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #110 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #111 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #112 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #113 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #114 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #115 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #116 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #117 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #118 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
I/flutter ( 9938): #119 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #120 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #121 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #122 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #123 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #124 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
I/flutter ( 9938): #125 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
I/flutter ( 9938): #126 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
I/flutter ( 9938): #127 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
I/flutter ( 9938): #128 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
I/flutter ( 9938): #129 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5219:32)
I/flutter ( 9938): #130 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5561:17)
I/flutter ( 9938): #131 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
I/flutter ( 9938): #132 _TheatreElement.update (package:flutter/src/widgets/overlay.dart:605:16)
I/flutter ( 9938): #133 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
I/flutter ( 9938): #134 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #135 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #136 StatefulElement.update (package:flutter/src/widgets/framework.dart:4413:5)
I/flutter ( 9938): #137 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
I/flutter ( 9938): #138 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #139 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #140 ProxyElement.update (package:flutter/src/widgets/framework.dart:4557:5)
I/flutter ( 9938): #141 _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:94:11)
I/flutter ( 9938): #142 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
I/flutter ( 9938): #143 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5452:14)
I/flutter ( 9938): #144 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
I/flutter ( 9938): #145 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #146 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #147 StatefulElement.update (package:flutter/src/widgets/framework.dart:4413:5)
I/flutter ( 9938): #148 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
I/flutter ( 9938): #149 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5452:14)
I/flutter ( 9938): #150 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
I/flutter ( 9938): #151 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5452:14)
I/flutter ( 9938): #152 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
I/flutter ( 9938): #153 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #154 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #155 StatelessElement.update (package:flutter/src/widgets/framework.dart:4298:5)
I/flutter ( 9938): #156 Element.updateChild (package:flutter/src/widgets/framework.dart:2977:15)
I/flutter ( 9938): #157 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
I/flutter ( 9938): #158 Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
I/flutter ( 9938): #159 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2432:33)
I/flutter ( 9938): #160 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:773:20)
I/flutter ( 9938): #161 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:283:5)
I/flutter ( 9938): #162 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1102:15)
I/flutter ( 9938): #163 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1041:9)
I/flutter ( 9938): #164 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:957:5)
I/flutter ( 9938): #168 _invoke (dart:ui/hooks.dart:259:10)
I/flutter ( 9938): #169 _drawFrame (dart:ui/hooks.dart:217:3)
I/flutter ( 9938): (elided 3 frames from package dart:async)
I/flutter ( 9938):
I/flutter ( 9938): ════════════════════════════════════════════════════════════════════════════════════════════════════
问题描述:
在Xcode上打包,直接报错Module 'city_pickers' not found,构建失败
环境:
Flutter 1.12.13+hotfix.8 • channel stable •
https://github.com/flutter/flutter.git
Framework • revision 0b8abb4724 (2 周前) • 2020-02-11 11:44:36 -0800
Engine • revision e1e6ced81d
Tools • Dart 2.7.0
依赖版本:
city_pickers: ^0.1.30
白色主题下,选中的item上的字体变为白色,导致不可见
我看这个iOS和安卓都没写代码,如果弄成纯dart包,就不会因为一些IDE的配置冲突而报错。
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
title: "city picker",
home: Scaffold(
appBar: AppBar(
title: Text("city picker"),
),
body: new Column(
children: [
new Container(
child: _buildShowTypes(),
),
],
),
),
);
}
Widget _buildShowTypes() {
return Picker(
target: new Container(
color: Colors.red,
child: Text(
name,
style: TextStyle(fontSize: 20),
),
),
onConfirm: (PickerItem item) {
setState(() {
name = item.name;
});
},
items: [
PickerItem(name: '男',value: null),
PickerItem(name: '女',value: null),
],
);
}
@hanxu317317 你好这个是我代码,应该有个默认值 比方说我点击一个按钮 底部弹出2个选项 男 女,然后我点击屏幕其他地方消失,如果用户没有滚动选择 点击确定,并不能选中想要的值,比方说 男女 现在显示是女,然后点击弹出底部选择 ,直接点击确定,没有滚动,就不能选中男了。。。不知道我描述您能听懂吗
版本: city_pickers: ^0.1.20
问题: 需要显示“字母定位城市选择器”, 即showCitiesSelector, 但是使用自定义的数据源(如下),但却无法显示,显示的仍然是默认数据源,请问该怎么解决,谢谢!
自定义数据源格式:
const Map<String, String> countryData = {
"21": "国家1",
"22": "国家2",
"23": "国家3",
};
// 国家对应的城市
const Map<String, dynamic> cityData = {
// 国家1
"21": {
"21001": {"name": "ACde dhg", "alpha": "a"},
"21002": {"name": "AIS ncnd", "alpha": "a"},
"21003": {"name": "Nardd ryruu", "alpha": "n"},
"21004": {"name": "SMf dd tt", "alpha": "s"},
"21005": {"name": "Slafh hhf rr", "alpha": "s"},
"21006": {"name": "Surdht rty", "alpha": "s"}
},
// 国家2
"22": {
"22001": {"name": "Alahfg", "alpha": "a"},
"22002": {"name": "Pribadhf", "alpha": "p"}
},
// 国家3
"23": {
"23001": {"name": "Kesdhrhg", "alpha": "k"}
},
};
232764
调用showFullPageCityPicker,快速点击省市区,不是直接返回到调用showFullPageCityPicker的页面,而是返回到了更上一层页面。
example git:(master) ✗ flutter build apk --target-platform android-arm,android-arm64 --split-per-abi
[!] Your app isn't using AndroidX.
To avoid potential build failures, you can quickly migrate your app by following the
steps on https://goo.gl/CP92wY.
FAILURE: Build failed with an exception.
Android resource linking failed
Output: /Users/dengwenhao/coding/learn/city_pickers/example/build/app/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:186: error: resource android:attr/fontVariationSettings not found.
/Users/dengwenhao/coding/learn/city_pickers/example/build/app/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:187: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: /Users/dengwenhao/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/067c550bab45744a730d55ac6d07bb79/aapt2-3.2.1-4818971-osx/aapt2 link -I
/Users/dengwenhao/Library/Android/sdk/platforms/android-27/android.jar
--manifest\
/Users/dengwenhao/coding/learn/city_pickers/example/build/app/intermediates/merged_manifests/release/processReleaseManifest/merged/armeabi-v7a/AndroidManifest.xml
-o\
/Users/dengwenhao/coding/learn/city_pickers/example/build/app/intermediates/processed_res/release/processReleaseResources/out/resources-armeabi-v7aRelease.ap_
-R\
@/Users/dengwenhao/coding/learn/city_pickers/example/build/app/intermediates/incremental/processReleaseResources/resources-list-for-resources-armeabi-v7aRelease.ap_.txt
--auto-add-overlay\
--java\
/Users/dengwenhao/coding/learn/city_pickers/example/build/app/generated/not_namespaced_r_class_sources/release/processReleaseResources/r
--proguard\
/Users/dengwenhao/coding/learn/city_pickers/example/build/app/intermediates/proguard-rules/release/aapt_rules.txt
--custom-package\
com.example.citypickersexample\
-0\
apk\
--output-text-symbols\
/Users/dengwenhao/coding/learn/city_pickers/example/build/app/intermediates/symbols/release/R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0
Output: /Users/dengwenhao/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0.aar/d1e31fc57430ff614027e4e63f629ecb/res/values/values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/dengwenhao/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0.aar/d1e31fc57430ff614027e4e63f629ecb/res/values/values.xml:89:5-125:25: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: /Users/dengwenhao/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/067c550bab45744a730d55ac6d07bb79/aapt2-3.2.1-4818971-osx/aapt2 link -I
/Users/dengwenhao/Library/Android/sdk/platforms/android-27/android.jar
--manifest\
/Users/dengwenhao/coding/learn/city_pickers/example/build/app/intermediates/merged_manifests/release/processReleaseManifest/merged/armeabi-v7a/AndroidManifest.xml
-o\
/Users/dengwenhao/coding/learn/city_pickers/example/build/app/intermediates/processed_res/release/processReleaseResources/out/resources-armeabi-v7aRelease.ap_
-R\
@/Users/dengwenhao/coding/learn/city_pickers/example/build/app/intermediates/incremental/processReleaseResources/resources-list-for-resources-armeabi-v7aRelease.ap_.txt
--auto-add-overlay\
--java\
/Users/dengwenhao/coding/learn/city_pickers/example/build/app/generated/not_namespaced_r_class_sources/release/processReleaseResources/r
--proguard\
/Users/dengwenhao/coding/learn/city_pickers/example/build/app/intermediates/proguard-rules/release/aapt_rules.txt
--custom-package\
com.example.citypickersexample\
-0\
apk\
--output-text-symbols\
/Users/dengwenhao/coding/learn/city_pickers/example/build/app/intermediates/symbols/release/R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 35s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 37.1s
AndroidX incompatibilities may have caused this build to fail. Please migrate your app to
AndroidX. See https://goo.gl/CP92wY.
Gradle task assembleRelease failed with exit code 1
When the AndroidX used, it is also failed
传递自己数据会报错 The getter child wa called on null
修改省的时候,在刷新市之前先修改市可以把当前未刷新的市列表保留下来.
同理,修改市也可以趁区为改变前先改变区.这样可以得到一个错误的省份对的错误的市对的错误的区
虽然保存后是正确的,但是刷新间隔确实是个问题
版本:0.1.8
重现:
Result result = await CityPickers.showCityPicker(
height: 300,
locationCode: '429021', // 湖北-神农架林区
context: context,
);
https://github.com/hanxu317317/city_pickers/blob/master/lib/src/base/base.dart#L120
这一行,_city.child.first 会抛出一个错误,因为此时的_city.child可能为空List,我看到下面的代码你有验证isEmpty,这里不知道是不是疏忽了
选择完香港地区后,再带locationCode进入选择时,会有问题.
province.dart 中,provincesData有香港代码810000,而citiesData中,没有810000对应的数据,只有810100的数据。(澳台数据正常)
也就是按普通地区格式数据来说,有省数据,没有省对应的市,只有市对应的区。
具体:我有A、B两个Tab页面,而且他们都需要这个选择器,但是选择内容却不同。当我在A页面打开这个选择器后,再在B页面打开就会出现选择内容和A是一样的,这是个奇怪的现象。当我把选择内容前面的code更改后就没问题了,但我觉得这样好像不是很合理,希望大佬关注下!
自己根据接口返回的省市区,按照例子中的省份和城市map结构 重新组装了传入,结果报异常
flutter: Exception details:
初始化地理位置信息失败, 请检查省分城市数据
type List is not a subtype of type List
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following NoSuchMethodError was thrown building InheritRouteWidget:
flutter: The getter 'code' was called on null.
有没有提供 给一个areaId 返回具体的中文地址的方法呀,后台返回的不是中文,而是最后选择的id
如题
Building AOT snapshot in release mode (ios-release)...
Building App.framework for arm64...
Building App.framework for armv7...
Building AOT snapshot in release mode (ios-release)... 71.4s
Built to build/aot/.
warning: parsing line table prologue at offset 0x6f697463 found unsupported version 0x00
warning: line table parameters mismatch. Cannot emit.
{provinceName: 广东省, provinceId: 440000, cityName: 深圳市, cityId: 440300, areaName: 荔湾区, areaId: 440103}
如果省市数据源是自定义的,但是在CityTree里仍然是用的自带数据源provincesData,如果id不匹配就会报错,报错代码行,
PinyinHelper.getFirstWordPinyin(name).substring(0, 1);
所以能否在CityTree里也传入自定义的身份数据源?
现在的版本0.1.19 还不能自定义滚轮文字的字体大小和颜色 是吗
如题
您好,在没有操作选择器前,有什么办法能拿到城市数据吗?
作者大佬什么时候能更新一下数据源呢,很多区都没有的
现在三级联动似乎只能强制选择到地区,是否有考虑允许用户可以只选择到 省 或者 市,还是希望开发者自己编辑省市数据来实现呢?
如题
有很多朋友私信或者邮件我. 希望我能加上四级联动甚至到乡镇一级. 这个需求在实际生产环境中. 需求量高么? 希望知道的朋友留下您的建议.
在CityTree中的_getProvinceByCode方法中 不应该使用citiesData常量 应该使用CityTree初始化时候的metaInfo,不然搜索的还是原来的cityCode而不是用户设置的数据
最新的0.1.22是显示不出数据的!
怎么设置字体大小呢,怎么设置都不管用
hello,How to insert a city!
I want to insert a city,but I don't know how to do!
example:“安道尔”
字体大小是不是可以自己调整,现在的字体有点大,有的显示不全。
FAILURE: Build failed with an exception.
java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
/Users/jishukaifa/svn/Buybit_flutter_coin_trade/buybit_app/build/compressimage/intermediates/res/merged/release/values/values.xml:236: error: resource android:attr/fontVariationSettings not found.
/Users/jishukaifa/svn/Buybit_flutter_coin_trade/buybit_app/build/compressimage/intermediates/res/merged/release/values/values.xml:237: error: resource android:attr/ttcIndex not found.
error: failed linking references.
升级到最新版,flutter SDK版本是1.12
Flutter version 1.11.0 不适应这个版本
您好,我在运行flutter build apk时,报了如下错误
FAILURE: Build failed with an exception.
Failed to find Platform SDK with path: platforms;android-27
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Please review your Gradle project setup in the android/ folder.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.