All language subtitles for 47. Adding Transactions with a Date

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French Download
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:02,220 --> 00:00:07,620 Let's now also use the selected date and we already have the submit data method which is triggered 2 00:00:07,710 --> 00:00:13,950 when we try to add the transaction. There right now, we're validating that we have a title and an amount 3 00:00:13,950 --> 00:00:18,720 and if either of the two is missing, we return which means we don't submit the data. 4 00:00:18,720 --> 00:00:24,720 Now I want to add a third condition which when it is false will also lead to this not being submitted 5 00:00:24,720 --> 00:00:29,550 and that is of course that selected date is equal to null, 6 00:00:29,580 --> 00:00:30,550 so it's not set. 7 00:00:30,570 --> 00:00:33,030 If that is not set, then I also want to quit. 8 00:00:33,480 --> 00:00:39,660 So if either of these three conditions is met, if we have no title, if the amount is below zero or equal 9 00:00:39,660 --> 00:00:44,400 to zero or if we have no selected date, then we will return 10 00:00:44,700 --> 00:00:52,680 and as an addition to avoid errors, if you don't even have an amount entered, so if you hit add transaction 11 00:00:52,680 --> 00:00:58,170 here with nothing entered where you get an error right now, you can also add an initial check here and 12 00:00:58,170 --> 00:01:03,760 check if _amountController.text is empty, 13 00:01:03,770 --> 00:01:06,440 in that case this here would always fail, 14 00:01:06,500 --> 00:01:07,960 then you can also return. 15 00:01:07,970 --> 00:01:13,550 Now you can still fail if you enter some text that is not passable into the amount controller but that's 16 00:01:13,550 --> 00:01:19,010 a case we can ignore for now, at least we now avoid errors because we try to submit an empty form 17 00:01:19,280 --> 00:01:25,640 but back to submitting our date. In the end, the goal has to be that we pass our selected date here, the 18 00:01:25,640 --> 00:01:33,440 datetime object to addTx, so to our add transaction function. The add transaction function in the end is of 19 00:01:33,440 --> 00:01:39,110 course defined in main.dart, there we have add new transaction and at the moment, we're not expecting 20 00:01:39,110 --> 00:01:40,150 a date here. 21 00:01:40,160 --> 00:01:41,520 Of course we can change this, 22 00:01:41,600 --> 00:01:47,120 we can accept a third argument which is of type datetime which is the chosen date and the chosen 23 00:01:47,120 --> 00:01:49,520 date should now be used here instead of datetime 24 00:01:49,520 --> 00:01:54,810 now as a date for the transaction and that should already be all we need to do. 25 00:01:54,860 --> 00:01:59,090 This should allow us to pick a date and use it in the create a transaction. 26 00:01:59,660 --> 00:02:08,900 So if I now add a title here, new shoes and a value of let's say 69.99, then at 27 00:02:08,900 --> 00:02:12,560 the moment I also can't get to my date picker without closing the keyboard, 28 00:02:12,560 --> 00:02:14,710 so we'll have to take care about this soon. 29 00:02:14,720 --> 00:02:16,840 For now let's close the keyboard and now choose a date and 30 00:02:16,880 --> 00:02:23,320 let's say yesterday. If I now add the transaction, that's looking good, it was added to yesterday not today 31 00:02:23,320 --> 00:02:29,930 and now let's try another transaction, groceries for 15.86 32 00:02:29,930 --> 00:02:39,770 let's say. Close that, choose a date and let's say that was on Sunday, and indeed that's added here 33 00:02:39,980 --> 00:02:44,950 on Sunday and you see it only makes up a fraction of our total spendings. 34 00:02:45,020 --> 00:02:50,840 Now the fact that we can't really get to our date picker here without manually closing the keyboard 35 00:02:51,110 --> 00:02:52,730 is something we should also take care of 36 00:02:52,730 --> 00:02:56,430 of course. For the moment, it's however something we can live with 37 00:02:56,510 --> 00:03:02,960 and later, we'll learn about a technique or about a certain feature of Flutter that helps us with fixing 38 00:03:02,960 --> 00:03:04,430 this problem here as well. 4235

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.