File tree Expand file tree Collapse file tree 2 files changed +57
-1
lines changed Expand file tree Collapse file tree 2 files changed +57
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ import 'package:easy_market/utils/cache.dart';
13
13
import 'package:easy_market/page/index.dart' ;
14
14
15
15
void main () async {
16
+ // * https: //stackoverflow.com/questions/57689492/flutter-unhandled-exception-servicesbinding-defaultbinarymessenger-was-accesse
17
+ // 异步获取SpUtil时,版本升级会有问题WidgetsFlutterBinding.ensureInitialized();
18
+ WidgetsFlutterBinding .ensureInitialized ();
16
19
var sq = await SpUtil .getInstance ();
17
20
var token = sq.getString ('token' );
18
21
var userName = sq.getString ('userName' );
Original file line number Diff line number Diff line change @@ -68,7 +68,8 @@ class _GoodsDetail extends State<GoodsDetail> {
68
68
@override
69
69
Widget build (BuildContext context) {
70
70
return new Scaffold (
71
- appBar: buildAppBar ('母亲节礼物-舒适安睡组合' ),
71
+ appBar: buildAppBar (
72
+ initLoading ? 'loading...' : '${goodsMsgs ["info" ]['name' ]}' ),
72
73
body: Column (
73
74
children: < Widget > [
74
75
Expanded (
@@ -301,6 +302,9 @@ class _GoodsDetail extends State<GoodsDetail> {
301
302
buildOneWidget (
302
303
buildGoodsMsg (context),
303
304
),
305
+ buildOneWidget (
306
+ buildSize (context),
307
+ ),
304
308
],
305
309
);
306
310
}
@@ -450,4 +454,53 @@ class _GoodsDetail extends State<GoodsDetail> {
450
454
),
451
455
);
452
456
}
457
+
458
+ // 选择规格
459
+ Widget buildSize (BuildContext context) {
460
+ return Container (
461
+ height: Rem .getPxToRem (100 ),
462
+ decoration: BoxDecoration (
463
+ color: Colors .white,
464
+ border: Border (
465
+ top: BorderSide (
466
+ color: Colors .grey,
467
+ width: .5 ,
468
+ ),
469
+ ),
470
+ ),
471
+ child: Row (
472
+ children: < Widget > [
473
+ Padding (
474
+ padding: EdgeInsets .all (5 ),
475
+ child: Text (
476
+ '已选' ,
477
+ style: TextStyle (color: Colors .grey),
478
+ ),
479
+ ),
480
+ Expanded (
481
+ child: Padding (
482
+ padding: EdgeInsets .all (5 ),
483
+ child: Row (
484
+ children: < Widget > [
485
+ Expanded (
486
+ child: Text (
487
+ '1.5m床垫*1+枕头*2、浅杏粉1.5m' ,
488
+ overflow: TextOverflow .ellipsis,
489
+ ),
490
+ ),
491
+ Text ('x1' ),
492
+ ],
493
+ )),
494
+ ),
495
+ Padding (
496
+ padding: EdgeInsets .all (5 ),
497
+ child: Icon (
498
+ Icons .keyboard_arrow_right,
499
+ color: Colors .grey,
500
+ ),
501
+ ),
502
+ ],
503
+ ),
504
+ );
505
+ }
453
506
}
You can’t perform that action at this time.
0 commit comments