decorate input tukaran page

This commit is contained in:
kicap
2023-08-18 02:07:04 +08:00
parent 3b437c4f82
commit 7a66245b7e
7 changed files with 262 additions and 151 deletions

View File

@ -1,10 +1,10 @@
import 'package:curreny_exchange/app/app.router.dart';
import 'package:flutter/material.dart';
import 'package:stacked/stacked.dart';
import 'package:stacked_services/stacked_services.dart';
import 'package:stylish_bottom_bar/model/bar_items.dart';
import 'package:stylish_bottom_bar/stylish_bottom_bar.dart';
import '../../../app/app.router.dart';
import '../../../app/themes/app_colors.dart';
import '../../../app/themes/app_text.dart';
import './app_index_tracking_view_model.dart';

View File

@ -62,169 +62,278 @@ class TheDataWidget extends ViewModelWidget<CustomCurrencyViewModel> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
RichText(
text: TextSpan(
text: 'Terakhir diperbarui : ',
style: regularTextStyle,
children: [
TextSpan(
text: viewModel.otherFunction.timeStampConverter(
viewModel.conversionResultModel!.timeLastUpdateUnix!),
style: boldTextStyle.copyWith(
color: greenColor,
),
),
],
),
),
const SizedBox(
height: 10,
),
RichText(
text: TextSpan(
text: 'Update berikutnya : ',
style: regularTextStyle,
children: [
TextSpan(
text: viewModel.otherFunction.timeStampConverter(
viewModel.conversionResultModel!.timeNextUpdateUnix!),
style: boldTextStyle.copyWith(
color: mainColor,
),
),
],
),
),
const SizedBox(
height: 10,
height: 15,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
const Text('Mata Uang : ', style: regularTextStyle),
const SizedBox(
width: 3,
),
Image.asset(
'assets/flags/${viewModel.currencyInfoModel!.alphabeticCode!.toLowerCase()}.png',
width: 30,
height: 30,
),
const SizedBox(
width: 5,
),
Text(
viewModel.currencyInfoModel!.entity!,
style: boldTextStyle.copyWith(
color: redColor,
Container(
width: 100,
height: 100,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
border: Border.all(
color: Colors.grey,
width: 2,
),
boxShadow: const [
BoxShadow(
color: Colors.grey,
spreadRadius: 2,
blurRadius: 5,
offset: Offset(0, 3), // changes position of shadow
),
],
),
child: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: Image.asset(
'assets/flags/${viewModel.currencyInfoModel!.alphabeticCode!.toLowerCase()}.png',
width: 100,
height: 100,
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) {
return const Icon(Icons.error);
},
),
),
),
const SizedBox(
width: 3,
width: 10,
),
Text(
'( ${viewModel.currencyInfoModel!.alphabeticCode} )',
style: italicTextStyle.copyWith(
color: redColor,
const Icon(
Icons.arrow_forward,
size: 30,
),
const SizedBox(
width: 10,
),
Container(
width: 100,
height: 100,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
border: Border.all(
color: Colors.grey,
width: 2,
),
boxShadow: const [
BoxShadow(
color: Colors.grey,
spreadRadius: 2,
blurRadius: 5,
offset: Offset(0, 3), // changes position of shadow
),
],
),
child: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: Image.asset(
'assets/flags/${viewModel.konversiInfoModel!.alphabeticCode!.toLowerCase()}.png',
width: 100,
height: 100,
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) {
return const Icon(Icons.error);
},
),
),
),
],
),
const SizedBox(
height: 10,
height: 20,
),
RichText(
text: TextSpan(
text: 'Jumlah Tukaran : ',
style: regularTextStyle,
children: [
TextSpan(
text:
'${viewModel.currencyInfoModel!.alphabeticCode} ${viewModel.otherFunction.commaFormat(int.parse(viewModel.nilaiTukaran!))}',
style: boldTextStyle.copyWith(
color: redColor,
Card(
elevation: 5,
child: Padding(
padding: const EdgeInsets.all(10),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
RichText(
text: TextSpan(
text: 'Terakhir diperbarui : ',
style: regularTextStyle,
children: [
TextSpan(
text: viewModel.otherFunction.timeStampConverter(
viewModel
.conversionResultModel!.timeLastUpdateUnix!),
style: boldTextStyle.copyWith(
color: greenColor,
fontSize: 12,
),
),
],
),
),
),
],
const SizedBox(
height: 15,
),
RichText(
text: TextSpan(
text: 'Update berikutnya : ',
style: regularTextStyle,
children: [
TextSpan(
text: viewModel.otherFunction.timeStampConverter(
viewModel
.conversionResultModel!.timeNextUpdateUnix!),
style: boldTextStyle.copyWith(
color: mainColor,
fontSize: 12,
),
),
],
),
),
const SizedBox(
height: 15,
),
Row(
children: [
const Text('Mata Uang : ', style: regularTextStyle),
const SizedBox(
width: 3,
),
Image.asset(
'assets/flags/${viewModel.currencyInfoModel!.alphabeticCode!.toLowerCase()}.png',
width: 30,
height: 30,
),
const SizedBox(
width: 5,
),
Text(
viewModel.currencyInfoModel!.entity!,
style: boldTextStyle.copyWith(
color: redColor,
),
),
const SizedBox(
width: 3,
),
Text(
'( ${viewModel.currencyInfoModel!.alphabeticCode} )',
style: italicTextStyle.copyWith(
color: redColor,
),
),
],
),
const SizedBox(
height: 15,
),
RichText(
text: TextSpan(
text: 'Jumlah Tukaran : ',
style: regularTextStyle,
children: [
TextSpan(
text:
'${viewModel.currencyInfoModel!.alphabeticCode} ${viewModel.otherFunction.commaFormat(int.parse(viewModel.nilaiTukaran!))}',
style: boldTextStyle.copyWith(
color: redColor,
),
),
],
),
),
const SizedBox(
height: 15,
),
RichText(
text: TextSpan(
text: 'Konversi Tukaran : ',
style: regularTextStyle,
children: [
TextSpan(
text:
'1 ${viewModel.currencyInfoModel!.alphabeticCode}',
style: boldTextStyle.copyWith(
color: redColor,
),
),
const TextSpan(
text: ' = ',
style: regularTextStyle,
),
TextSpan(
text:
'${viewModel.conversionResultModel!.conversionRate} ${viewModel.konversiInfoModel!.alphabeticCode}',
style: boldTextStyle.copyWith(
color: orangeColor,
),
),
],
),
),
const SizedBox(
height: 15,
),
Row(
children: [
const Text('Uang Konversi: ', style: regularTextStyle),
const SizedBox(
width: 3,
),
Image.asset(
'assets/flags/${viewModel.konversiInfoModel!.alphabeticCode!.toLowerCase()}.png',
width: 30,
height: 30,
),
const SizedBox(
width: 5,
),
Text(
viewModel.konversiInfoModel!.entity!,
style: boldTextStyle.copyWith(
color: orangeColor,
),
),
const SizedBox(
width: 3,
),
Text(
'( ${viewModel.konversiInfoModel!.alphabeticCode} )',
style: italicTextStyle.copyWith(
color: orangeColor,
),
),
],
),
const SizedBox(
height: 15,
),
RichText(
text: TextSpan(
text: 'Nilai Konversi : ',
style: regularTextStyle,
children: [
TextSpan(
text:
'${viewModel.konversiInfoModel!.alphabeticCode} ${viewModel.conversionResultModel!.conversionResult}',
style: boldTextStyle.copyWith(
color: orangeColor,
),
),
],
),
),
],
),
),
),
const SizedBox(
height: 10,
height: 15,
),
RichText(
text: TextSpan(
text: 'Konversi Tukaran : ',
style: regularTextStyle,
children: [
TextSpan(
text: '1 ${viewModel.currencyInfoModel!.alphabeticCode}',
style: boldTextStyle.copyWith(
color: redColor,
),
),
const TextSpan(
text: ' = ',
style: regularTextStyle,
),
TextSpan(
text:
'${viewModel.conversionResultModel!.conversionRate} ${viewModel.konversiInfoModel!.alphabeticCode}',
style: boldTextStyle.copyWith(
color: orangeColor,
),
),
],
),
),
const SizedBox(
height: 10,
),
Row(
children: [
const Text('Uang Konversi: ', style: regularTextStyle),
const SizedBox(
width: 3,
),
Image.asset(
'assets/flags/${viewModel.konversiInfoModel!.alphabeticCode!.toLowerCase()}.png',
width: 30,
height: 30,
),
const SizedBox(
width: 5,
),
Text(
viewModel.konversiInfoModel!.entity!,
style: boldTextStyle.copyWith(
color: orangeColor,
),
),
const SizedBox(
width: 3,
),
Text(
'( ${viewModel.konversiInfoModel!.alphabeticCode} )',
style: italicTextStyle.copyWith(
color: orangeColor,
),
),
],
),
const SizedBox(
height: 10,
),
RichText(
text: TextSpan(
text: 'Nilai Konversi : ',
style: regularTextStyle,
children: [
TextSpan(
text:
'${viewModel.konversiInfoModel!.alphabeticCode} ${viewModel.conversionResultModel!.conversionResult}',
style: boldTextStyle.copyWith(
color: orangeColor,
),
),
],
const Center(
child: Text(
'Sila Klik Icon Untuk\nKonversi Tukaran Mata Uang',
textAlign: TextAlign.center,
),
),
],

View File

@ -1,9 +1,9 @@
import 'package:curreny_exchange/app/themes/app_colors.dart';
import 'package:curreny_exchange/ui/widgets/my_textformfield.dart';
import 'package:flutter/material.dart';
import 'package:stacked/stacked.dart';
import 'package:stacked_services/stacked_services.dart';
import '../../../../../app/themes/app_colors.dart';
import '../../../../widgets/my_textformfield.dart';
import './konversi_dialog_view_model.dart';
class KonversiDialogView extends StatelessWidget {

View File

@ -1,8 +1,8 @@
import 'package:curreny_exchange/app/themes/app_colors.dart';
import 'package:flutter/material.dart';
import 'package:stacked/stacked.dart';
import 'package:stacked_services/stacked_services.dart';
import '../../../../../../app/themes/app_colors.dart';
import '../../../../../../app/themes/app_text.dart';
import './pilih_negara_bottom_sheet_view_model.dart';

View File

@ -1,8 +1,8 @@
import 'package:curreny_exchange/app/themes/app_colors.dart';
import 'package:curreny_exchange/app/themes/app_text.dart';
import 'package:flutter/material.dart';
import 'package:stacked/stacked.dart';
import '../../../../app/themes/app_colors.dart';
import '../../../../app/themes/app_text.dart';
import './today_currency_view_model.dart';
class TodayCurrencyView extends StatelessWidget {