Commit e41de518ebdc527d098270ca79fcf5b7fde7f148

Authored by wdn127929
1 parent fe05e5a6

city_picker

@@ -26,6 +26,7 @@ import 'package:one_key/widgets/system_app_bar.dart'; @@ -26,6 +26,7 @@ import 'package:one_key/widgets/system_app_bar.dart';
26 import 'package:one_key/widgets/v_empty_view.dart'; 26 import 'package:one_key/widgets/v_empty_view.dart';
27 import 'package:provider/provider.dart'; 27 import 'package:provider/provider.dart';
28 import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; 28 import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart';
  29 +import 'package:city_pickers/city_pickers.dart';
29 30
30 class IfNeedCreateStore extends StatefulWidget { 31 class IfNeedCreateStore extends StatefulWidget {
31 final List<CheckSellerAccSunModel> data; 32 final List<CheckSellerAccSunModel> data;
@@ -191,34 +192,39 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> @@ -191,34 +192,39 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore>
191 _baseIndoProvider = Provider.of<BaseIndoProvider>(context, listen: true); 192 _baseIndoProvider = Provider.of<BaseIndoProvider>(context, listen: true);
192 return Scaffold( 193 return Scaffold(
193 backgroundColor: Colors.white, 194 backgroundColor: Colors.white,
194 - appBar: SystemAppBar(  
195 - '选择店铺',  
196 - // leftTitle: '上一步', 195 + appBar: SystemAppBar('选择店铺',
  196 + // leftTitle: '上一步',
  197 + rightImgName: 'add_check_store.png', onTapRight: () async {
  198 + Result result2 = await CityPickers.showCityPicker(
  199 + context: context,
  200 + );
  201 + print(result2);
  202 + }
197 203
198 - // rightImgName: 'add_check_store.png', onTapRight: () {  
199 - // if (otherLoginProvider.pageState != PageState.Success) {  
200 - // // if (!App.sp.containsKey('openid') ||  
201 - // // App.sp.get("openid") == null ||  
202 - // // App.sp.get("openid") == '') {  
203 - // //跳转小程序  
204 - // Utils.goMiniProgramCreatePage(context);  
205 - // // } else {  
206 - // // //跳转至新建店铺流程  
207 - // // NavigatorUtil.goEnterStoreNamePage(context);  
208 - // // }  
209 - // } else {  
210 - // // if (!App.sp.containsKey('openid') ||  
211 - // // App.sp.get("openid") == null ||  
212 - // // App.sp.get("openid") == '') {  
213 - // // //跳转小程序  
214 - // // Utils.goMiniProgramCreatePage(context);  
215 - // // } else {  
216 - // //跳转至新建店铺流程  
217 - // NavigatorUtil.goEnterStoreNamePage(context);  
218 - // // }  
219 - // }  
220 - // }  
221 - ), 204 + // rightImgName: 'add_check_store.png', onTapRight: () {
  205 + // if (otherLoginProvider.pageState != PageState.Success) {
  206 + // // if (!App.sp.containsKey('openid') ||
  207 + // // App.sp.get("openid") == null ||
  208 + // // App.sp.get("openid") == '') {
  209 + // //跳转小程序
  210 + // Utils.goMiniProgramCreatePage(context);
  211 + // // } else {
  212 + // // //跳转至新建店铺流程
  213 + // // NavigatorUtil.goEnterStoreNamePage(context);
  214 + // // }
  215 + // } else {
  216 + // // if (!App.sp.containsKey('openid') ||
  217 + // // App.sp.get("openid") == null ||
  218 + // // App.sp.get("openid") == '') {
  219 + // // //跳转小程序
  220 + // // Utils.goMiniProgramCreatePage(context);
  221 + // // } else {
  222 + // //跳转至新建店铺流程
  223 + // NavigatorUtil.goEnterStoreNamePage(context);
  224 + // // }
  225 + // }
  226 + // }
  227 + ),
222 body: Container( 228 body: Container(
223 // margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(40)), 229 // margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(40)),
224 padding: 230 padding:
@@ -239,6 +239,13 @@ packages: @@ -239,6 +239,13 @@ packages:
239 url: "https://pub.flutter-io.cn" 239 url: "https://pub.flutter-io.cn"
240 source: hosted 240 source: hosted
241 version: "1.3.5" 241 version: "1.3.5"
  242 + city_pickers:
  243 + dependency: "direct main"
  244 + description:
  245 + name: city_pickers
  246 + url: "https://pub.flutter-io.cn"
  247 + source: hosted
  248 + version: "1.1.3"
242 clock: 249 clock:
243 dependency: transitive 250 dependency: transitive
244 description: 251 description:
@@ -214,6 +214,8 @@ dependencies: @@ -214,6 +214,8 @@ dependencies:
214 214
215 #视频播放 215 #视频播放
216 fijkplayer: ^0.11.0 216 fijkplayer: ^0.11.0
  217 +
  218 + city_pickers: ^1.1.3
217 219
218 220
219 221