Fakultas Ilmu Komputer UI

exploreBusiness.dart 32.8 KB
Newer Older
1
2
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
3
4
import 'package:google_fonts/google_fonts.dart';
import 'package:flutter_svg/flutter_svg.dart';
5
import 'package:percent_indicator/percent_indicator.dart';
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
6
7
8
9
import '../../api/api.dart';
import 'EquityOfferings.dart';
import 'Ukm.dart';
import 'homekyc.dart';
10
11
12
13
14
15
16

class ExploreBusiness extends StatefulWidget {
  @override
  _ExploreBusinessState createState() => _ExploreBusinessState();
}

class _ExploreBusinessState extends State<ExploreBusiness> {
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
17
18
19
20
21
  Future<EquityOfferings> futureEquities;

  void setUnfilteredUkmList() async {
    futureEquities = Api().getEquities();
  }
22
23
24
25
26

  @override
  void initState() {
    super.initState();
    setState(() {
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
27
      setUnfilteredUkmList();
28
29
30
    });
  }

Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
31
32
33
  Widget buildUkmCard(BuildContext context,
      AsyncSnapshot<EquityOfferings> snapshot, int index) {
    List<Ukm> ukmLists = snapshot.data.getUkmList();
34
35
36
    return new Container(
      height: 400,
      margin: EdgeInsets.fromLTRB(16, 8, 16, 8),
37
      child: GestureDetector(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
38
        onTap: () {},
39
        child: Card(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
40
          key: Key('ukmCard: ' + ukmLists[index].equityName),
41
42
43
44
45
46
          child: Column(
            children: [
              Expanded(
                flex: 7,
                child: Container(
                  key: Key('containerForWholeCarousel'),
47
48
                  decoration: BoxDecoration(
                    borderRadius: BorderRadius.only(
49
50
51
52
                      topLeft: Radius.circular(8.0),
                      topRight: Radius.circular(8.0),
                    ),
                    image: DecorationImage(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
53
                      image: NetworkImage(ukmLists[index].bannerImg),
54
                      fit: BoxFit.cover,
55
                    ),
56
                  ),
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
                ),
              ),
              Expanded(
                flex: 10,
                child: Container(
                    key: Key('containerForWholeCarouselInformation'),
                    decoration: BoxDecoration(
                      color: Colors.white,
                      borderRadius: BorderRadius.only(
                        bottomLeft: Radius.circular(8.0),
                        bottomRight: Radius.circular(8.0),
                      ),
                      boxShadow: [
                        BoxShadow(
                          color: Colors.grey.withOpacity(0.5),
                          spreadRadius: 0,
                          blurRadius: 8,
                          offset: Offset(0, 0), // changes position of shadow
                        ),
                      ],
                    ),
                    alignment: Alignment.center,
                    child: Column(
                      key: Key('columnForUKMInformation'),
                      children: <Widget>[
                        Expanded(
                          flex: 2,
                          child: Container(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
85
                            margin: EdgeInsets.fromLTRB(8, 8, 8, 0),
86
                            child: Row(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
87
                              crossAxisAlignment: CrossAxisAlignment.center,
88
89
90
91
                              key: Key('rowInfoHeader'),
                              children: <Widget>[
                                Expanded(
                                  flex: 2,
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
92
93
                                  child: Image.network(
                                    ukmLists[index].logoUrl,
94
95
96
97
98
99
100
101
102
103
104
105
106
                                    key: Key('ukmLogo'),
                                  ),
                                ),
                                Expanded(
                                  flex: 8,
                                  child: Column(
                                      key: Key('companyColumn'),
                                      mainAxisAlignment:
                                          MainAxisAlignment.start,
                                      crossAxisAlignment:
                                          CrossAxisAlignment.start,
                                      children: <Widget>[
                                        Text(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
107
                                          ukmLists[index].equityName,
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
                                          key: Key('ukmName'),
                                          style: GoogleFonts.inter(
                                            color:
                                                Color.fromRGBO(74, 74, 74, 1.0),
                                            fontSize: 16.0,
                                            fontWeight: FontWeight.w500,
                                          ),
                                        ),
                                      ]),
                                ),
                              ],
                            ),
                          ),
                        ),
                        Expanded(
                          flex: 4,
124
                          child: Row(
125
126
                            key: Key('ukmInfoRow'),
                            // mainAxisAlignment: MainAxisAlignment.center,
127
128
                            children: <Widget>[
                              Expanded(
129
130
                                flex: 1,
                                child: Container(),
131
132
                              ),
                              Expanded(
133
                                flex: 2,
134
                                child: Column(
135
                                    key: Key('ukmInfoLeftColumn'),
136
137
138
139
140
                                    mainAxisAlignment: MainAxisAlignment.start,
                                    crossAxisAlignment:
                                        CrossAxisAlignment.start,
                                    children: <Widget>[
                                      Text(
141
142
143
                                        'Target Pendanaan',
                                        key: Key('fundTargetString'),
                                        style: GoogleFonts.notoSans(
144
                                          color:
145
146
                                              Color.fromRGBO(51, 51, 51, 1.0),
                                          fontSize: 10.0,
147
148
149
150
                                          fontWeight: FontWeight.w500,
                                        ),
                                      ),
                                      SizedBox(
151
152
                                        key: Key(
                                            'spaceBetweenFundTargetStringAndValue'),
153
154
155
                                        height: 4.0,
                                      ),
                                      Text(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
156
                                        ukmLists[index].beautifyFundTarget,
157
                                        key: Key('fundTargetValue'),
158
                                        style: GoogleFonts.roboto(
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
                                          color:
                                              Color.fromRGBO(47, 47, 47, 1.0),
                                          fontSize: 12.0,
                                          fontWeight: FontWeight.w500,
                                        ),
                                      ),
                                      SizedBox(
                                        key: Key(
                                            'spaceBetweenFundTargetValueAndMinInvestString'),
                                        height: 8.0,
                                      ),
                                      Text(
                                        'Min. Investasi',
                                        key: Key('minInvestString'),
                                        style: GoogleFonts.notoSans(
174
175
                                          color:
                                              Color.fromRGBO(51, 51, 51, 1.0),
176
177
178
179
180
181
182
183
184
185
                                          fontSize: 10.0,
                                          fontWeight: FontWeight.w500,
                                        ),
                                      ),
                                      SizedBox(
                                        key: Key(
                                            'spaceBetweenMinInvestStringAndValue'),
                                        height: 4.0,
                                      ),
                                      Text(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
186
                                        ukmLists[index].beautifyMinInvest,
187
188
189
190
                                        key: Key('minInvestValue'),
                                        style: GoogleFonts.roboto(
                                          color:
                                              Color.fromRGBO(47, 47, 47, 1.0),
191
                                          fontSize: 12.0,
192
                                          fontWeight: FontWeight.w500,
193
194
195
196
                                        ),
                                      ),
                                    ]),
                              ),
197
198
199
200
201
202
203
204
                              Expanded(
                                flex: 1,
                                child: Container(),
                              ),
                              Expanded(
                                flex: 2,
                                child: Column(
                                  key: Key('ukmInfoRightColumn'),
205
206
207
208
                                  mainAxisAlignment: MainAxisAlignment.start,
                                  crossAxisAlignment: CrossAxisAlignment.start,
                                  children: <Widget>[
                                    Text(
209
210
                                      'Harga Satuan',
                                      key: Key('unitPriceString'),
211
212
213
214
215
216
217
218
                                      style: GoogleFonts.notoSans(
                                        color: Color.fromRGBO(51, 51, 51, 1.0),
                                        fontSize: 10.0,
                                        fontWeight: FontWeight.w500,
                                      ),
                                    ),
                                    SizedBox(
                                      key: Key(
219
                                          'spaceBetweenUnitPriceStringAndValue'),
220
221
222
                                      height: 4.0,
                                    ),
                                    Text(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
223
                                      ukmLists[index].beautifyPrice,
224
                                      key: Key('unitPriceValue'),
225
226
227
228
229
230
231
232
                                      style: GoogleFonts.roboto(
                                        color: Color.fromRGBO(47, 47, 47, 1.0),
                                        fontSize: 12.0,
                                        fontWeight: FontWeight.w500,
                                      ),
                                    ),
                                    SizedBox(
                                      key: Key(
233
                                          'spaceBetweenUnitPriceValueAndRemainingTimeString'),
234
235
236
                                      height: 8.0,
                                    ),
                                    Text(
237
238
                                      'Waktu Tersisa',
                                      key: Key('remainingTimeString'),
239
240
241
242
243
244
245
246
                                      style: GoogleFonts.notoSans(
                                        color: Color.fromRGBO(51, 51, 51, 1.0),
                                        fontSize: 10.0,
                                        fontWeight: FontWeight.w500,
                                      ),
                                    ),
                                    SizedBox(
                                      key: Key(
247
                                          'spaceBetweenRemainingTimeStringAndValue'),
248
249
250
                                      height: 4.0,
                                    ),
                                    Text(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
251
                                      ukmLists[index].beautifyTime,
252
                                      key: Key('remainingTimeValue'),
253
                                      style: GoogleFonts.roboto(
254
                                        color: Color.fromRGBO(217, 52, 52, 1.0),
255
256
257
258
                                        fontSize: 12.0,
                                        fontWeight: FontWeight.w500,
                                      ),
                                    ),
259
260
                                  ],
                                ),
261
                              ),
262
263
264
265
266
267
                              Expanded(
                                flex: 1,
                                child: Container(),
                              ),
                            ],
                          ),
268
                        ),
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
                        Expanded(
                          flex: 3,
                          child: Column(
                            key: Key('fundProgressColumn'),
                            crossAxisAlignment: CrossAxisAlignment.center,
                            children: <Widget>[
                              Container(
                                child: RichText(
                                    key: Key('fundprogressString'),
                                    text: TextSpan(
                                        text: 'Telah terkumpul ',
                                        style: GoogleFonts.notoSans(
                                          color:
                                              Color.fromRGBO(51, 51, 51, 1.0),
                                          fontSize: 10.0,
                                          fontWeight: FontWeight.w500,
285
                                        ),
286
287
                                        children: <TextSpan>[
                                          TextSpan(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
288
289
                                            text: ukmLists[index]
                                                    .beautifyProgress +
290
291
292
293
294
295
296
                                                '% dana ',
                                            style: GoogleFonts.notoSans(
                                              color: Color.fromRGBO(
                                                  47, 47, 47, 1.0),
                                              fontSize: 10.0,
                                              fontWeight: FontWeight.bold,
                                            ),
297
                                          ),
298
299
300
301
302
303
304
305
                                          TextSpan(
                                            text: 'dari ',
                                            style: GoogleFonts.notoSans(
                                              color: Color.fromRGBO(
                                                  51, 51, 51, 1.0),
                                              fontSize: 10.0,
                                              fontWeight: FontWeight.w500,
                                            ),
306
                                          ),
307
                                          TextSpan(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
308
309
310
                                            text: ukmLists[index]
                                                    .totalInvestor
                                                    .toString() +
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
                                                ' investor.',
                                            style: GoogleFonts.notoSans(
                                              color: Color.fromRGBO(
                                                  47, 47, 47, 1.0),
                                              fontSize: 10.0,
                                              fontWeight: FontWeight.bold,
                                            ),
                                          ),
                                        ])),
                              ),
                              Container(
                                  margin: EdgeInsets.only(top: 4.0),
                                  width: double.infinity,
                                  padding:
                                      EdgeInsets.symmetric(horizontal: 24.0),
                                  child: LinearPercentIndicator(
                                    key: Key('fundprogressBar'),
                                    progressColor:
                                        Color.fromRGBO(14, 39, 115, 1.0),
                                    backgroundColor:
                                        Color.fromRGBO(223, 223, 223, 1.0),
                                    lineHeight: 24.0,
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
333
334
335
                                    percent:
                                        double.parse(ukmLists[index].progress) /
                                            100,
336
337
338
                                  )),
                            ],
                          ),
339
                        ),
340
341
342
343
344
                      ],
                    )),
              ),
            ],
          ),
345
346
347
348
349
        ),
      ),
    );
  }

350
  Widget build(BuildContext context) {
351
352
    return Scaffold(
      backgroundColor: Colors.white,
353
      floatingActionButton: FloatingActionButton(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
354
          key: Key('floatingActionButton'), onPressed: () {}),
355
356
357
358
359
360
361
362
363
364
365
366
367
      appBar: AppBar(
        backgroundColor: Colors.white,
        title: Row(
          mainAxisAlignment: MainAxisAlignment.start,
          children: <Widget>[
            IconButton(
                icon: Icon(
                  Icons.arrow_back,
                  key: Key('backIcon'),
                  color: Color.fromRGBO(18, 40, 75, 1.0),
                ),
                onPressed: () {
                  Navigator.push(context, MaterialPageRoute(builder: (context) {
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
368
                    return MaterialApp(home: HomeKYC());
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
                  }));
                }),
            Text(
              'Daftar Penawaran',
              key: Key('stringTitle'),
              style: GoogleFonts.inter(
                  color: Color.fromRGBO(18, 40, 75, 1.0),
                  fontWeight: FontWeight.bold,
                  fontSize: 14.0),
            ),
          ],
        ),
      ),
      body: SafeArea(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: [
            Container(
              alignment: Alignment.center,
              margin: EdgeInsets.all(16),
              child: Container(
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(8.0),
                  border: Border.all(
                    color: Color.fromRGBO(205, 205, 205, 1.0),
                    style: BorderStyle.solid,
                  ),
                ),
                child: DropdownButtonHideUnderline(
                  child: DropdownButton<String>(
                    key: Key('jenisPenawaranDropDownButton'),
                    hint: Container(
                      margin: EdgeInsets.fromLTRB(16, 0, 0, 0),
                      child: Text(
                        'Jenis Penawaran',
                        style: GoogleFonts.notoSans(
                          color: Color.fromRGBO(51, 51, 51, 1.0),
                          fontSize: 12.0,
                          fontWeight: FontWeight.w500,
                        ),
                      ),
                    ),
                    isExpanded: true,
                    items: <String>[
                      'Mutual Fund > 5 Years',
                      'Health Tech',
                      'Entertainment',
                      'Edu Tech',
                      'Agro Tech',
                      'Securities Companies',
                      'Pension Fund',
                      'Mutual Fund',
                      'Insurance',
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
423
424
425
                      'Financial Institution',
                      'Foundation',
                      'Corporate'
426
427
428
429
430
431
432
433
434
435
436
437
438
439
                    ].map((String value) {
                      return new DropdownMenuItem<String>(
                        key: Key('jenisPenawaranDropDownMenuItem'),
                        value: value,
                        child: new Text(
                          value,
                          style: GoogleFonts.notoSans(
                            color: Color.fromRGBO(51, 51, 51, 1.0),
                            fontSize: 12.0,
                            fontWeight: FontWeight.w500,
                          ),
                        ),
                      );
                    }).toList(),
440
441
                    onChanged: (value) {
                      setState(() {
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
                        switch (value) {
                          case 'Mutual Fund > 5 Years':
                            futureEquities =
                                Api().getSortedEquities('', '13', '');
                            break;
                          case 'Health Tech':
                            futureEquities =
                                Api().getSortedEquities('', '12', '');
                            break;
                          case 'Entertainment':
                            futureEquities =
                                Api().getSortedEquities('', '11', '');
                            break;
                          case 'Edu Tech':
                            futureEquities =
                                Api().getSortedEquities('', '10', '');
                            break;
                          case 'Agro Tech':
                            futureEquities =
                                Api().getSortedEquities('', '9', '');
                            break;
                          case 'Securities Companies':
                            futureEquities =
                                Api().getSortedEquities('', '8', '');
                            break;
                          case 'Pension Fund':
                            futureEquities =
                                Api().getSortedEquities('', '7', '');
                            break;
                          case 'Mutual Fund':
                            futureEquities =
                                Api().getSortedEquities('', '6', '');
                            break;
                          case 'Insurance':
                            futureEquities =
                                Api().getSortedEquities('', '5', '');
                            break;
                          case 'Financial Institution':
                            futureEquities =
                                Api().getSortedEquities('', '4', '');
                            break;
                          case 'Foundation':
                            futureEquities =
                                Api().getSortedEquities('', '3', '');
                            break;
                          case 'Corporate':
                            futureEquities =
                                Api().getSortedEquities('', '2', '');
                            break;
                        }
492
493
                      });
                    },
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
                  ),
                ),
              ),
            ),
            Container(
              alignment: Alignment.center,
              margin: EdgeInsets.fromLTRB(16, 0, 16, 16),
              child: Row(
                children: [
                  Expanded(
                    flex: 4,
                    child: Container(
                      decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(8.0),
                        border: Border.all(
                          color: Color.fromRGBO(205, 205, 205, 1.0),
                          style: BorderStyle.solid,
                        ),
                      ),
                      child: DropdownButtonHideUnderline(
                        child: DropdownButton<String>(
                          key: Key('progressDropDownButton'),
                          hint: Container(
                            margin: EdgeInsets.all(16.0),
                            child: Text(
                              'Progress',
                              style: GoogleFonts.notoSans(
                                color: Color.fromRGBO(51, 51, 51, 1.0),
                                fontSize: 12.0,
                                fontWeight: FontWeight.w500,
                              ),
                            ),
                          ),
                          items: <String>[
                            'Akan Ditawarkan',
                            'Masa Penawaran',
                            'Sudah Terdanai'
                          ].map((String value) {
                            return new DropdownMenuItem<String>(
                              key: Key('progressDropDownMenuItem'),
                              value: value,
                              child: new Text(
                                value,
                                style: GoogleFonts.notoSans(
                                  color: Color.fromRGBO(51, 51, 51, 1.0),
                                  fontSize: 12.0,
                                  fontWeight: FontWeight.w500,
                                ),
                              ),
                            );
                          }).toList(),
545
546
                          onChanged: (value) {
                            setState(() {
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
547
548
549
550
551
552
553
554
555
556
557
558
559
560
                              switch (value) {
                                case 'Akan Ditawarkan':
                                  futureEquities =
                                      Api().getSortedEquities('4', '', '');
                                  break;
                                case 'Masa Penawaran':
                                  futureEquities =
                                      Api().getSortedEquities('5', '', '');
                                  break;
                                case 'Sudah Terdanai':
                                  futureEquities =
                                      Api().getSortedEquities('6', '', '');
                                  break;
                              }
561
562
                            });
                          },
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
                        ),
                      ),
                    ),
                  ),
                  Expanded(flex: 1, child: Container()),
                  Expanded(
                    flex: 4,
                    child: Container(
                      decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(8.0),
                        border: Border.all(
                          color: Color.fromRGBO(205, 205, 205, 1.0),
                          style: BorderStyle.solid,
                        ),
                      ),
                      child: DropdownButtonHideUnderline(
                        child: DropdownButton<String>(
                          key: Key('urutkanDropDownButton'),
                          hint: Container(
                            margin: EdgeInsets.all(16.0),
                            child: Text(
                              'Urutkan',
                              style: GoogleFonts.notoSans(
                                color: Color.fromRGBO(51, 51, 51, 1.0),
                                fontSize: 12.0,
                                fontWeight: FontWeight.w500,
                              ),
                            ),
                          ),
                          items: <String>[
                            'Terbanyak didanai',
                            'Baru ditawarkan',
                            'Hampir selesai'
                          ].map((String value) {
                            return new DropdownMenuItem<String>(
                              key: Key('urutkanDropDownMenuItem'),
                              value: value,
                              child: new Text(
                                value,
                                style: GoogleFonts.notoSans(
                                  color: Color.fromRGBO(51, 51, 51, 1.0),
                                  fontSize: 12.0,
                                  fontWeight: FontWeight.w500,
                                ),
                              ),
                            );
                          }).toList(),
610
611
                          onChanged: (value) {
                            setState(() {
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
612
613
614
615
616
617
618
619
620
621
622
623
624
                              switch (value) {
                                case 'Terbanyak didanai':
                                  futureEquities = Api().getSortedEquities(
                                      '', '', 'most_funding');
                                  break;
                                case 'Baru ditawarkan':
                                  futureEquities = Api().getSortedEquities(
                                      '', '', 'recently_launched');
                                  break;
                                case 'Hampir selesai':
                                  futureEquities = Api().getSortedEquities(
                                      '', '', 'closing_soon');
                                  break;
625
626
627
                              }
                            });
                          },
628
629
630
631
632
633
634
635
636
                        ),
                      ),
                    ),
                  ),
                ],
              ),
            ),
            TextButton(
              key: Key('clearFilterTextButton'),
637
638
              onPressed: () {
                setState(() {
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
639
                  setUnfilteredUkmList();
640
641
                });
              },
642
643
644
645
646
647
648
649
650
              child: Text(
                'Clear Filter',
                key: Key('stringLihatSemua'),
                style: GoogleFonts.inter(
                  color: Color.fromRGBO(189, 189, 189, 1.0),
                  fontSize: 12.0,
                ),
              ),
            ),
651
            Expanded(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
              child: FutureBuilder<EquityOfferings>(
                  future: futureEquities,
                  builder: (context, snapshot) {
                    if (snapshot.hasData) {
                      return SingleChildScrollView(
                        scrollDirection: Axis.vertical,
                        child: new ListView.builder(
                            shrinkWrap: true,
                            physics: ClampingScrollPhysics(),
                            itemCount: snapshot.data.getUkmList().length,
                            itemBuilder: (context, index) {
                              return buildUkmCard(context, snapshot, index);
                            }),
                      );
                      // SingleChildScrollView(
                      //     scrollDirection: Axis.vertical,
                      //     child: buildUkmCard(context, snapshot));
                    } else if (snapshot.hasError) {
                      print('${snapshot.error}');
                      return Container(child: Text('${snapshot.error}'));
                    } else {
                      return Container(
                        width: 0,
                        height: 0,
                      );
                    }
                  }),
679
            )
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
          ],
        ),
      ),
      bottomNavigationBar: BottomNavigationBar(
        key: Key('bottomNavigationBar'),
        backgroundColor: Colors.white,
        selectedLabelStyle: GoogleFonts.inter(
          fontWeight: FontWeight.bold,
          fontSize: 12.0,
          color: Color.fromRGBO(18, 40, 75, 1.0),
        ),
        unselectedLabelStyle: GoogleFonts.inter(
          fontWeight: FontWeight.bold,
          fontSize: 12.0,
          color: Color.fromRGBO(196, 196, 196, 1.0),
        ),
        selectedItemColor: Color.fromRGBO(18, 40, 75, 1.0),
        unselectedItemColor: Color.fromRGBO(196, 196, 196, 1.0),
        type: BottomNavigationBarType.fixed,
        items: [
          BottomNavigationBarItem(
            icon: Padding(
              padding: const EdgeInsets.all(4.0),
              child: SvgPicture.asset(
                'assets/icons/selectedHomeIcon.svg',
                key: Key('homeIcon'),
              ),
            ),
            label: 'Beranda',
          ),
          BottomNavigationBarItem(
            icon: Padding(
              padding: const EdgeInsets.all(4.0),
              child: SvgPicture.asset('assets/icons/unselectedPortfolio.svg',
                  key: Key('portfolioIcon')),
            ),
            label: 'Portfolio',
          ),
          BottomNavigationBarItem(
            icon: Padding(
              padding: const EdgeInsets.all(4.0),
              child: SvgPicture.asset('assets/icons/unselectedTransaction.svg',
                  key: Key('transactionIcon')),
            ),
            label: 'Transaksi',
          ),
          BottomNavigationBarItem(
            icon: Padding(
              padding: const EdgeInsets.all(4.0),
              child: SvgPicture.asset('assets/icons/unselectedHelp.svg',
                  key: Key('helpIcon')),
            ),
            label: 'Bantuan',
          ),
          BottomNavigationBarItem(
            icon: Padding(
              padding: const EdgeInsets.all(4.0),
              child: SvgPicture.asset('assets/icons/unselectedAccount.svg',
                  key: Key('accountIcon')),
            ),
            label: 'Akun',
          ),
        ],
      ),
    );
745
746
  }
}