Fakultas Ilmu Komputer UI

exploreBusiness.dart 32.7 KB
Newer Older
1
2
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
3
import 'package:fundex_app/main-screen.dart';
4
import 'package:fundex_app/pages/business/prospectus_page.dart';
5
6
import 'package:google_fonts/google_fonts.dart';
import 'package:flutter_svg/flutter_svg.dart';
7
import 'package:percent_indicator/percent_indicator.dart';
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
8
9
10
import '../../api/api.dart';
import 'EquityOfferings.dart';
import 'Ukm.dart';
11
12
13
14
15
16
17

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

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

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

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

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

349
  Widget build(BuildContext context) {
350
351
    return Scaffold(
      backgroundColor: Colors.white,
352
      floatingActionButton: FloatingActionButton(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
353
          key: Key('floatingActionButton'), onPressed: () {}),
354
355
356
357
358
359
360
361
362
363
364
365
366
      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) {
367
                    return MaterialApp(home: MainScreen());
368
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
                  }));
                }),
            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
422
423
424
                      'Financial Institution',
                      'Foundation',
                      'Corporate'
425
426
427
428
429
430
431
432
433
434
435
436
437
438
                    ].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(),
439
440
                    onChanged: (value) {
                      setState(() {
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
441
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
                        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;
                        }
491
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
                  ),
                ),
              ),
            ),
            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(),
544
545
                          onChanged: (value) {
                            setState(() {
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
546
547
548
549
550
551
552
553
554
555
556
557
558
559
                              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;
                              }
560
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
                        ),
                      ),
                    ),
                  ),
                  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(),
609
610
                          onChanged: (value) {
                            setState(() {
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
611
612
613
614
615
616
617
618
619
620
621
622
623
                              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;
624
625
626
                              }
                            });
                          },
627
628
629
630
631
632
633
634
635
                        ),
                      ),
                    ),
                  ),
                ],
              ),
            ),
            TextButton(
              key: Key('clearFilterTextButton'),
636
637
              onPressed: () {
                setState(() {
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
638
                  setUnfilteredUkmList();
639
640
                });
              },
641
642
643
644
645
646
647
648
649
              child: Text(
                'Clear Filter',
                key: Key('stringLihatSemua'),
                style: GoogleFonts.inter(
                  color: Color.fromRGBO(189, 189, 189, 1.0),
                  fontSize: 12.0,
                ),
              ),
            ),
650
            Expanded(
Habel Christiando Tobing's avatar
Habel Christiando Tobing committed
651
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
              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,
                      );
                    }
                  }),
678
            )
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
          ],
        ),
      ),
      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',
          ),
        ],
      ),
    );
744
745
  }
}