text
stringlengths 6
13.6M
| id
stringlengths 13
176
| metadata
dict | __index_level_0__
int64 0
1.69k
|
---|---|---|---|
{
"loading": "Laster inn",
"deselect": "Velg bort",
"select": "Velg",
"selectable": "Kan velges (langt trykk)",
"selected": "Valgt",
"demo": "Demonstrasjon",
"bottomAppBar": "Nederste apprad",
"notSelected": "Ikke valgt",
"demoCupertinoSearchTextFieldTitle": "Søketekstfelt",
"demoCupertinoPicker": "Velger",
"demoCupertinoSearchTextFieldSubtitle": "Søketekstfelt i iOS-stil",
"demoCupertinoSearchTextFieldDescription": "Et søketekstfelt der brukeren kan skrive inn tekst for å søke. Feltet kan også vise og filtrere forslag.",
"demoCupertinoSearchTextFieldPlaceholder": "Skriv inn tekst",
"demoCupertinoScrollbarTitle": "Rullefelt",
"demoCupertinoScrollbarSubtitle": "Rullefelt i iOS-stil",
"demoCupertinoScrollbarDescription": "Et rullefelt som omslutter det angitte underordnede elementet",
"demoTwoPaneItem": "Vare {value}",
"demoTwoPaneList": "Liste",
"demoTwoPaneFoldableLabel": "Sammenleggbar",
"demoTwoPaneSmallScreenLabel": "Liten skjerm",
"demoTwoPaneSmallScreenDescription": "Slik fungerer TwoPane på en enhet med liten skjerm.",
"demoTwoPaneTabletLabel": "Nettbrett/datamaskin",
"demoTwoPaneTabletDescription": "Slik fungerer TwoPane på store skjermer som nettbrett og datamaskiner.",
"demoTwoPaneTitle": "TwoPane",
"demoTwoPaneSubtitle": "Responsive layouter på små, store og sammenleggbare skjermer.",
"splashSelectDemo": "Velg en demo",
"demoTwoPaneFoldableDescription": "Slik fungerer TwoPane på en sammenleggbar enhet.",
"demoTwoPaneDetails": "Detaljer",
"demoTwoPaneSelectItem": "Velg et element",
"demoTwoPaneItemDetails": "Detaljer om vare {value}",
"demoCupertinoContextMenuActionText": "Trykk og hold på Flutter-logoen for å åpne den kontekstuelle menyen.",
"demoCupertinoContextMenuDescription": "En kontekstuell meny i iOS-stil og fullskjermvisning som vises når det trykkes lenge på et element.",
"demoAppBarTitle": "Apprad",
"demoAppBarDescription": "På appraden finner du innhold og handlinger som er tilknyttet den aktive skjermen. Den brukes til merkevarebygging, skjermtitler, navigasjon og handlinger.",
"demoDividerTitle": "Skillelinje",
"demoDividerSubtitle": "En skillelinje er en tynn linje som brukes til å gruppere innhold i lister og oppsett.",
"demoDividerDescription": "Skillelinjer kan brukes i lister, uttrekksmenyer og andre steder for å skille innhold.",
"demoVerticalDividerTitle": "Vertikal skillelinje",
"demoCupertinoContextMenuTitle": "Kontekstuell meny",
"demoCupertinoContextMenuSubtitle": "Kontekstuell meny i iOS-stil",
"demoAppBarSubtitle": "Viser informasjon og handlinger som er tilknyttet den aktive skjermen",
"demoCupertinoContextMenuActionOne": "Handling én",
"demoCupertinoContextMenuActionTwo": "Handling to",
"demoDateRangePickerDescription": "Viser en dialogboks med en datoperiodevelger i Material Design-stil.",
"demoDateRangePickerTitle": "Datoperiodevelger",
"demoNavigationDrawerUserName": "Brukernavn",
"demoNavigationDrawerUserEmail": "[email protected]",
"demoNavigationDrawerText": "Sveip fra kanten eller trykk på ikonet øverst til venstre for å se uttrekksmenyen",
"demoNavigationRailTitle": "Navigasjonslinje",
"demoNavigationRailSubtitle": "Viser en navigasjonslinje i en app",
"demoNavigationRailDescription": "En materiellmodul som skal vises på venstre eller høyre side av en app for å navigere mellom et lite antall visninger, vanligvis mellom tre og fem.",
"demoNavigationRailFirst": "Første",
"demoNavigationDrawerTitle": "Uttrekksmeny",
"demoNavigationRailThird": "Tredje",
"replyStarredLabel": "Stjernemerket",
"demoTextButtonDescription": "En tekstknapp viser en blekkflekk når den trykkes, men løftes ikke. Bruk tekstknapper i verktøyrader, dialogbokser og innebygd i utfylling",
"demoElevatedButtonTitle": "Fremhevet knapp",
"demoElevatedButtonDescription": "Fremhevede knapper gir dimensjon til oppsett som hovedsakelig er flate. De fremhever funksjoner på tettpakkede eller store områder.",
"demoOutlinedButtonTitle": "Knapp med omriss",
"demoOutlinedButtonDescription": "Knapper med omriss blir ugjennomsiktige og heves når de trykkes. De er ofte koblet til hevede knapper for å indikere en alternativ, sekundær handling.",
"demoContainerTransformDemoInstructions": "Kort, lister og svevende handlingsknapper",
"demoNavigationDrawerSubtitle": "Viser en uttrekksmeny i appraden",
"replyDescription": "En effektiv, fokusert e-post-app",
"demoNavigationDrawerDescription": "Et Material Design-panel som kommer inn horisontalt fra kanten av skjermen for å vise navigeringslinker i en app.",
"replyDraftsLabel": "Utkast",
"demoNavigationDrawerToPageOne": "Element nummer én",
"replyInboxLabel": "Innboks",
"demoSharedXAxisDemoInstructions": "Neste- og Tilbake-knapper",
"replySpamLabel": "Nettsøppel",
"replyTrashLabel": "Papirkurv",
"replySentLabel": "Sendt",
"demoNavigationRailSecond": "Andre",
"demoNavigationDrawerToPageTwo": "Element nummer to",
"demoFadeScaleDemoInstructions": "Modalfelt og svevende handlingsknapper",
"demoFadeThroughDemoInstructions": "Navigering nederst",
"demoSharedZAxisDemoInstructions": "Knapp for Innstillinger-ikon",
"demoSharedYAxisDemoInstructions": "Sorter etter «Spilt av nylig»",
"demoTextButtonTitle": "Tekstknapp",
"demoSharedZAxisBeefSandwichRecipeTitle": "Smørbrød med storfekjøtt",
"demoSharedZAxisDessertRecipeDescription": "Dessertoppskrift",
"demoSharedYAxisAlbumTileSubtitle": "Artist",
"demoSharedYAxisAlbumTileTitle": "Album",
"demoSharedYAxisRecentSortTitle": "Spilt av nylig",
"demoSharedYAxisAlphabeticalSortTitle": "A–Å",
"demoSharedYAxisAlbumCount": "268 album",
"demoSharedYAxisTitle": "Delt Y-akse",
"demoSharedXAxisCreateAccountButtonText": "OPPRETT KONTO",
"demoFadeScaleAlertDialogDiscardButton": "FORKAST",
"demoSharedXAxisSignInTextFieldLabel": "E-postadresse eller telefonnummer",
"demoSharedXAxisSignInSubtitleText": "Logg på med kontoen din",
"demoSharedXAxisSignInWelcomeText": "Hei, David Park",
"demoSharedXAxisIndividualCourseSubtitle": "Vises enkeltvis",
"demoSharedXAxisBundledCourseSubtitle": "Gruppert",
"demoFadeThroughAlbumsDestination": "Album",
"demoSharedXAxisDesignCourseTitle": "Design",
"demoSharedXAxisIllustrationCourseTitle": "Illustrasjon",
"demoSharedXAxisBusinessCourseTitle": "Bedrift",
"demoSharedXAxisArtsAndCraftsCourseTitle": "Kunst og håndverk",
"demoMotionPlaceholderSubtitle": "Sekundær tekst",
"demoFadeScaleAlertDialogCancelButton": "AVBRYT",
"demoFadeScaleAlertDialogHeader": "Varseldialog",
"demoFadeScaleHideFabButton": "SKJUL SVEVENDE HANDLINGSKNAPP",
"demoFadeScaleShowFabButton": "VIS SVEVENDE HANDLINGSKNAPP",
"demoFadeScaleShowAlertDialogButton": "VIS MODAL",
"demoFadeScaleDescription": "Uttoningsmønsteret brukes for elementer i brukergrensesnittet som går inn eller ut innenfor grensene på skjermen, for eksempel dialoger som toner ut midt på skjermen.",
"demoFadeScaleTitle": "Ton ut",
"demoFadeThroughTextPlaceholder": "123 bilder",
"demoFadeThroughSearchDestination": "Søk",
"demoFadeThroughPhotosDestination": "Bilder",
"demoSharedXAxisCoursePageSubtitle": "Grupperte kategorier vises som grupper i feeden din. Du kan endre dette når som helst.",
"demoFadeThroughDescription": "Gjennomtoningsmønsteret brukes for overganger mellom elementer i brukergrensesnittet som ikke har et sterkt forhold til hverandre.",
"demoFadeThroughTitle": "Ton gjennom",
"demoSharedZAxisHelpSettingLabel": "Hjelp",
"demoMotionSubtitle": "Alle de forhåndsdefinerte overgangsmønstrene",
"demoSharedZAxisNotificationSettingLabel": "Varsler",
"demoSharedZAxisProfileSettingLabel": "Profil",
"demoSharedZAxisSavedRecipesListTitle": "Lagrede oppskrifter",
"demoSharedZAxisBeefSandwichRecipeDescription": "Oppskrift på smørbrød med storfekjøtt",
"demoSharedZAxisCrabPlateRecipeDescription": "Oppskrift på krabberett",
"demoSharedXAxisCoursePageTitle": "Effektiviser kursene dine",
"demoSharedZAxisCrabPlateRecipeTitle": "Krabbe",
"demoSharedZAxisShrimpPlateRecipeDescription": "Oppskrift på rekerett",
"demoSharedZAxisShrimpPlateRecipeTitle": "Reke",
"demoContainerTransformTypeFadeThrough": "TON GJENNOM",
"demoSharedZAxisDessertRecipeTitle": "Dessert",
"demoSharedZAxisSandwichRecipeDescription": "Smørbrødoppskrift",
"demoSharedZAxisSandwichRecipeTitle": "Smørbrød",
"demoSharedZAxisBurgerRecipeDescription": "Hamburgeroppskrift",
"demoSharedZAxisBurgerRecipeTitle": "Hamburger",
"demoSharedZAxisSettingsPageTitle": "Innstillinger",
"demoSharedZAxisTitle": "Delt Z-akse",
"demoSharedZAxisPrivacySettingLabel": "Personvern",
"demoMotionTitle": "Bevegelse",
"demoContainerTransformTitle": "Forvandling av beholder",
"demoContainerTransformDescription": "Forvandlingsmønsteret til beholderen er utviklet for overganger mellom elementer i brukergrensesnittet som inkluderer en beholder. Dette mønsteret oppretter en synlig forbindelse mellom to elementer i brukergrensesnittet.",
"demoContainerTransformModalBottomSheetTitle": "Modus for å tone ut",
"demoContainerTransformTypeFade": "TON UT",
"demoSharedYAxisAlbumTileDurationUnit": "min",
"demoMotionPlaceholderTitle": "Tittel",
"demoSharedXAxisForgotEmailButtonText": "HAR DU GLEMT E-POSTADRESSEN?",
"demoMotionSmallPlaceholderSubtitle": "Sekundær",
"demoMotionDetailsPageTitle": "Detaljside",
"demoMotionListTileTitle": "Listeelement",
"demoSharedAxisDescription": "Det delte aksemønsteret brukes for overganger mellom elementene i brukergrensesnittet som har et romlig eller navigasjonsbasert forhold. Dette mønsteret bruker en delt overgang på X-, Y- eller Z-aksen for å forsterke forholdet mellom elementer.",
"demoSharedXAxisTitle": "Delt X-akse",
"demoSharedXAxisBackButtonText": "TILBAKE",
"demoSharedXAxisNextButtonText": "NESTE",
"demoSharedXAxisCulinaryCourseTitle": "Matlaging",
"githubRepo": "{repoName} GitHub-repositorium",
"fortnightlyMenuUS": "USA",
"fortnightlyMenuBusiness": "Næringsliv",
"fortnightlyMenuScience": "Vitenskap",
"fortnightlyMenuSports": "Sport",
"fortnightlyMenuTravel": "Reise",
"fortnightlyMenuCulture": "Kultur",
"fortnightlyTrendingTechDesign": "TechDesign",
"rallyBudgetDetailAmountLeft": "Gjenværende beløp",
"fortnightlyHeadlineArmy": "Reformering av den grønne armeen fra innsiden",
"fortnightlyDescription": "En innholdsfokusert nyhetsapp",
"rallyBillDetailAmountDue": "Skyldig beløp",
"rallyBudgetDetailTotalCap": "Total grense",
"rallyBudgetDetailAmountUsed": "Brukt beløp",
"fortnightlyTrendingHealthcareRevolution": "HealthcareRevolution",
"fortnightlyMenuFrontPage": "Forside",
"fortnightlyMenuWorld": "Verden",
"rallyBillDetailAmountPaid": "Betalt beløp",
"fortnightlyMenuPolitics": "Politikk",
"fortnightlyHeadlineBees": "Mangel på bier til jordbruket",
"fortnightlyHeadlineGasoline": "Fremtiden for bensin",
"fortnightlyTrendingGreenArmy": "GreenArmy",
"fortnightlyHeadlineFeminists": "Feministers mening om partiskhet",
"fortnightlyHeadlineFabrics": "Designere bruker teknologi til å lage futuristisk stoff",
"fortnightlyHeadlineStocks": "Når aksjer stagnerer, ser mange til valutaer",
"fortnightlyTrendingReform": "Reform",
"fortnightlyMenuTech": "Teknologi",
"fortnightlyHeadlineWar": "Atskilte amerikanske liv i krig",
"fortnightlyHeadlineHealthcare": "Den stille, men kraftige revolusjonen inne helsetjenester",
"fortnightlyLatestUpdates": "De siste oppdateringene",
"fortnightlyTrendingStocks": "Stocks",
"rallyBillDetailTotalAmount": "Totalbeløp",
"demoCupertinoPickerDateTime": "Dato og klokkeslett",
"signIn": "LOGG PÅ",
"dataTableRowWithSugar": "{value} med sukker",
"dataTableRowApplePie": "Eplekake",
"dataTableRowDonut": "Smultring",
"dataTableRowHoneycomb": "Bikake",
"dataTableRowLollipop": "Kjærlighet på pinne",
"dataTableRowJellyBean": "Gelebønner",
"dataTableRowGingerbread": "Pepperkake",
"dataTableRowCupcake": "Muffins",
"dataTableRowEclair": "Eclair",
"dataTableRowIceCreamSandwich": "Iskremsandwich",
"dataTableRowFrozenYogurt": "Yoghurtis",
"dataTableColumnIron": "Jern (%)",
"dataTableColumnCalcium": "Kalsium (%)",
"dataTableColumnSodium": "Natrium (mg)",
"demoTimePickerTitle": "Klokkeslettvelger",
"demo2dTransformationsResetTooltip": "Tilbakestill transformasjoner",
"dataTableColumnFat": "Fett (g)",
"dataTableColumnCalories": "Kalorier",
"dataTableColumnDessert": "Dessert (en porsjon)",
"cardsDemoTravelDestinationLocation1": "Thanjavur, Tamil Nadu",
"demoTimePickerDescription": "Viser en dialogboks med en klokkeslettvelger for «material design».",
"demoPickersShowPicker": "VIS VELGEREN",
"demoTabsScrollingTitle": "Rullende",
"demoTabsNonScrollingTitle": "Ikke-rullende",
"craneHours": "{hours,plural,=1{1 t}other{{hours} t}}",
"craneMinutes": "{minutes,plural,=1{1 m}other{{minutes} m}}",
"craneFlightDuration": "{hoursShortForm} {minutesShortForm}",
"dataTableHeader": "Ernæring",
"demoDatePickerTitle": "Datovelger",
"demoPickersSubtitle": "Valg av dato og klokkeslett",
"demoPickersTitle": "Velgere",
"demo2dTransformationsEditTooltip": "Rediger tittelen",
"demoDataTableDescription": "Datatabeller viser informasjon i et rutenettlignende format med rader og kolonner. Der organiseres informasjonen på en måte som er enkel å skanne, slik at brukerne kan se etter mønstre og statistikk.",
"demo2dTransformationsDescription": "Trykk for å endre infobrikker, og bruk bevegelser til å navigere rundt på skjermen. Dra for å panorere, klyp for å zoome, rotér med to fingre. Trykk på tilbakestillingsknappen for å gå tilbake til opprinnelig retning.",
"demo2dTransformationsSubtitle": "Panorer, zoom, rotér",
"demo2dTransformationsTitle": "2D-transformasjoner",
"demoCupertinoTextFieldPIN": "PIN-kode",
"demoCupertinoTextFieldDescription": "Brukeren bruker tekstfelt til å skrive inn tekst, enten med et fysisk tastatur eller et tastatur på skjermen.",
"demoCupertinoTextFieldSubtitle": "Tekstfelt i iOS-stil",
"demoCupertinoTextFieldTitle": "Tekstfelt",
"demoDatePickerDescription": "Viser en dialogboks med en datovelger for «material design».",
"demoCupertinoPickerTime": "Klokkeslett",
"demoCupertinoPickerDate": "Dato",
"demoCupertinoPickerTimer": "Nedtelling",
"demoCupertinoPickerDescription": "En valgmodul i iOS-stil som kan brukes til å velge strenger, datoer, klokkeslett eller både dato og klokkeslett.",
"demoCupertinoPickerSubtitle": "Velgere i iOS-stil",
"demoCupertinoPickerTitle": "Velgere",
"dataTableRowWithHoney": "{value} med honning",
"cardsDemoTravelDestinationCity2": "Chettinad",
"bannerDemoResetText": "Tilbakestill banneret",
"bannerDemoMultipleText": "Flere handlinger",
"bannerDemoLeadingText": "Ledende ikon",
"dismiss": "AVVIS",
"cardsDemoTappable": "Kan trykkes",
"cardsDemoSelectable": "Kan velges (langt trykk)",
"cardsDemoExplore": "Utforsk",
"cardsDemoExploreSemantics": "Utforsk {destinationName}",
"cardsDemoShareSemantics": "Del {destinationName}",
"cardsDemoTravelDestinationTitle1": "Topp 10 byer du kan besøke i Tamil Nadu",
"cardsDemoTravelDestinationDescription1": "Nummer 10",
"cardsDemoTravelDestinationCity1": "Thanjavur",
"dataTableColumnProtein": "Proteiner (g)",
"cardsDemoTravelDestinationTitle2": "Håndverkere sør i India",
"cardsDemoTravelDestinationDescription2": "Silkespinnere",
"bannerDemoText": "Passordet ditt er oppdatert på den andre enheten din. Logg på igjen.",
"cardsDemoTravelDestinationLocation2": "Sivaganga, Tamil Nadu",
"cardsDemoTravelDestinationTitle3": "Brihadisjvara-tempelet",
"cardsDemoTravelDestinationDescription3": "Templer",
"demoBannerTitle": "Banner",
"demoBannerSubtitle": "Viser et banner i en liste",
"demoBannerDescription": "Et banner viser en viktig, kortfattet melding og gir brukerne handlinger de kan benytte (eller avvise banneret). En brukerhandling kreves for at det skal avvises.",
"demoCardTitle": "Kort",
"demoCardSubtitle": "Grunnleggende kort med avrundede hjørner",
"demoCardDescription": "Et kort er et ark av materiale som brukes til å representere relatert informasjon, for eksempel et album, en geografisk posisjon, et måltid, kontaktdetaljer osv.",
"demoDataTableTitle": "Datatabeller",
"demoDataTableSubtitle": "Rader og kolonner med informasjon",
"dataTableColumnCarbs": "Karbohydrater (g)",
"placeTanjore": "Thanjavur",
"demoGridListsTitle": "Rutenettlister",
"placeFlowerMarket": "Blomstermarked",
"placeBronzeWorks": "Bronseverk",
"placeMarket": "Marked",
"placeThanjavurTemple": "Brihadisvara-tempelet",
"placeSaltFarm": "Saltutvinningsanlegg",
"placeScooters": "Skutere",
"placeSilkMaker": "Silkeprodusent",
"placeLunchPrep": "Lunsjforberedelse",
"placeBeach": "Strand",
"placeFisherman": "Fisker",
"demoMenuSelected": "Valgt: {value}",
"demoMenuRemove": "Fjern",
"demoMenuGetLink": "Hent link",
"demoMenuShare": "Del",
"demoBottomAppBarSubtitle": "Viser navigering og handlinger nederst",
"demoMenuAnItemWithASectionedMenu": "Et element med en inndelt meny",
"demoMenuADisabledMenuItem": "Deaktivert menyelement",
"demoLinearProgressIndicatorTitle": "Lineær fremdriftsindikator",
"demoMenuContextMenuItemOne": "Element én i kontekstuell meny",
"demoMenuAnItemWithASimpleMenu": "Et element med en enkel meny",
"demoCustomSlidersTitle": "Egendefinerte glidebrytere",
"demoMenuAnItemWithAChecklistMenu": "Et element med en sjekklistemeny",
"demoCupertinoActivityIndicatorTitle": "Aktivitetsindikator",
"demoCupertinoActivityIndicatorSubtitle": "Aktivitetsindikatorer i iOS-stil",
"demoCupertinoActivityIndicatorDescription": "En aktivitetsindikator i iOS-stil som snurrer med klokken.",
"demoCupertinoNavigationBarTitle": "Navigasjonsrad",
"demoCupertinoNavigationBarSubtitle": "Navigasjonsrad i iOS-stil",
"demoCupertinoNavigationBarDescription": "En navigasjonsrad i iOS-stil. Navigasjonsraden er en verktøyrad som minst består av en sidetittel i midten av verktøyraden.",
"demoCupertinoPullToRefreshTitle": "Sveip ned for å laste inn på nytt",
"demoCupertinoPullToRefreshSubtitle": "iOS-lignende funksjon for å sveipe nedover for å laste inn på nytt",
"demoCupertinoPullToRefreshDescription": "En modul som implementerer den iOS-lignende funksjonen for å sveipe nedover for å laste inn innhold på nytt.",
"demoProgressIndicatorTitle": "Fremdriftsindikatorer",
"demoProgressIndicatorSubtitle": "Lineær, rund, ukjent",
"demoCircularProgressIndicatorTitle": "Rund fremdriftsindikator",
"demoCircularProgressIndicatorDescription": "En rund fremdriftsindikator for «material design», som snurrer for å indikere at appen er opptatt.",
"demoMenuFour": "Fire",
"demoLinearProgressIndicatorDescription": "En lineær fremdriftsindikator for «material design», som også kalles en fremdriftslinje.",
"demoTooltipTitle": "Verktøytips",
"demoTooltipSubtitle": "En kort melding som vises ved et langt trykk eller når markøren holdes over",
"demoTooltipDescription": "Verktøytips er tekstetiketter som forklarer funksjonen til en knapp eller en annen handling i brukergrensesnittet. Verktøytips viser informativ tekst når brukere holder markøren over, fokuserer på eller trykker lenge på et element.",
"demoTooltipInstructions": "Trykk lenge på eller hold markøren over for å vise verktøytipset.",
"placeChennai": "Chennai",
"demoMenuChecked": "Merket av: {value}",
"placeChettinad": "Chettinad",
"demoMenuPreview": "Se forhåndsvisning",
"demoBottomAppBarTitle": "Nederste apprad",
"demoBottomAppBarDescription": "De nederste appradene gir tilgang til en uttrekksmeny nederst og opptil fire handlinger, inkludert den svevende handlingsknappen.",
"bottomAppBarNotch": "Skjermutklipp",
"bottomAppBarPosition": "Plassering av svevende handlingsknapp",
"bottomAppBarPositionDockedEnd": "Dokket – enden",
"bottomAppBarPositionDockedCenter": "Dokket – midten",
"bottomAppBarPositionFloatingEnd": "Svevende – enden",
"bottomAppBarPositionFloatingCenter": "Svevende – midten",
"demoSlidersEditableNumericalValue": "Redigerbar numerisk verdi",
"demoGridListsSubtitle": "Oppsett for rader og kolonner",
"demoGridListsDescription": "Rutenettlister er best egnet til å presentere homogene data, vanligvis bilder. Hvert element i en rutenettliste kalles en rute.",
"demoGridListsImageOnlyTitle": "Bare bilder",
"demoGridListsHeaderTitle": "Med overskrift",
"demoGridListsFooterTitle": "Med bunntekst",
"demoSlidersTitle": "Glidebrytere",
"demoSlidersSubtitle": "Moduler for å velge en verdi ved å sveipe",
"demoSlidersDescription": "Glidebrytere gjenspeiler en rekke verdier langs en rad, som brukere kan velge én enkelt verdi fra. De er perfekte for å justere innstillinger som volum, lysstyrke og bruk av bildefiltre.",
"demoRangeSlidersTitle": "Områdeglidebrytere",
"demoRangeSlidersDescription": "Glidebrytere gjenspeiler en rekke verdier langs en rad. De kan ha ikoner på begge ender av raden som viser et verdiområde. De er perfekte for å justere innstillinger som volum, lysstyrke og bruk av bildefiltre.",
"demoMenuAnItemWithAContextMenuButton": "Et element med en kontekstuell meny",
"demoCustomSlidersDescription": "Glidebrytere gjenspeiler en rekke verdier langs en rad, som brukere kan velge én enkelt verdi eller et verdiområde fra. Glidebryterne kan få tema og tilpasses.",
"demoSlidersContinuousWithEditableNumericalValue": "Kontinuerlig med redigerbar numerisk verdi",
"demoSlidersDiscrete": "Atskilt",
"demoSlidersDiscreteSliderWithCustomTheme": "Glidebryter med atskilte verdier og tilpasset tema",
"demoSlidersContinuousRangeSliderWithCustomTheme": "Glidebryter med kontinuerlig område og tilpasset tema",
"demoSlidersContinuous": "Kontinuerlig",
"placePondicherry": "Puducherry",
"demoMenuTitle": "Meny",
"demoContextMenuTitle": "Kontekstuell meny",
"demoSectionedMenuTitle": "Inndelt meny",
"demoSimpleMenuTitle": "Enkel meny",
"demoChecklistMenuTitle": "Sjekklistemeny",
"demoMenuSubtitle": "Menyknapper og enkle menyer",
"demoMenuDescription": "Menyer viser lister over valg på en midlertidig overflate. De vises når brukere samhandler med en knapp, handling eller annen kontroll.",
"demoMenuItemValueOne": "Menyelement én",
"demoMenuItemValueTwo": "Menyelement to",
"demoMenuItemValueThree": "Menyelement tre",
"demoMenuOne": "Én",
"demoMenuTwo": "To",
"demoMenuThree": "Tre",
"demoMenuContextMenuItemThree": "Element tre i kontekstuell meny",
"demoCupertinoSwitchSubtitle": "Bryter i iOS-stil",
"demoSnackbarsText": "Dette er en snackbar.",
"demoCupertinoSliderSubtitle": "Glidebryter i iOS-stil",
"demoCupertinoSliderDescription": "En glidebryter kan brukes til å velge fra enten et kontinuerlig eller atskilt sett med verdier.",
"demoCupertinoSliderContinuous": "Kontinuerlig: {value}",
"demoCupertinoSliderDiscrete": "Atskilt: {value}",
"demoSnackbarsAction": "Du har trykket på snackbarhandlingen.",
"backToGallery": "Tilbake til galleriet",
"demoCupertinoTabBarTitle": "Fanerad",
"demoCupertinoSwitchDescription": "En bryter brukes til å veksle mellom på og av for en enkelt innstilling.",
"demoSnackbarsActionButtonLabel": "HANDLING",
"cupertinoTabBarProfileTab": "Profil",
"demoSnackbarsButtonLabel": "VIS EN SNACKBAR",
"demoSnackbarsDescription": "Snackbarer informerer brukere om en prosess en app har utført eller kommer til å utføre. De vises midlertidig nede på skjermen. De skal ikke forstyrre brukeropplevelsen, og de krever ikke brukerhandlinger for å forsvinne.",
"demoSnackbarsSubtitle": "Snackbarer viser meldinger nederst på skjermen",
"demoSnackbarsTitle": "Snackbarer",
"demoCupertinoSliderTitle": "Glidebryter",
"cupertinoTabBarChatTab": "Chat",
"cupertinoTabBarHomeTab": "Hjem",
"demoCupertinoTabBarDescription": "En nederste fanerad i iOS-stil. Viser flere faner der én er aktiv. Den første fanen er aktiv som standard.",
"demoCupertinoTabBarSubtitle": "Nederste fanerad i iOS-stil",
"demoOptionsFeatureTitle": "Visningsalternativer",
"demoOptionsFeatureDescription": "Trykk her for å se tilgjengelige alternativer for denne demonstrasjonen.",
"demoCodeViewerCopyAll": "KOPIÉR ALT",
"shrineScreenReaderRemoveProductButton": "Fjern {product}",
"shrineScreenReaderProductAddToCart": "Legg i handlekurven",
"shrineScreenReaderCart": "{quantity,plural,=0{Handlekurv, ingen varer}=1{Handlekurv, 1 vare}other{Handlekurv, {quantity} varer}}",
"demoCodeViewerFailedToCopyToClipboardMessage": "Kunne ikke kopiere til utklippstavlen: {error}",
"demoCodeViewerCopiedToClipboardMessage": "Kopiert til utklippstavlen.",
"craneSleep8SemanticLabel": "Maya-ruiner på en klippe over en strand",
"craneSleep4SemanticLabel": "Hotell ved en innsjø foran fjell",
"craneSleep2SemanticLabel": "Machu Picchu-festningen",
"craneSleep1SemanticLabel": "Fjellhytte i snølandskap med grantrær",
"craneSleep0SemanticLabel": "Bungalower over vann",
"craneFly13SemanticLabel": "Basseng langs sjøen med palmer",
"craneFly12SemanticLabel": "Basseng med palmer",
"craneFly11SemanticLabel": "Fyrtårn av murstein til sjøs",
"craneFly10SemanticLabel": "Tårnene til Al-Azhar-moskeen ved solnedgang",
"craneFly9SemanticLabel": "Mann som lener seg på en blå veteranbil",
"craneFly8SemanticLabel": "Supertree Grove",
"craneEat9SemanticLabel": "Kafédisk med kaker",
"craneEat2SemanticLabel": "Hamburger",
"craneFly5SemanticLabel": "Hotell ved en innsjø foran fjell",
"demoSelectionControlsSubtitle": "Avmerkingsbokser, alternativknapper og brytere",
"craneEat10SemanticLabel": "Kvinne som holder et enormt pastramismørbrød",
"craneFly4SemanticLabel": "Bungalower over vann",
"craneEat7SemanticLabel": "Bakeri-inngang",
"craneEat6SemanticLabel": "Rekerett",
"craneEat5SemanticLabel": "Sitteområdet i en kunstnerisk restaurant",
"craneEat4SemanticLabel": "Sjokoladedessert",
"craneEat3SemanticLabel": "Koreansk taco",
"craneFly3SemanticLabel": "Machu Picchu-festningen",
"craneEat1SemanticLabel": "Tom bar med kafékrakker",
"craneEat0SemanticLabel": "Pizza i en vedfyrt ovn",
"craneSleep11SemanticLabel": "Taipei 101-skyskraper",
"craneSleep10SemanticLabel": "Tårnene til Al-Azhar-moskeen ved solnedgang",
"craneSleep9SemanticLabel": "Fyrtårn av murstein til sjøs",
"craneEat8SemanticLabel": "Fat med kreps",
"craneSleep7SemanticLabel": "Fargerike leiligheter i Riberia Square",
"craneSleep6SemanticLabel": "Basseng med palmer",
"craneSleep5SemanticLabel": "Telt i en mark",
"settingsButtonCloseLabel": "Lukk innstillingene",
"demoSelectionControlsCheckboxDescription": "Brukere kan bruke avmerkingsbokser til å velge flere alternativer fra et sett. Verdien til en normal avmerkingsboks er sann eller usann, og verdien til en avmerkingsboks med tre tilstander kan også være null.",
"settingsButtonLabel": "Innstillinger",
"demoListsTitle": "Lister",
"demoListsSubtitle": "Layout for rullelister",
"demoListsDescription": "Én enkelt rad med fast høyde som vanligvis inneholder tekst samt et innledende eller etterfølgende ikon.",
"demoOneLineListsTitle": "Én linje",
"demoTwoLineListsTitle": "To linjer",
"demoListsSecondary": "Sekundær tekst",
"demoSelectionControlsTitle": "Valgkontroller",
"craneFly7SemanticLabel": "Mount Rushmore",
"demoSelectionControlsCheckboxTitle": "Avmerkingsboks",
"craneSleep3SemanticLabel": "Mann som lener seg på en blå veteranbil",
"demoSelectionControlsRadioTitle": "Radio",
"demoSelectionControlsRadioDescription": "Brukere kan bruke alternativknapper til å velge ett alternativ fra et sett. Bruk alternativknapper til eksklusive valg hvis du mener at brukeren må se alle tilgjengelige alternativer ved siden av hverandre.",
"demoSelectionControlsSwitchTitle": "Bryter",
"demoSelectionControlsSwitchDescription": "Av/på-brytere slår tilstanden til ett enkelt alternativ i innstillingene av/på. Alternativet for at bryterkontrollene, samt tilstanden de er i, skal være tydelig basert på den samsvarende innebygde etiketten.",
"craneFly0SemanticLabel": "Fjellhytte i snølandskap med grantrær",
"craneFly1SemanticLabel": "Telt i en mark",
"craneFly2SemanticLabel": "Bønneflagg foran et snødekket fjell",
"craneFly6SemanticLabel": "Flyfoto av Palacio de Bellas Artes",
"rallySeeAllAccounts": "Se alle kontoene",
"rallyBillAmount": "Regningen {billName} på {amount} forfaller {date}.",
"shrineTooltipCloseCart": "Lukk handlekurven",
"shrineTooltipCloseMenu": "Lukk menyen",
"shrineTooltipOpenMenu": "Åpne menyen",
"shrineTooltipSettings": "Innstillinger",
"shrineTooltipSearch": "Søk",
"demoTabsDescription": "Faner organiserer innhold på flere skjermer, datasett og andre interaksjoner.",
"demoTabsSubtitle": "Faner med visninger som kan rulles hver for seg",
"demoTabsTitle": "Faner",
"rallyBudgetAmount": "Budsjettet {budgetName} med {amountUsed} brukt av {amountTotal}, {amountLeft} gjenstår",
"shrineTooltipRemoveItem": "Fjern varen",
"rallyAccountAmount": "{accountName}-kontoen, {accountNumber}, med {amount}.",
"rallySeeAllBudgets": "Se alle budsjettene",
"rallySeeAllBills": "Se alle regningene",
"craneFormDate": "Velg dato",
"craneFormOrigin": "Velg avreisested",
"craneFly2": "Khumbu Valley, Nepal",
"craneFly3": "Machu Picchu, Peru",
"craneFly4": "Malé, Maldivene",
"craneFly5": "Vitznau, Sveits",
"craneFly6": "Mexico by, Mexico",
"craneFly7": "Mount Rushmore, USA",
"settingsTextDirectionLocaleBased": "Basert på lokalitet",
"craneFly9": "Havana, Cuba",
"craneFly10": "Kairo, Egypt",
"craneFly11": "Lisboa, Portugal",
"craneFly12": "Napa, USA",
"craneFly13": "Bali, Indonesia",
"craneSleep0": "Malé, Maldivene",
"craneSleep1": "Aspen, USA",
"craneSleep2": "Machu Picchu, Peru",
"demoCupertinoSegmentedControlTitle": "Segmentert kontroll",
"craneSleep4": "Vitznau, Sveits",
"craneSleep5": "Big Sur, USA",
"craneSleep6": "Napa, USA",
"craneSleep7": "Porto, Portugal",
"craneSleep8": "Tulum, Mexico",
"craneEat5": "Seoul, Sør-Korea",
"demoChipTitle": "Brikker",
"demoChipSubtitle": "Kompakte elementer som representerer inndata, egenskaper eller handlinger",
"demoActionChipTitle": "Handlingsbrikke",
"demoActionChipDescription": "Handlingsbrikker er et sett med alternativer som utløser en handling knyttet til primærinnhold. Handlingsbrikekr skal vises dynamisk og kontekstuelt i et UI.",
"demoChoiceChipTitle": "Valgbrikke",
"demoChoiceChipDescription": "Valgbrikker representerer et enkelt valg fra et sett. Valgbrikker inneholder tilknyttet beskrivende tekst eller kategorier.",
"demoFilterChipTitle": "Filterbrikke",
"demoFilterChipDescription": "Filterbrikker bruker etiketter eller beskrivende ord for å filtrere innhold.",
"demoInputChipTitle": "Inndatabrikke",
"demoInputChipDescription": "Inndatabrikker representerer en komplisert informasjonsdel, for eksempel en enhet (person, sted eller gjenstand) eller samtaletekst, i kompakt form.",
"craneSleep9": "Lisboa, Portugal",
"craneEat10": "Lisboa, Portugal",
"demoCupertinoSegmentedControlDescription": "Brukes til å velge mellom en rekke alternativer som utelukker hverandre. Når ett alternativ er valgt i segmentert kontroll, oppheves valget av de andre alternativene i segmentert kontroll.",
"chipTurnOnLights": "Slå på lyset",
"chipSmall": "Liten",
"chipMedium": "Middels",
"chipLarge": "Stor",
"chipElevator": "Heis",
"chipWasher": "Vaskemaskin",
"chipFireplace": "Peis",
"chipBiking": "Sykling",
"craneFormDiners": "Restaurantgjester",
"rallyAlertsMessageUnassignedTransactions": "{count,plural,=1{Øk det potensielle avgiftsfradraget ditt. Tildel kategorier til én transaksjon som ikke er tildelt.}other{Øk det potensielle avgiftsfradraget ditt. Tildel kategorier til {count} transaksjoner som ikke er tildelt.}}",
"craneFormTime": "Velg klokkeslett",
"craneFormLocation": "Velg et sted",
"craneFormTravelers": "Reisende",
"craneEat8": "Atlanta, USA",
"craneFormDestination": "Velg et reisemål",
"craneFormDates": "Velg datoer",
"craneFly": "FLY",
"craneSleep": "SOV",
"craneEat": "SPIS",
"craneFlySubhead": "Utforsk flyvninger etter reisemål",
"craneSleepSubhead": "Utforsk eiendommer etter reisemål",
"craneEatSubhead": "Utforsk restauranter etter reisemål",
"craneFlyStops": "{numberOfStops,plural,=0{Direkte}=1{1 stopp}other{{numberOfStops} stopp}}",
"craneSleepProperties": "{totalProperties,plural,=0{Ingen tilgjengelige eiendommer}=1{1 tilgjengelig eiendom}other{{totalProperties} tilgjengelige eiendommer}}",
"craneEatRestaurants": "{totalRestaurants,plural,=0{Ingen restauranter}=1{1 restaurant}other{{totalRestaurants} restauranter}}",
"craneFly0": "Aspen, USA",
"demoCupertinoSegmentedControlSubtitle": "Segmentert kontroll i iOS-stil",
"craneSleep10": "Kairo, Egypt",
"craneEat9": "Madrid, Spania",
"craneFly1": "Big Sur, USA",
"craneEat7": "Nashville, USA",
"craneEat6": "Seattle, USA",
"craneFly8": "Singapore",
"craneEat4": "Paris, Frankrike",
"craneEat3": "Portland, USA",
"craneEat2": "Córdoba, Argentina",
"craneEat1": "Dallas, USA",
"craneEat0": "Napoli, Italia",
"craneSleep11": "Taipei, Taiwan",
"craneSleep3": "Havana, Cuba",
"shrineLogoutButtonCaption": "LOGG AV",
"rallyTitleBills": "REGNINGER",
"rallyTitleAccounts": "KONTOER",
"shrineProductVagabondSack": "Landstrykersekk",
"rallyAccountDetailDataInterestYtd": "Renter så langt i år",
"shrineProductWhitneyBelt": "Whitney-belte",
"shrineProductGardenStrand": "Garden strand",
"shrineProductStrutEarrings": "Strut-øreringer",
"shrineProductVarsitySocks": "Varsity-sokker",
"shrineProductWeaveKeyring": "Vevd nøkkelring",
"shrineProductGatsbyHat": "Gatsby-hatt",
"shrineProductShrugBag": "Shrug-veske",
"shrineProductGiltDeskTrio": "Gilt desk trio",
"shrineProductCopperWireRack": "Stativ i kobbertråd",
"shrineProductSootheCeramicSet": "Soothe-keramikksett",
"shrineProductHurrahsTeaSet": "Hurrahs-tesett",
"shrineProductBlueStoneMug": "Blått steinkrus",
"shrineProductRainwaterTray": "Regnvannsskuff",
"shrineProductChambrayNapkins": "Chambray-servietter",
"shrineProductSucculentPlanters": "Sukkulentplantere",
"shrineProductQuartetTable": "Quartet-bord",
"shrineProductKitchenQuattro": "Kitchen quattro",
"shrineProductClaySweater": "Leirefarget genser",
"shrineProductSeaTunic": "Havblå bluse",
"shrineProductPlasterTunic": "Gipsfarget bluse",
"rallyBudgetCategoryRestaurants": "Restauranter",
"shrineProductChambrayShirt": "Chambray-skjorte",
"shrineProductSeabreezeSweater": "Havblå genser",
"shrineProductGentryJacket": "Gentry-jakke",
"shrineProductNavyTrousers": "Marineblå bukser",
"shrineProductWalterHenleyWhite": "Walter henley (hvit)",
"shrineProductSurfAndPerfShirt": "Surf and perf-skjorte",
"shrineProductGingerScarf": "Rødgult skjerf",
"shrineProductRamonaCrossover": "Ramona-crossover",
"shrineProductClassicWhiteCollar": "Klassisk hvit krage",
"shrineProductSunshirtDress": "Sunshirt-kjole",
"rallyAccountDetailDataInterestRate": "Rentesats",
"rallyAccountDetailDataAnnualPercentageYield": "Årlig avkastning i prosent",
"rallyAccountDataVacation": "Ferie",
"shrineProductFineLinesTee": "T-skjorte med fine linjer",
"rallyAccountDataHomeSavings": "Sparekonto for hjemmet",
"rallyAccountDataChecking": "Brukskonto",
"rallyAccountDetailDataInterestPaidLastYear": "Renter betalt i fjor",
"rallyAccountDetailDataNextStatement": "Neste kontoutskrift",
"rallyAccountDetailDataAccountOwner": "Kontoeier",
"rallyBudgetCategoryCoffeeShops": "Kafeer",
"rallyBudgetCategoryGroceries": "Dagligvarer",
"shrineProductCeriseScallopTee": "Ceriserød scallop-skjorte",
"rallyBudgetCategoryClothing": "Klær",
"rallySettingsManageAccounts": "Administrer kontoer",
"rallyAccountDataCarSavings": "Sparekonto for bil",
"rallySettingsTaxDocuments": "Avgiftsdokumenter",
"rallySettingsPasscodeAndTouchId": "Adgangskode og Touch ID",
"rallySettingsNotifications": "Varsler",
"rallySettingsPersonalInformation": "Personopplysninger",
"rallySettingsPaperlessSettings": "Papirløs-innstillinger",
"rallySettingsFindAtms": "Finn minibanker",
"rallySettingsHelp": "Hjelp",
"rallySettingsSignOut": "Logg av",
"rallyAccountTotal": "Sum",
"rallyBillsDue": "Skyldig",
"rallyBudgetLeft": "Gjenstår",
"rallyAccounts": "Kontoer",
"rallyBills": "Regninger",
"rallyBudgets": "Budsjetter",
"rallyAlerts": "Varsler",
"rallySeeAll": "SE ALLE",
"rallyFinanceLeft": "GJENSTÅR",
"rallyTitleOverview": "OVERSIKT",
"shrineProductShoulderRollsTee": "Shoulder rolls-t-skjorte",
"shrineNextButtonCaption": "NESTE",
"rallyTitleBudgets": "Budsjetter",
"rallyTitleSettings": "INNSTILLINGER",
"rallyLoginLoginToRally": "Logg på Rally",
"rallyLoginNoAccount": "Har du ikke konto?",
"rallyLoginSignUp": "REGISTRER DEG",
"rallyLoginUsername": "Brukernavn",
"rallyLoginPassword": "Passord",
"rallyLoginLabelLogin": "Logg på",
"rallyLoginRememberMe": "Husk meg",
"rallyLoginButtonLogin": "LOGG PÅ",
"rallyAlertsMessageHeadsUpShopping": "Obs! Du har brukt {percent} av handlebudsjettet ditt for denne måneden.",
"rallyAlertsMessageSpentOnRestaurants": "Du har brukt {amount} på restauranter denne uken.",
"rallyAlertsMessageATMFees": "Du har brukt {amount} på minibankgebyrer denne måneden.",
"rallyAlertsMessageCheckingAccount": "Godt gjort! Det er {percent} mer på brukskontoen din nå enn forrige måned.",
"shrineMenuCaption": "MENY",
"shrineCategoryNameAll": "ALLE",
"shrineCategoryNameAccessories": "TILBEHØR",
"shrineCategoryNameClothing": "KLÆR",
"shrineCategoryNameHome": "HJEMME",
"shrineLoginUsernameLabel": "Brukernavn",
"shrineLoginPasswordLabel": "Passord",
"shrineCancelButtonCaption": "AVBRYT",
"shrineCartTaxCaption": "Avgifter:",
"shrineCartPageCaption": "HANDLEKURV",
"shrineProductQuantity": "Antall: {quantity}",
"shrineProductPrice": "x {price}",
"shrineCartItemCount": "{quantity,plural,=0{INGEN VARER}=1{1 VARE}other{{quantity} VARER}}",
"shrineCartClearButtonCaption": "TØM HANDLEKURVEN",
"shrineCartTotalCaption": "SUM",
"shrineCartSubtotalCaption": "Delsum:",
"shrineCartShippingCaption": "Frakt:",
"shrineProductGreySlouchTank": "Grå løstsittende ermeløs skjorte",
"shrineProductStellaSunglasses": "Stella-solbriller",
"shrineProductWhitePinstripeShirt": "Hvit nålestripet skjorte",
"demoTextFieldWhereCanWeReachYou": "Hvor kan vi nå deg?",
"settingsTextDirectionLTR": "VTH",
"settingsTextScalingLarge": "Stor",
"demoBottomSheetHeader": "Topptekst",
"demoBottomSheetItem": "Vare {value}",
"demoBottomTextFieldsTitle": "Tekstfelter",
"demoTextFieldTitle": "Tekstfelter",
"demoTextFieldSubtitle": "Enkel linje med redigerbar tekst og redigerbare tall",
"demoTextFieldDescription": "Tekstfelt lar brukere skrive inn tekst i et UI. De vises vanligvis i skjemaer og dialogbokser.",
"demoTextFieldShowPasswordLabel": "Se passordet",
"demoTextFieldHidePasswordLabel": "Skjul passordet",
"demoTextFieldFormErrors": "Rett opp problemene i rødt før du sender inn.",
"demoTextFieldNameRequired": "Navn er obligatorisk.",
"demoTextFieldOnlyAlphabeticalChars": "Skriv bare inn alfabetiske tegn.",
"demoTextFieldEnterUSPhoneNumber": "(###) ###-#### – angi et amerikansk telefonnummer.",
"demoTextFieldEnterPassword": "Skriv inn et passord.",
"demoTextFieldPasswordsDoNotMatch": "Passordene er ikke like",
"demoTextFieldWhatDoPeopleCallYou": "Hva kaller folk deg?",
"demoTextFieldNameField": "Navn*",
"demoBottomSheetButtonText": "VIS FELT NEDERST",
"demoTextFieldPhoneNumber": "Telefonnummer*",
"demoBottomSheetTitle": "Felt nederst",
"demoTextFieldEmail": "E-postadresse",
"demoTextFieldTellUsAboutYourself": "Fortell oss om deg selv (f.eks. skriv ned det du gjør, eller hvilke hobbyer du har)",
"demoTextFieldKeepItShort": "Hold det kort. Dette er bare en demo.",
"starterAppGenericButton": "KNAPP",
"demoTextFieldLifeStory": "Livshistorie",
"demoTextFieldSalary": "Lønn",
"demoTextFieldUSD": "USD",
"demoTextFieldNoMoreThan": "Ikke mer enn 8 tegn.",
"demoTextFieldPassword": "Passord*",
"demoTextFieldRetypePassword": "Skriv inn passordet på nytt*",
"demoTextFieldSubmit": "SEND INN",
"demoBottomNavigationSubtitle": "Navigering nederst med overtoning",
"demoBottomSheetAddLabel": "Legg til",
"demoBottomSheetModalDescription": "Et modalfelt nederst er et alternativ til en meny eller dialogboks og forhindrer at brukeren samhandler med resten av appen.",
"demoBottomSheetModalTitle": "Modalfelt nederst",
"demoBottomSheetPersistentDescription": "Et vedvarende felt nederst viser informasjon som supplerer primærinnholdet i appen. Et vedvarende felt nederst er fremdeles synlig, selv når brukeren samhandler med andre deler av appen.",
"demoBottomSheetPersistentTitle": "Vedvarende felt nederst",
"demoBottomSheetSubtitle": "Vedvarende felt og modalfelt nederst",
"demoTextFieldNameHasPhoneNumber": "Telefonnummeret til {name} er {phoneNumber}",
"buttonText": "KNAPP",
"demoTypographyDescription": "Definisjoner for de forskjellige typografiske stilene som finnes i «material design».",
"demoTypographySubtitle": "Alle forhåndsdefinerte tekststiler",
"demoTypographyTitle": "Typografi",
"demoFullscreenDialogDescription": "Egenskapen fullscreenDialog angir hvorvidt den innkommende siden er en modaldialogboks i fullskjerm",
"demoFlatButtonDescription": "En flat knapp viser en blekkflekk når den trykkes, men løftes ikke. Bruk flate knapper i verktøyrader, dialogbokser og innebygd i utfylling",
"demoBottomNavigationDescription": "Navigasjonsrader nederst viser tre til fem destinasjoner nederst på en skjerm. Hver destinasjon representeres av et ikon og en valgfri tekstetikett. Når brukeren trykker på et ikon i navigeringen nederst, kommer vedkommende til navigeringsmålet på toppnivå som er knyttet til ikonet.",
"demoBottomNavigationSelectedLabel": "Valgt etikett",
"demoBottomNavigationPersistentLabels": "Vedvarende etiketter",
"starterAppDrawerItem": "Vare {value}",
"demoTextFieldRequiredField": "* indikerer at feltet er obligatorisk",
"demoBottomNavigationTitle": "Navigering nederst",
"settingsLightTheme": "Lyst",
"settingsTheme": "Tema",
"settingsPlatformIOS": "iOS",
"settingsPlatformAndroid": "Android",
"settingsTextDirectionRTL": "HTV",
"settingsTextScalingHuge": "Enorm",
"cupertinoButton": "Knapp",
"settingsTextScalingNormal": "Vanlig",
"settingsTextScalingSmall": "Liten",
"settingsSystemDefault": "System",
"settingsTitle": "Innstillinger",
"rallyDescription": "En app for privatøkonomi",
"aboutDialogDescription": "For å se kildekoden for denne appen, gå til {repoLink}.",
"bottomNavigationCommentsTab": "Kommentarer",
"starterAppGenericBody": "Brødtekst",
"starterAppGenericHeadline": "Overskrift",
"starterAppGenericSubtitle": "Undertittel",
"starterAppGenericTitle": "Tittel",
"starterAppTooltipSearch": "Søk",
"starterAppTooltipShare": "Del",
"starterAppTooltipFavorite": "Favoritt",
"starterAppTooltipAdd": "Legg til",
"bottomNavigationCalendarTab": "Kalender",
"starterAppDescription": "En responsiv startlayout",
"starterAppTitle": "Startapp",
"aboutFlutterSamplesRepo": "Flutter-prøver i GitHub-repositorium",
"bottomNavigationContentPlaceholder": "Plassholder for {title}-fanen",
"bottomNavigationCameraTab": "Kamera",
"bottomNavigationAlarmTab": "Alarm",
"bottomNavigationAccountTab": "Konto",
"demoTextFieldYourEmailAddress": "E-postadressen din",
"demoToggleButtonDescription": "Av/på-knapper kan brukes til å gruppere relaterte alternativer. For å fremheve grupper med relaterte av/på-knapper bør en gruppe dele en felles beholder",
"colorsGrey": "GRÅ",
"colorsBrown": "BRUN",
"colorsDeepOrange": "MØRK ORANSJE",
"colorsOrange": "ORANSJE",
"colorsAmber": "RAVGUL",
"colorsYellow": "GUL",
"colorsLime": "LIME",
"colorsLightGreen": "LYSEGRØNN",
"colorsGreen": "GRØNN",
"homeHeaderGallery": "Galleri",
"homeHeaderCategories": "Kategorier",
"shrineDescription": "En moteriktig handleapp",
"craneDescription": "En reiseapp med personlig preg",
"homeCategoryReference": "STILER OG ANNET",
"demoInvalidURL": "Kunne ikke vise nettadressen:",
"demoOptionsTooltip": "Alternativer",
"demoInfoTooltip": "Informasjon",
"demoCodeTooltip": "Demokode",
"demoDocumentationTooltip": "API-dokumentasjon",
"demoFullscreenTooltip": "Fullskjerm",
"settingsTextScaling": "Tekstskalering",
"settingsTextDirection": "Tekstretning",
"settingsLocale": "Lokalitet",
"settingsPlatformMechanics": "Plattformsfunksjoner",
"settingsDarkTheme": "Mørkt",
"settingsSlowMotion": "Sakte film",
"settingsAbout": "Om Flutter Gallery",
"settingsFeedback": "Send tilbakemelding",
"settingsAttribution": "Designet av TOASTER i London",
"demoButtonTitle": "Knapper",
"demoButtonSubtitle": "Tekst, fremhevet, med omriss med mer",
"demoFlatButtonTitle": "Flat knapp",
"demoRaisedButtonDescription": "Hevede knapper gir dimensjon til oppsett som hovedsakelig er flate. De fremhever funksjoner på tettpakkede eller store områder.",
"demoRaisedButtonTitle": "Hevet knapp",
"demoOutlineButtonTitle": "Omriss-knapp",
"demoOutlineButtonDescription": "Omriss-knapper blir ugjennomskinnelige og hevet når de trykkes. De er ofte koblet til hevede knapper for å indikere en alternativ, sekundær handling.",
"demoToggleButtonTitle": "Av/på-knapper",
"colorsTeal": "BLÅGRØNN",
"demoFloatingButtonTitle": "Svevende handlingsknapp",
"demoFloatingButtonDescription": "En svevende handlingsknapp er en knapp med rundt ikon som ligger over innhold og gir enkel tilgang til en hovedhandling i appen.",
"demoDialogTitle": "Dialogbokser",
"demoDialogSubtitle": "Enkel, varsel og fullskjerm",
"demoAlertDialogTitle": "Varsel",
"demoAlertDialogDescription": "En varseldialogboks som informerer brukeren om situasjoner som krever bekreftelse. Varseldialogbokser har en valgfri tittel og en valgfri liste over handlinger.",
"demoAlertTitleDialogTitle": "Varsel med tittel",
"demoSimpleDialogTitle": "Enkel",
"demoSimpleDialogDescription": "En enkel dialogboks gir brukeren et valg mellom flere alternativer. En enkel dialogboks har en valgfri tittel som vises over valgene.",
"demoFullscreenDialogTitle": "Fullskjerm",
"demoCupertinoButtonsTitle": "Knapper",
"demoCupertinoButtonsSubtitle": "Knapper i iOS-stil",
"demoCupertinoButtonsDescription": "En knapp i iOS-stil. Den bruker tekst og/eller et ikon som tones ut og inn ved berøring. Kan ha en bakgrunn.",
"demoCupertinoAlertsTitle": "Varsler",
"demoCupertinoAlertsSubtitle": "Dialogbokser for varsler i iOS-stil",
"demoCupertinoAlertTitle": "Varsel",
"demoCupertinoAlertDescription": "En varseldialogboks som informerer brukeren om situasjoner som krever bekreftelse. Varseldialogbokser har en valgfri tittel, valgfritt innhold og en valgfri liste over handlinger. Tittelen vises over innholdet, og handlingene vises under innholdet.",
"demoCupertinoAlertWithTitleTitle": "Varsel med tittel",
"demoCupertinoAlertButtonsTitle": "Varsel med knapper",
"demoCupertinoAlertButtonsOnlyTitle": "Bare varselknapper",
"demoCupertinoActionSheetTitle": "Handlingsark",
"demoCupertinoActionSheetDescription": "Et handlingsark er en spesifikk varseltype som gir brukeren et sett med to eller flere valg knyttet til nåværende kontekst. Et handlingsark kan ha en tittel, en ekstra melding og en liste over handlinger.",
"demoColorsTitle": "Farger",
"demoColorsSubtitle": "Alle de forhåndsdefinerte fargene",
"demoColorsDescription": "Konstante farger og fargekart som representerer fargepaletten for «material design».",
"buttonTextEnabled": "ENABLED",
"buttonTextDisabled": "DISABLED",
"buttonTextCreate": "Opprett",
"dialogSelectedOption": "Du valgte «{value}»",
"dialogDiscardTitle": "Vil du forkaste utkastet?",
"dialogLocationTitle": "Vil du bruke Googles posisjonstjeneste?",
"dialogLocationDescription": "La Google hjelpe apper med å fastslå posisjoner. Dette betyr å sende anonyme posisjonsdata til Google, selv når ingen apper kjører.",
"dialogCancel": "AVBRYT",
"dialogDiscard": "FORKAST",
"dialogDisagree": "AVSLÅ",
"dialogAgree": "GODTA",
"dialogSetBackup": "Velg konto for sikkerhetskopi",
"colorsBlueGrey": "BLÅGRÅ",
"dialogShow": "VIS DIALOGBOKS",
"dialogFullscreenTitle": "Dialogboks i fullskjerm",
"dialogFullscreenSave": "LAGRE",
"dialogFullscreenDescription": "En demonstrasjon av dialogboks i fullskjerm",
"cupertinoButtonEnabled": "Enabled",
"cupertinoButtonDisabled": "Disabled",
"cupertinoButtonWithBackground": "Med bakgrunn",
"cupertinoAlertCancel": "Avbryt",
"cupertinoAlertDiscard": "Forkast",
"cupertinoAlertLocationTitle": "Vil du gi «Maps» tilgang til posisjonen din når du bruker appen?",
"cupertinoAlertLocationDescription": "Den nåværende posisjonen din vises på kartet og brukes til veibeskrivelser, søkeresultater i nærheten og beregnede reisetider.",
"cupertinoAlertAllow": "Tillat",
"cupertinoAlertDontAllow": "Ikke tillat",
"cupertinoAlertFavoriteDessert": "Velg favorittdessert",
"cupertinoAlertDessertDescription": "Velg favorittdesserten din fra listen nedenfor. Valget ditt brukes til å tilpasse listen over foreslåtte spisesteder i området ditt.",
"cupertinoAlertCheesecake": "Ostekake",
"cupertinoAlertTiramisu": "Tiramisu",
"cupertinoAlertApplePie": "Eplekake",
"cupertinoAlertChocolateBrownie": "Sjokolade-brownie",
"cupertinoShowAlert": "Vis varsel",
"colorsRed": "RØD",
"colorsPink": "ROSA",
"colorsPurple": "LILLA",
"colorsDeepPurple": "MØRK LILLA",
"colorsIndigo": "INDIGO",
"colorsBlue": "BLÅ",
"colorsLightBlue": "LYSEBLÅ",
"colorsCyan": "TURKIS",
"dialogAddAccount": "Legg til en konto",
"Gallery": "Galleri",
"Categories": "Kategorier",
"SHRINE": "HELLIGDOM",
"Basic shopping app": "Grunnleggende shoppingapp",
"RALLY": "RALLY",
"CRANE": "KRAN",
"Travel app": "Reiseapp",
"MATERIAL": "MATERIELL",
"CUPERTINO": "CUPERTINO",
"REFERENCE STYLES & MEDIA": "REFERANSESTILER OG MEDIA"
}
| gallery/lib/l10n/intl_nb.arb/0 | {
"file_path": "gallery/lib/l10n/intl_nb.arb",
"repo_id": "gallery",
"token_count": 18970
} | 812 |
{
"loading": "Učitava se",
"deselect": "Opozovi izbor",
"select": "Izaberi",
"selectable": "Može da se izabere (dugi pritisak)",
"selected": "Izabrano je",
"demo": "Demo verzija",
"bottomAppBar": "Donja traka sa aplikacijama",
"notSelected": "Nije izabrano",
"demoCupertinoSearchTextFieldTitle": "Polje za tekst pretrage",
"demoCupertinoPicker": "Birač",
"demoCupertinoSearchTextFieldSubtitle": "Polje za tekst pretrage u iOS stilu",
"demoCupertinoSearchTextFieldDescription": "Polje za tekst pretrage koje omogućava korisniku da pretražuje unosom teksta i koje može da nudi i filtrira predloge.",
"demoCupertinoSearchTextFieldPlaceholder": "Unesite neki tekst",
"demoCupertinoScrollbarTitle": "Traka za pomeranje",
"demoCupertinoScrollbarSubtitle": "Traka za pomeranje u iOS stilu",
"demoCupertinoScrollbarDescription": "Traka za pomeranje koja prekriva podređeni element",
"demoTwoPaneItem": "Stavka {value}",
"demoTwoPaneList": "Lista",
"demoTwoPaneFoldableLabel": "Na preklop",
"demoTwoPaneSmallScreenLabel": "Mali ekran",
"demoTwoPaneSmallScreenDescription": "Ovako se TwoPane ponaša na uređaju sa malim ekranom.",
"demoTwoPaneTabletLabel": "Tableti i računari",
"demoTwoPaneTabletDescription": "Ovako se TwoPane ponaša na većem ekranu, poput onih na tabletu ili računaru.",
"demoTwoPaneTitle": "TwoPane",
"demoTwoPaneSubtitle": "Prilagodljivi rasporedi na uređajima na prekom, velikim i malim ekranima",
"splashSelectDemo": "Izaberite demonstraciju",
"demoTwoPaneFoldableDescription": "Ovako se TwoPane ponaša na uređaju na preklop.",
"demoTwoPaneDetails": "Detalji",
"demoTwoPaneSelectItem": "Izaberite stavku",
"demoTwoPaneItemDetails": "Detalji stavke {value}",
"demoCupertinoContextMenuActionText": "Dodirnite i zadržite Flutter logotip da biste videli kontekstualni meni.",
"demoCupertinoContextMenuDescription": "Kontekstualni meni preko celog ekrana u iOS stilu koji se prikazuje po dugom pritisku elementa.",
"demoAppBarTitle": "Traka aplikacije",
"demoAppBarDescription": "Ova traka aplikacije pruža sadržaj i radnje u vezi sa aktuelnim ekranom. Koristi se za brendiranje, naslove ekrana, navigaciju i radnje",
"demoDividerTitle": "Razdelnik",
"demoDividerSubtitle": "Razdelnik je tanka linija koja grupiše sadržaj u liste i rasporede.",
"demoDividerDescription": "Razdelnici mogu da se koriste za liste, fioke i na drugim mestima za razdvajanje sadržaja.",
"demoVerticalDividerTitle": "Vertikalni razdelnik",
"demoCupertinoContextMenuTitle": "Kontekstualni meni",
"demoCupertinoContextMenuSubtitle": "Kontekstualni meni u iOS stilu",
"demoAppBarSubtitle": "Prikazuje informacije i radnje u vezi sa aktuelnim ekranom",
"demoCupertinoContextMenuActionOne": "Prva radnja",
"demoCupertinoContextMenuActionTwo": "Druga radnja",
"demoDateRangePickerDescription": "Prikazuje dijalog sa biračem datuma materijalnog dizajna.",
"demoDateRangePickerTitle": "Birač perioda",
"demoNavigationDrawerUserName": "Korisničko ime",
"demoNavigationDrawerUserEmail": "[email protected]",
"demoNavigationDrawerText": "Prevucite od ivice ili dodirnite ikonu u gornjem levom uglu da biste videli fioku",
"demoNavigationRailTitle": "Pruga za navigaciju",
"demoNavigationRailSubtitle": "Prikazuje prugu za navigaciju u aplikaciji",
"demoNavigationRailDescription": "Vidžet materijalnog dizajna koji treba da se prikazuje levo ili desno u aplikaciji radi kretanja između malog broja prikaza, obično između tri i pet.",
"demoNavigationRailFirst": "Prva",
"demoNavigationDrawerTitle": "Fioka za navigaciju",
"demoNavigationRailThird": "Treća",
"replyStarredLabel": "Sa zvezdicom",
"demoTextButtonDescription": "Kada se pritisne, dugme za tekst prikazuje mrlju boje, ali se ne podiže. Dugmad za tekst koristite na trakama s alatkama, u dijalozima i u tekstu sa razmakom",
"demoElevatedButtonTitle": "Izdignuto dugme",
"demoElevatedButtonDescription": "Izdignuta dugmad pruža trodimenzionalni izgled ravnom prikazu. Ona naglašava funkcije u širokim prostorima ili onima sa puno elemenata.",
"demoOutlinedButtonTitle": "Oivičeno dugme",
"demoOutlinedButtonDescription": "Oivičena dugmad postaje neprozirna i podiže se kada se pritisne. Obično se uparuje zajedno sa izdignutom dugmadi da bi označila alternativnu, sekundarnu radnju.",
"demoContainerTransformDemoInstructions": "Kartice, liste i plutajuće dugme za radnju",
"demoNavigationDrawerSubtitle": "Prikazuje fioku na traci sa aplikacijama",
"replyDescription": "Efikasna, fokusirana aplikacija za imejl",
"demoNavigationDrawerDescription": "Okno Materijalni dizajn koje se prevlači horizontalno od ivice ekrana radi prikazivanja linkova za navigaciju u aplikaciji.",
"replyDraftsLabel": "Radne verzije",
"demoNavigationDrawerToPageOne": "Prva stavka",
"replyInboxLabel": "Prijemno sanduče",
"demoSharedXAxisDemoInstructions": "Dugmad Dalje i Nazad",
"replySpamLabel": "Nepoželjno",
"replyTrashLabel": "Otpad",
"replySentLabel": "Poslato",
"demoNavigationRailSecond": "Druga",
"demoNavigationDrawerToPageTwo": "Druga stavka",
"demoFadeScaleDemoInstructions": "Modalno i plutajuće dugme za radnju",
"demoFadeThroughDemoInstructions": "Donja navigacija",
"demoSharedZAxisDemoInstructions": "Dugme ikone Podešavanja",
"demoSharedYAxisDemoInstructions": "Sortiraj po kriterijumu Nedavno slušano",
"demoTextButtonTitle": "Dugme za tekst",
"demoSharedZAxisBeefSandwichRecipeTitle": "Sendvič sa govedinom",
"demoSharedZAxisDessertRecipeDescription": "Recept za dezert",
"demoSharedYAxisAlbumTileSubtitle": "Izvođač",
"demoSharedYAxisAlbumTileTitle": "Album",
"demoSharedYAxisRecentSortTitle": "Nedavno slušano",
"demoSharedYAxisAlphabeticalSortTitle": "A–Z",
"demoSharedYAxisAlbumCount": "268 albuma",
"demoSharedYAxisTitle": "Zajednička Y osa",
"demoSharedXAxisCreateAccountButtonText": "OTVORI NALOG",
"demoFadeScaleAlertDialogDiscardButton": "ODBACI",
"demoSharedXAxisSignInTextFieldLabel": "Imejl ili broj telefona",
"demoSharedXAxisSignInSubtitleText": "Prijavite se pomoću naloga",
"demoSharedXAxisSignInWelcomeText": "Zdravo, Dejvid Park",
"demoSharedXAxisIndividualCourseSubtitle": "Prikazuje se pojedinačno",
"demoSharedXAxisBundledCourseSubtitle": "U paketu",
"demoFadeThroughAlbumsDestination": "Albumi",
"demoSharedXAxisDesignCourseTitle": "Dizajn",
"demoSharedXAxisIllustrationCourseTitle": "Ilustracija",
"demoSharedXAxisBusinessCourseTitle": "Poslovanje",
"demoSharedXAxisArtsAndCraftsCourseTitle": "Umetnost i zanati",
"demoMotionPlaceholderSubtitle": "Sekundarni tekst",
"demoFadeScaleAlertDialogCancelButton": "OTKAŽI",
"demoFadeScaleAlertDialogHeader": "Dijalog obaveštenja",
"demoFadeScaleHideFabButton": "SAKRIJ PLUTAJUĆE DUGME ZA RADNJU",
"demoFadeScaleShowFabButton": "PRIKAŽI PLUTAJUĆE DUGME ZA RADNJU",
"demoFadeScaleShowAlertDialogButton": "PRIKAŽI ISKAČUĆI PROZOR",
"demoFadeScaleDescription": "Šablon postepenog pojavljivanja i nestajanja se koristi za elemente korisničkog sistema koji se pojavljuju ili nestaju unutar granica ekrana, poput dijaloga koji se postepeno pojavljuje i nestaje u centru ekrana.",
"demoFadeScaleTitle": "Postepeno pojavljivanje i nestajanje",
"demoFadeThroughTextPlaceholder": "123 slike",
"demoFadeThroughSearchDestination": "Pretraga",
"demoFadeThroughPhotosDestination": "Slike",
"demoSharedXAxisCoursePageSubtitle": "Kategorije u paketu se prikazuju kao grupe u fidu. Ovo možete da promenite kad god poželite.",
"demoFadeThroughDescription": "Šablon postepenog prelaza se koristi za prelaz između elemenata korisničkog interfejsa koji nemaju jak međusobni odnos.",
"demoFadeThroughTitle": "Postepeni prelaz",
"demoSharedZAxisHelpSettingLabel": "Pomoć",
"demoMotionSubtitle": "Svi unapred definisani šabloni prelaza",
"demoSharedZAxisNotificationSettingLabel": "Obaveštenja",
"demoSharedZAxisProfileSettingLabel": "Profil",
"demoSharedZAxisSavedRecipesListTitle": "Sačuvani recepti",
"demoSharedZAxisBeefSandwichRecipeDescription": "Recept za sendvič sa govedinom",
"demoSharedZAxisCrabPlateRecipeDescription": "Recept za jelo sa rakovima",
"demoSharedXAxisCoursePageTitle": "Poboljšajte organizaciju kurseva",
"demoSharedZAxisCrabPlateRecipeTitle": "Rak",
"demoSharedZAxisShrimpPlateRecipeDescription": "Recept za jelo sa škampima",
"demoSharedZAxisShrimpPlateRecipeTitle": "Škamp",
"demoContainerTransformTypeFadeThrough": "POSTEPENI PRELAZ",
"demoSharedZAxisDessertRecipeTitle": "Dezert",
"demoSharedZAxisSandwichRecipeDescription": "Recept za sendvič",
"demoSharedZAxisSandwichRecipeTitle": "Sendvič",
"demoSharedZAxisBurgerRecipeDescription": "Recept za pljeskavicu",
"demoSharedZAxisBurgerRecipeTitle": "Pljeskavica",
"demoSharedZAxisSettingsPageTitle": "Podešavanja",
"demoSharedZAxisTitle": "Zajednička Z osa",
"demoSharedZAxisPrivacySettingLabel": "Privatnost",
"demoMotionTitle": "Pokret",
"demoContainerTransformTitle": "Transformisanje kontejnera",
"demoContainerTransformDescription": "Šablon transformisanja kontejnera je napravljen za prelaz između elemenata korisničkog interfejsa koji sadrže kontejner. Ovaj šablon pravi vidljivu vezu između dva elementa korisničkog interfejsa",
"demoContainerTransformModalBottomSheetTitle": "Režim postepenog pojavljivanja i nestajanja",
"demoContainerTransformTypeFade": "POSTEPENO POJAVLJIVANJE I NESTAJANJE",
"demoSharedYAxisAlbumTileDurationUnit": "min",
"demoMotionPlaceholderTitle": "Naslov",
"demoSharedXAxisForgotEmailButtonText": "ZABORAVILI STE IMEJL?",
"demoMotionSmallPlaceholderSubtitle": "Sekundarno",
"demoMotionDetailsPageTitle": "Stranica sa detaljima",
"demoMotionListTileTitle": "Stavka liste",
"demoSharedAxisDescription": "Šablon zajedničke ose se koristi za prelaz između elemenata korisničkog interfejsa koji imaju prostorni ili navigacioni odnos. Ovaj šablon koristi zajedničku transformaciju po X, Y ili Z osi za naglašavanje odnosa između elemenata.",
"demoSharedXAxisTitle": "Zajednička X osa",
"demoSharedXAxisBackButtonText": "NAZAD",
"demoSharedXAxisNextButtonText": "DALJE",
"demoSharedXAxisCulinaryCourseTitle": "Kulinarstvo",
"githubRepo": "{repoName} GitHub skladište",
"fortnightlyMenuUS": "SAD",
"fortnightlyMenuBusiness": "Biznis",
"fortnightlyMenuScience": "Nauka",
"fortnightlyMenuSports": "Sport",
"fortnightlyMenuTravel": "Putovanja",
"fortnightlyMenuCulture": "Kultura",
"fortnightlyTrendingTechDesign": "TechDesign",
"rallyBudgetDetailAmountLeft": "Preostali iznos",
"fortnightlyHeadlineArmy": "Reformisanje Zelene armije iznutra",
"fortnightlyDescription": "Aplikacija za vesti fokusirana na sadržaj",
"rallyBillDetailAmountDue": "Iznos zaduženja",
"rallyBudgetDetailTotalCap": "Ukupno ograničenje",
"rallyBudgetDetailAmountUsed": "Iskorišćeni iznos",
"fortnightlyTrendingHealthcareRevolution": "HealthcareRevolution",
"fortnightlyMenuFrontPage": "Naslovna stranica",
"fortnightlyMenuWorld": "Svet",
"rallyBillDetailAmountPaid": "Plaćeni iznos",
"fortnightlyMenuPolitics": "Politika",
"fortnightlyHeadlineBees": "Nedostaju pčele za farme",
"fortnightlyHeadlineGasoline": "Budućnost benzina",
"fortnightlyTrendingGreenArmy": "GreenArmy",
"fortnightlyHeadlineFeminists": "Feministkinje se bave politikom",
"fortnightlyHeadlineFabrics": "Dizajneri koriste tehnologiju da bi pravili futurističke tkanine",
"fortnightlyHeadlineStocks": "Dok akcije stagniraju, mnogi se okreću valuti",
"fortnightlyTrendingReform": "Reform",
"fortnightlyMenuTech": "Tehnologija",
"fortnightlyHeadlineWar": "Razdvojeni američki životi tokom rata",
"fortnightlyHeadlineHealthcare": "Tiha, ali moćna revolucija zdravstvenog sistema",
"fortnightlyLatestUpdates": "Najnovije vesti",
"fortnightlyTrendingStocks": "Stocks",
"rallyBillDetailTotalAmount": "Ukupan iznos",
"demoCupertinoPickerDateTime": "Datum i vreme",
"signIn": "PRIJAVITE SE",
"dataTableRowWithSugar": "{value} sa šećerom",
"dataTableRowApplePie": "Pita od jabuka",
"dataTableRowDonut": "Krofna",
"dataTableRowHoneycomb": "Saće",
"dataTableRowLollipop": "Lizalica",
"dataTableRowJellyBean": "Žele bombona",
"dataTableRowGingerbread": "Medenjak",
"dataTableRowCupcake": "Mafin",
"dataTableRowEclair": "Ekler",
"dataTableRowIceCreamSandwich": "Sladoled sendvič",
"dataTableRowFrozenYogurt": "Zamrznut jogurt",
"dataTableColumnIron": "Gvožđe (%)",
"dataTableColumnCalcium": "Kalcijum (%)",
"dataTableColumnSodium": "Natrijum (mg)",
"demoTimePickerTitle": "Birač vremena",
"demo2dTransformationsResetTooltip": "Resetujte transformacije",
"dataTableColumnFat": "Masti (g)",
"dataTableColumnCalories": "Kalorije",
"dataTableColumnDessert": "Dezert (1 porcija)",
"cardsDemoTravelDestinationLocation1": "Tandžavur, Tamil Nadu",
"demoTimePickerDescription": "Prikazuje dijalog sa biračem vremena materijalnog dizajna.",
"demoPickersShowPicker": "PRIKAŽI BIRAČ",
"demoTabsScrollingTitle": "Pomeranje",
"demoTabsNonScrollingTitle": "Bez pomeranja",
"craneHours": "{hours,plural,=1{1 č}few{{hours} č}other{{hours} č}}",
"craneMinutes": "{minutes,plural,=1{1 m}few{{minutes} m}other{{minutes} m}}",
"craneFlightDuration": "{hoursShortForm} {minutesShortForm}",
"dataTableHeader": "Ishrana",
"demoDatePickerTitle": "Birač datuma",
"demoPickersSubtitle": "Biranje datuma i vremena",
"demoPickersTitle": "Birači",
"demo2dTransformationsEditTooltip": "Izmenite deo slike",
"demoDataTableDescription": "Tabele sa podacima prikazuju informacije u obliku mreže sa redovima i kolonama. U njima su informacije organizovane tako da mogu lako da se pregledaju i da bi korisnici mogli da traže šablone i uvide.",
"demo2dTransformationsDescription": "Dodirnite da biste izmenili delove slike i koristite pokrete da biste se kretali po sceni. Prevucite da biste pomerali, skupite prste da biste zumirali i rotirajte pomoću dva prsta. Pritisnite dugme za resetovanje da biste se vratili na početni položaj.",
"demo2dTransformationsSubtitle": "Pomeranje, zumiranje, rotiranje",
"demo2dTransformationsTitle": "2D transformacije",
"demoCupertinoTextFieldPIN": "PIN",
"demoCupertinoTextFieldDescription": "Polje za unos teksta omogućava korisniku da unosi tekst pomoću fizičke tastature ili tastature na ekranu.",
"demoCupertinoTextFieldSubtitle": "Polja za unos teksta u iOS stilu",
"demoCupertinoTextFieldTitle": "Polja za unos teksta",
"demoDatePickerDescription": "Prikazuje dijalog sa biračem datuma materijalnog dizajna.",
"demoCupertinoPickerTime": "Vreme",
"demoCupertinoPickerDate": "Datum",
"demoCupertinoPickerTimer": "Tajmer",
"demoCupertinoPickerDescription": "Vidžet birača u iOS stilu koji može da se koristi za biranje stringova, datuma, vremena ili i datuma i vremena.",
"demoCupertinoPickerSubtitle": "Birači u iOS stilu",
"demoCupertinoPickerTitle": "Birači",
"dataTableRowWithHoney": "{value} sa medom",
"cardsDemoTravelDestinationCity2": "Četinad",
"bannerDemoResetText": "Resetuj baner",
"bannerDemoMultipleText": "Više radnji",
"bannerDemoLeadingText": "Početna ikona",
"dismiss": "ODBACI",
"cardsDemoTappable": "Može da se dodirne",
"cardsDemoSelectable": "Može da se izabere (dugi pritisak)",
"cardsDemoExplore": "Istražite",
"cardsDemoExploreSemantics": "Istražite: {destinationName}",
"cardsDemoShareSemantics": "Delite: {destinationName}",
"cardsDemoTravelDestinationTitle1": "Najpopularnijih 10 gradova koje treba da posetite u Tamil Naduu",
"cardsDemoTravelDestinationDescription1": "10. mesto",
"cardsDemoTravelDestinationCity1": "Tandžavur",
"dataTableColumnProtein": "Proteini (g)",
"cardsDemoTravelDestinationTitle2": "Zanatlije južne Indije",
"cardsDemoTravelDestinationDescription2": "Proizvođači svile",
"bannerDemoText": "Lozinka je ažurirana na drugom uređaju. Prijavite se ponovo.",
"cardsDemoTravelDestinationLocation2": "Sivaganga, Tamil Nadu",
"cardsDemoTravelDestinationTitle3": "Hram Brihadisvara",
"cardsDemoTravelDestinationDescription3": "Hramovi",
"demoBannerTitle": "Baner",
"demoBannerSubtitle": "Prikazuje baner u okviru liste",
"demoBannerDescription": "Baner prikazuje važnu, sažetu poruku i navodi radnje koje korisnici mogu da obave (ili mogu da odbace baner). Neophodno je da korisnik obavi radnju odbacivanja.",
"demoCardTitle": "Kartice",
"demoCardSubtitle": "Osnovne kartice sa zaobljenim uglovima",
"demoCardDescription": "Kartica je element materijalnog dizajna koji se koristi za predstavljanje srodnih informacija, na primer, albuma, geografske lokacije, obroka, podataka za kontakt itd.",
"demoDataTableTitle": "Tabele sa podacima",
"demoDataTableSubtitle": "Redovi i kolone sa informacijama",
"dataTableColumnCarbs": "Ugljeni hidrati (g)",
"placeTanjore": "Tandžavur",
"demoGridListsTitle": "Liste u obliku koordinatnih mreža",
"placeFlowerMarket": "Cvetna pijaca",
"placeBronzeWorks": "Bronzani radovi",
"placeMarket": "Pijaca",
"placeThanjavurTemple": "Hram u Tandžavuru",
"placeSaltFarm": "Solana",
"placeScooters": "Skuteri",
"placeSilkMaker": "Proizvođač svile",
"placeLunchPrep": "Spremanje ručka",
"placeBeach": "Plaža",
"placeFisherman": "Ribar",
"demoMenuSelected": "Izabrano: {value}",
"demoMenuRemove": "Ukloni",
"demoMenuGetLink": "Preuzmi link",
"demoMenuShare": "Deli",
"demoBottomAppBarSubtitle": "Prikazuje navigaciju i radnje u dnu",
"demoMenuAnItemWithASectionedMenu": "Stavka sa menijem sa odeljcima",
"demoMenuADisabledMenuItem": "Onemogućena stavka menija",
"demoLinearProgressIndicatorTitle": "Linearni indikator napretka",
"demoMenuContextMenuItemOne": "Prva stavka kontekstualnog menija",
"demoMenuAnItemWithASimpleMenu": "Stavka sa jednostavnim menijem",
"demoCustomSlidersTitle": "Prilagođeni klizači",
"demoMenuAnItemWithAChecklistMenu": "Stavka sa menijem sa kontrolnim listama",
"demoCupertinoActivityIndicatorTitle": "Indikator aktivnosti",
"demoCupertinoActivityIndicatorSubtitle": "Indikatori aktivnosti u iOS stilu",
"demoCupertinoActivityIndicatorDescription": "Indikator aktivnosti u iOS stilu koji se okreće u smeru kretanja kazaljke na satu",
"demoCupertinoNavigationBarTitle": "Traka za navigaciju",
"demoCupertinoNavigationBarSubtitle": "Traka za navigaciju u iOS stilu",
"demoCupertinoNavigationBarDescription": "Traka za navigaciju sa iOS stilom. Traka za navigaciju je traka s alatkama koja u najgorem slučaju sadrži samo naslov stranice na sredini.",
"demoCupertinoPullToRefreshTitle": "Povucite da biste osvežili",
"demoCupertinoPullToRefreshSubtitle": "Kontrola za povlačenje radi osvežavanja u iOS stilu",
"demoCupertinoPullToRefreshDescription": "Vidžet koji primenjuje kontrolu za povlačenje radi osvežavanja sadržaja u iOS stilu.",
"demoProgressIndicatorTitle": "Indikatori napretka",
"demoProgressIndicatorSubtitle": "Linearni, kružni, neodređeni",
"demoCircularProgressIndicatorTitle": "Kružni indikator napretka",
"demoCircularProgressIndicatorDescription": "Kružni indikator napretka materijalnog dizajna koji se okreće da bi pokazao da je aplikacija zauzeta.",
"demoMenuFour": "Četiri",
"demoLinearProgressIndicatorDescription": "Linearni indikator napretka materijalnog dizajna, poznat i kao traka napretka.",
"demoTooltipTitle": "Objašnjenja",
"demoTooltipSubtitle": "Kratka poruka koja se prikazuje pri dugom pritisku ili prelasku kursorom",
"demoTooltipDescription": "Objašnjenja pružaju tekstualne oznake koje objašnjavaju funkciju dugmeta ili neke druge radnje u korisničkom interfejsu. Objašnjenja prikazuju informativni tekst kada korisnici prelaze kursorom preko elementa, odnosno kada se fokusiraju na njega ili ga dugo pritiskaju.",
"demoTooltipInstructions": "Dugo pritiskajte element ili pređite kursorom preko njega da bi se prikazalo objašnjenje.",
"placeChennai": "Čenaj",
"demoMenuChecked": "Označeno: {value}",
"placeChettinad": "Četinad",
"demoMenuPreview": "Pregled",
"demoBottomAppBarTitle": "Donja traka sa aplikacijama",
"demoBottomAppBarDescription": "Donje trake sa aplikacijama pružaju pristup donjoj fioki za navigaciju i najviše četiri radnje, uključujući plutajuće dugme za radnju.",
"bottomAppBarNotch": "Urez",
"bottomAppBarPosition": "Položaj plutajućeg dugmeta za radnju",
"bottomAppBarPositionDockedEnd": "Na traci sa aplikacijama – na kraju",
"bottomAppBarPositionDockedCenter": "Na traci sa aplikacijama – u sredini",
"bottomAppBarPositionFloatingEnd": "Plutanje – na kraju",
"bottomAppBarPositionFloatingCenter": "Plutanje – u sredini",
"demoSlidersEditableNumericalValue": "Numerička vrednost koja može da se izmeni",
"demoGridListsSubtitle": "Izgled sa redovima i kolonama",
"demoGridListsDescription": "Liste u obliku koordinatnih mreža su najbolje za prikazivanje homogenih podataka, najčešće slika. Svaka stavka na listi u obliku koordinatne mreže se zove pločica.",
"demoGridListsImageOnlyTitle": "Samo slike",
"demoGridListsHeaderTitle": "Sa zaglavljem",
"demoGridListsFooterTitle": "Sa podnožjem",
"demoSlidersTitle": "Klizači",
"demoSlidersSubtitle": "Vidžeti za biranje vrednosti prevlačenjem prstom",
"demoSlidersDescription": "Klizači odražavaju opseg vrednosti na traci, a korisnici mogu da izaberu jednu vrednost. Idealni su za prilagođavanje podešavanja kao što su jačina zvuka, osvetljenost ili primena filtera za slike.",
"demoRangeSlidersTitle": "Klizači opsega",
"demoRangeSlidersDescription": "Klizači odražavaju opseg vrednosti na traci. Mogu da imaju ikone na oba kraja trake koji odražavaju opseg vrednosti. Idealni su za prilagođavanje podešavanja kao što su jačina zvuka, osvetljenost ili primena filtera za slike.",
"demoMenuAnItemWithAContextMenuButton": "Stavka sa kontekstualnim menijem",
"demoCustomSlidersDescription": "Klizači odražavaju opseg vrednosti na traci, a korisnici mogu da izaberu jednu vrednost ili opseg vrednosti. Klizači mogu da imaju temu i da se prilagode.",
"demoSlidersContinuousWithEditableNumericalValue": "Neprekidan sa numeričkom vrednošću koja može da se izmeni",
"demoSlidersDiscrete": "Diskretan",
"demoSlidersDiscreteSliderWithCustomTheme": "Diskretan klizač sa prilagođenom temom",
"demoSlidersContinuousRangeSliderWithCustomTheme": "Neprekidan klizač opsega sa prilagođenom temom",
"demoSlidersContinuous": "Neprekidan",
"placePondicherry": "Pondišeri",
"demoMenuTitle": "Meni",
"demoContextMenuTitle": "Kontekstualni meni",
"demoSectionedMenuTitle": "Meni sa odeljcima",
"demoSimpleMenuTitle": "Jednostavni meni",
"demoChecklistMenuTitle": "Meni sa kontrolnim listama",
"demoMenuSubtitle": "Dugmad menija i jednostavni meniji",
"demoMenuDescription": "Meni prikazuje listu opcija na privremenoj površini. One se prikazuju kada korisnici ostvaruju interakciju sa dugmetom, radnjom ili drugom kontrolom.",
"demoMenuItemValueOne": "Prva stavka menija",
"demoMenuItemValueTwo": "Druga stavka menija",
"demoMenuItemValueThree": "Treća stavka menija",
"demoMenuOne": "Jedan",
"demoMenuTwo": "Dva",
"demoMenuThree": "Tri",
"demoMenuContextMenuItemThree": "Treća stavka kontekstualnog menija",
"demoCupertinoSwitchSubtitle": "Prekidač u iOS stilu",
"demoSnackbarsText": "Ovo je traka za obaveštenja.",
"demoCupertinoSliderSubtitle": "Klizač u iOS stilu",
"demoCupertinoSliderDescription": "Klizač može da se koristi da biste izabrali neprekidan ili diskretan skup vrednosti.",
"demoCupertinoSliderContinuous": "Neprekidno: {value}",
"demoCupertinoSliderDiscrete": "Diskretno: {value}",
"demoSnackbarsAction": "Pritisnuli ste radnju trake za obaveštenja.",
"backToGallery": "Nazad u galeriju",
"demoCupertinoTabBarTitle": "Traka sa karticama",
"demoCupertinoSwitchDescription": "Prekidač se koristi za uključivanje/isključivanje pojedinačnih podešavanja.",
"demoSnackbarsActionButtonLabel": "RADNJA",
"cupertinoTabBarProfileTab": "Profil",
"demoSnackbarsButtonLabel": "PRIKAZUJ TRAKU ZA OBAVEŠTENJA",
"demoSnackbarsDescription": "Trake za obaveštenja obaveštavaju korisnike o procesu koji je neka aplikacija obavila ili će obaviti. Privremeno se prikazuju u dnu ekrana. Ne bi trebalo da ometaju korisnički doživljaj i ne zahtevaju aktivnost korisnika da bi nestale.",
"demoSnackbarsSubtitle": "Trake za obaveštenja prikazuju poruke u dnu ekrana",
"demoSnackbarsTitle": "Trake za obaveštenja",
"demoCupertinoSliderTitle": "Klizač",
"cupertinoTabBarChatTab": "Ćaskanje",
"cupertinoTabBarHomeTab": "Početna",
"demoCupertinoTabBarDescription": "Donja traka sa karticama za navigaciju u iOS stilu. Prikazuje više kartica, pri čemu je samo jedna aktivna, a prema podrazumevanim podešavanjima to je prva kartica.",
"demoCupertinoTabBarSubtitle": "Donja traka sa karticama u iOS stilu",
"demoOptionsFeatureTitle": "Pregledajte opcije",
"demoOptionsFeatureDescription": "Dodirnite ovde da biste videli dostupne opcije za ovu demonstraciju.",
"demoCodeViewerCopyAll": "KOPIRAJ SVE",
"shrineScreenReaderRemoveProductButton": "Ukloni proizvod {product}",
"shrineScreenReaderProductAddToCart": "Dodaj u korpu",
"shrineScreenReaderCart": "{quantity,plural,=0{Korpa za kupovinu, nema artikala}=1{Korpa za kupovinu, 1 artikal}few{Korpa za kupovinu, {quantity} artikla}other{Korpa za kupovinu, {quantity} artikala}}",
"demoCodeViewerFailedToCopyToClipboardMessage": "Kopiranje u privremenu memoriju nije uspelo: {error}",
"demoCodeViewerCopiedToClipboardMessage": "Kopirano je u privremenu memoriju.",
"craneSleep8SemanticLabel": "Majanske ruševine na litici iznad plaže",
"craneSleep4SemanticLabel": "Hotel na obali jezera ispred planina",
"craneSleep2SemanticLabel": "Tvrđava u Maču Pikčuu",
"craneSleep1SemanticLabel": "Planinska koliba u snežnom pejzažu sa zimzelenim drvećem",
"craneSleep0SemanticLabel": "Bungalovi koji se nadvijaju nad vodom",
"craneFly13SemanticLabel": "Bazen na obali mora sa palmama",
"craneFly12SemanticLabel": "Bazen sa palmama",
"craneFly11SemanticLabel": "Svetionik od cigala na moru",
"craneFly10SemanticLabel": "Minareti džamije Al-Adžar u sumrak",
"craneFly9SemanticLabel": "Čovek se naslanja na stari plavi automobil",
"craneFly8SemanticLabel": "Supertree Grove",
"craneEat9SemanticLabel": "Šank u kafeu sa pecivom",
"craneEat2SemanticLabel": "Pljeskavica",
"craneFly5SemanticLabel": "Hotel na obali jezera ispred planina",
"demoSelectionControlsSubtitle": "Polja za potvrdu, dugmad za izbor i prekidači",
"craneEat10SemanticLabel": "Žena drži veliki sendvič sa pastrmom",
"craneFly4SemanticLabel": "Bungalovi koji se nadvijaju nad vodom",
"craneEat7SemanticLabel": "Ulaz u pekaru",
"craneEat6SemanticLabel": "Jelo sa škampima",
"craneEat5SemanticLabel": "Deo za sedenje u restoranu sa umetničkom atmosferom",
"craneEat4SemanticLabel": "Čokoladni desert",
"craneEat3SemanticLabel": "Korejski takos",
"craneFly3SemanticLabel": "Tvrđava u Maču Pikčuu",
"craneEat1SemanticLabel": "Prazan bar sa visokim barskim stolicama",
"craneEat0SemanticLabel": "Pica u peći na drva",
"craneSleep11SemanticLabel": "Neboder Tajpej 101",
"craneSleep10SemanticLabel": "Minareti džamije Al-Adžar u sumrak",
"craneSleep9SemanticLabel": "Svetionik od cigala na moru",
"craneEat8SemanticLabel": "Tanjir sa rečnim rakovima",
"craneSleep7SemanticLabel": "Šareni stanovi na trgu Ribeira",
"craneSleep6SemanticLabel": "Bazen sa palmama",
"craneSleep5SemanticLabel": "Šator u polju",
"settingsButtonCloseLabel": "Zatvorite podešavanja",
"demoSelectionControlsCheckboxDescription": "Polja za potvrdu omogućavaju korisniku da izabere više opcija iz skupa. Vrednost uobičajenog polja za potvrdu je Tačno ili Netačno, a vrednost trostrukog polja za potvrdu može da bude i Ništa.",
"settingsButtonLabel": "Podešavanja",
"demoListsTitle": "Liste",
"demoListsSubtitle": "Izgledi pokretnih lista",
"demoListsDescription": "Jedan red fiksne visine koji obično sadrži neki tekst, kao i ikonu na početku ili na kraju.",
"demoOneLineListsTitle": "Jedan red",
"demoTwoLineListsTitle": "Dva reda",
"demoListsSecondary": "Sekundarni tekst",
"demoSelectionControlsTitle": "Kontrole izbora",
"craneFly7SemanticLabel": "Maunt Rašmor",
"demoSelectionControlsCheckboxTitle": "Polje za potvrdu",
"craneSleep3SemanticLabel": "Čovek se naslanja na stari plavi automobil",
"demoSelectionControlsRadioTitle": "Dugme za izbor",
"demoSelectionControlsRadioDescription": "Dugmad za izbor omogućavaju korisniku da izabere jednu opciju iz skupa. Koristite dugmad za izbor da biste omogućili ekskluzivni izbor ako smatrate da korisnik treba da vidi sve dostupne opcije jednu pored druge.",
"demoSelectionControlsSwitchTitle": "Prekidač",
"demoSelectionControlsSwitchDescription": "Prekidači za uključivanje/isključivanje menjaju status pojedinačnih opcija podešavanja. Na osnovu odgovarajuće oznake u tekstu korisnicima treba da bude jasno koju opciju prekidač kontroliše i koji je njen status.",
"craneFly0SemanticLabel": "Planinska koliba u snežnom pejzažu sa zimzelenim drvećem",
"craneFly1SemanticLabel": "Šator u polju",
"craneFly2SemanticLabel": "Molitvene zastavice ispred snegom prekrivene planine",
"craneFly6SemanticLabel": "Pogled na Palatu lepih umetnosti iz vazduha",
"rallySeeAllAccounts": "Prikaži sve račune",
"rallyBillAmount": "Račun ({billName}) od {amount} dospeva {date}.",
"shrineTooltipCloseCart": "Zatvorite korpu",
"shrineTooltipCloseMenu": "Zatvorite meni",
"shrineTooltipOpenMenu": "Otvorite meni",
"shrineTooltipSettings": "Podešavanja",
"shrineTooltipSearch": "Pretražite",
"demoTabsDescription": "Kartice organizuju sadržaj na različitim ekranima, u skupovima podataka i drugim interakcijama.",
"demoTabsSubtitle": "Kartice sa prikazima koji mogu zasebno da se pomeraju",
"demoTabsTitle": "Kartice",
"rallyBudgetAmount": "Budžet za {budgetName}, potrošeno je {amountUsed} od {amountTotal}, preostalo je {amountLeft}",
"shrineTooltipRemoveItem": "Uklonite stavku",
"rallyAccountAmount": "{accountName} račun {accountNumber} sa {amount}.",
"rallySeeAllBudgets": "Prikaži sve budžete",
"rallySeeAllBills": "Prikaži sve račune",
"craneFormDate": "Izaberite datum",
"craneFormOrigin": "Odaberite mesto polaska",
"craneFly2": "Dolina Kumbu, Nepal",
"craneFly3": "Maču Pikču, Peru",
"craneFly4": "Male, Maldivi",
"craneFly5": "Vicnau, Švajcarska",
"craneFly6": "Meksiko Siti, Meksiko",
"craneFly7": "Maunt Rašmor, Sjedinjene Američke Države",
"settingsTextDirectionLocaleBased": "Na osnovu lokaliteta",
"craneFly9": "Havana, Kuba",
"craneFly10": "Kairo, Egipat",
"craneFly11": "Lisabon, Portugalija",
"craneFly12": "Napa, Sjedinjene Američke Države",
"craneFly13": "Bali, Indonezija",
"craneSleep0": "Male, Maldivi",
"craneSleep1": "Aspen, Sjedinjene Američke Države",
"craneSleep2": "Maču Pikču, Peru",
"demoCupertinoSegmentedControlTitle": "Segmentirana kontrola",
"craneSleep4": "Vicnau, Švajcarska",
"craneSleep5": "Big Sur, Sjedinjene Američke Države",
"craneSleep6": "Napa, Sjedinjene Američke Države",
"craneSleep7": "Porto, Portugalija",
"craneSleep8": "Tulum, Meksiko",
"craneEat5": "Seul, Južna Koreja",
"demoChipTitle": "Čipovi",
"demoChipSubtitle": "Kompaktni elementi koji predstavljaju unos, atribut ili radnju",
"demoActionChipTitle": "Čip radnji",
"demoActionChipDescription": "Čipovi radnji su skup opcija koje pokreću radnju povezanu sa primarnim sadržajem. Čipovi radnji treba da se pojavljuju dinamički i kontekstualno u korisničkom interfejsu.",
"demoChoiceChipTitle": "Čip izbora",
"demoChoiceChipDescription": "Čipovi izbora predstavljaju pojedinačnu izabranu stavku iz skupa. Čipovi izbora sadrže povezani opisni tekst ili kategorije.",
"demoFilterChipTitle": "Čip filtera",
"demoFilterChipDescription": "Čipovi filtera koriste oznake ili opisne reči kao način da filtriraju sadržaj.",
"demoInputChipTitle": "Čip unosa",
"demoInputChipDescription": "Čipovi unosa predstavljaju složene informacije, poput entiteta (osobe, mesta ili stvari) ili teksta iz govornog jezika, u kompaktnom obliku.",
"craneSleep9": "Lisabon, Portugalija",
"craneEat10": "Lisabon, Portugalija",
"demoCupertinoSegmentedControlDescription": "Koristi se za biranje jedne od međusobno isključivih opcija. Kada je izabrana jedna opcija u segmentiranoj kontroli, opoziva se izbor ostalih opcija u toj segmentiranoj kontroli.",
"chipTurnOnLights": "Uključi svetla",
"chipSmall": "Mala",
"chipMedium": "Srednja",
"chipLarge": "Velika",
"chipElevator": "Lift",
"chipWasher": "Mašina za pranje veša",
"chipFireplace": "Kamin",
"chipBiking": "Vožnja bicikla",
"craneFormDiners": "Ekspres restorani",
"rallyAlertsMessageUnassignedTransactions": "{count,plural,=1{Povećajte mogući odbitak poreza! Dodelite kategorije 1 nedodeljenoj transakciji.}few{Povećajte mogući odbitak poreza! Dodelite kategorije za {count} nedodeljene transakcije.}other{Povećajte mogući odbitak poreza! Dodelite kategorije za {count} nedodeljenih transakcija.}}",
"craneFormTime": "Izaberite vreme",
"craneFormLocation": "Izaberite lokaciju",
"craneFormTravelers": "Putnici",
"craneEat8": "Atlanta, Sjedinjene Američke Države",
"craneFormDestination": "Odaberite odredište",
"craneFormDates": "Izaberite datume",
"craneFly": "LET",
"craneSleep": "NOĆENJE",
"craneEat": "ISHRANA",
"craneFlySubhead": "Istražujte letove prema destinaciji",
"craneSleepSubhead": "Istražujte smeštajne objekte prema odredištu",
"craneEatSubhead": "Istražujte restorane prema odredištu",
"craneFlyStops": "{numberOfStops,plural,=0{Direktan}=1{1 zaustavljanje}few{{numberOfStops} zaustavljanja}other{{numberOfStops} zaustavljanja}}",
"craneSleepProperties": "{totalProperties,plural,=0{Nema dostupnih objekata}=1{1 dostupan objekat}few{{totalProperties} dostupna objekta}other{{totalProperties} dostupnih objekata}}",
"craneEatRestaurants": "{totalRestaurants,plural,=0{Nema restorana}=1{1 restoran}few{{totalRestaurants} restorana}other{{totalRestaurants} restorana}}",
"craneFly0": "Aspen, Sjedinjene Američke Države",
"demoCupertinoSegmentedControlSubtitle": "Segmentirana kontrola u iOS stilu",
"craneSleep10": "Kairo, Egipat",
"craneEat9": "Madrid, Španija",
"craneFly1": "Big Sur, Sjedinjene Američke Države",
"craneEat7": "Nešvil, Sjedinjene Američke Države",
"craneEat6": "Sijetl, Sjedinjene Američke Države",
"craneFly8": "Singapur",
"craneEat4": "Pariz, Francuska",
"craneEat3": "Portland, Sjedinjene Američke Države",
"craneEat2": "Kordoba, Argentina",
"craneEat1": "Dalas, Sjedinjene Američke Države",
"craneEat0": "Napulj, Italija",
"craneSleep11": "Tajpej, Tajvan",
"craneSleep3": "Havana, Kuba",
"shrineLogoutButtonCaption": "ODJAVI ME",
"rallyTitleBills": "OBRAČUNI",
"rallyTitleAccounts": "NALOZI",
"shrineProductVagabondSack": "Vrećasta torba",
"rallyAccountDetailDataInterestYtd": "Kamata od početka godine do danas",
"shrineProductWhitneyBelt": "Kaiš Whitney",
"shrineProductGardenStrand": "Baštenski konopac",
"shrineProductStrutEarrings": "Strut minđuše",
"shrineProductVarsitySocks": "Čarape sa prugama",
"shrineProductWeaveKeyring": "Pleteni privezak za ključeve",
"shrineProductGatsbyHat": "Kačket",
"shrineProductShrugBag": "Torba sa ručkom za nošenje na ramenu",
"shrineProductGiltDeskTrio": "Trio pozlaćenih stočića",
"shrineProductCopperWireRack": "Bakarna vešalica",
"shrineProductSootheCeramicSet": "Keramički set Soothe",
"shrineProductHurrahsTeaSet": "Čajni set Hurrahs",
"shrineProductBlueStoneMug": "Plava kamena šolja",
"shrineProductRainwaterTray": "Posuda za kišnicu",
"shrineProductChambrayNapkins": "Platnene salvete",
"shrineProductSucculentPlanters": "Saksije za sočnice",
"shrineProductQuartetTable": "Sto za četiri osobe",
"shrineProductKitchenQuattro": "Kuhinjski set iz četiri dela",
"shrineProductClaySweater": "Džemper boje gline",
"shrineProductSeaTunic": "Tamnoplava tunika",
"shrineProductPlasterTunic": "Tunika boje gipsa",
"rallyBudgetCategoryRestaurants": "Restorani",
"shrineProductChambrayShirt": "Platnena majica",
"shrineProductSeabreezeSweater": "Džemper sa šablonom morskih talasa",
"shrineProductGentryJacket": "Gentry jakna",
"shrineProductNavyTrousers": "Tamnoplave pantalone",
"shrineProductWalterHenleyWhite": "Majica sa izrezom u obliku slova v (bele boje)",
"shrineProductSurfAndPerfShirt": "Surferska majica",
"shrineProductGingerScarf": "Crveni šal",
"shrineProductRamonaCrossover": "Ženska bluza Ramona",
"shrineProductClassicWhiteCollar": "Klasična bela košulja",
"shrineProductSunshirtDress": "Haljina za zaštitu od sunca",
"rallyAccountDetailDataInterestRate": "Kamatna stopa",
"rallyAccountDetailDataAnnualPercentageYield": "Godišnji procenat dobiti",
"rallyAccountDataVacation": "Odmor",
"shrineProductFineLinesTee": "Majica sa tankim crtama",
"rallyAccountDataHomeSavings": "Štednja za kupovinu doma",
"rallyAccountDataChecking": "Tekući",
"rallyAccountDetailDataInterestPaidLastYear": "Kamata plaćena prošle godine",
"rallyAccountDetailDataNextStatement": "Sledeći izvod",
"rallyAccountDetailDataAccountOwner": "Vlasnik naloga",
"rallyBudgetCategoryCoffeeShops": "Kafići",
"rallyBudgetCategoryGroceries": "Bakalnice",
"shrineProductCeriseScallopTee": "Tamnoružičasta majica sa talasastim rubom",
"rallyBudgetCategoryClothing": "Odeća",
"rallySettingsManageAccounts": "Upravljajte nalozima",
"rallyAccountDataCarSavings": "Štednja za kupovinu automobila",
"rallySettingsTaxDocuments": "Poreski dokumenti",
"rallySettingsPasscodeAndTouchId": "Šifra i ID za dodir",
"rallySettingsNotifications": "Obaveštenja",
"rallySettingsPersonalInformation": "Lični podaci",
"rallySettingsPaperlessSettings": "Podešavanja bez papira",
"rallySettingsFindAtms": "Pronađite bankomate",
"rallySettingsHelp": "Pomoć",
"rallySettingsSignOut": "Odjavite se",
"rallyAccountTotal": "Ukupno",
"rallyBillsDue": "Dospeva na naplatu",
"rallyBudgetLeft": "Preostaje",
"rallyAccounts": "Nalozi",
"rallyBills": "Obračuni",
"rallyBudgets": "Budžeti",
"rallyAlerts": "Obaveštenja",
"rallySeeAll": "PRIKAŽI SVE",
"rallyFinanceLeft": "PREOSTAJE",
"rallyTitleOverview": "PREGLED",
"shrineProductShoulderRollsTee": "Majica sa zavrnutim rukavima",
"shrineNextButtonCaption": "DALJE",
"rallyTitleBudgets": "BUDŽETI",
"rallyTitleSettings": "PODEŠAVANJA",
"rallyLoginLoginToRally": "Prijavite se u aplikaciju Rally",
"rallyLoginNoAccount": "Nemate nalog?",
"rallyLoginSignUp": "REGISTRUJ ME",
"rallyLoginUsername": "Korisničko ime",
"rallyLoginPassword": "Lozinka",
"rallyLoginLabelLogin": "Prijavi me",
"rallyLoginRememberMe": "Zapamti me",
"rallyLoginButtonLogin": "PRIJAVI ME",
"rallyAlertsMessageHeadsUpShopping": "Pažnja! Iskoristili ste {percent} budžeta za kupovinu za ovaj mesec.",
"rallyAlertsMessageSpentOnRestaurants": "Ove nedelje ste potrošili {amount} na restorane.",
"rallyAlertsMessageATMFees": "Ovog meseca ste potrošili {amount} na naknade za bankomate",
"rallyAlertsMessageCheckingAccount": "Odlično! Na tekućem računu imate {percent} više nego prošlog meseca.",
"shrineMenuCaption": "MENI",
"shrineCategoryNameAll": "SVE",
"shrineCategoryNameAccessories": "DODACI",
"shrineCategoryNameClothing": "ODEĆA",
"shrineCategoryNameHome": "KUĆA",
"shrineLoginUsernameLabel": "Korisničko ime",
"shrineLoginPasswordLabel": "Lozinka",
"shrineCancelButtonCaption": "OTKAŽI",
"shrineCartTaxCaption": "Porez:",
"shrineCartPageCaption": "KORPA",
"shrineProductQuantity": "Količina: {quantity}",
"shrineProductPrice": "x {price}",
"shrineCartItemCount": "{quantity,plural,=0{NEMA STAVKI}=1{1 STAVKA}few{{quantity} STAVKE}other{{quantity} STAVKI}}",
"shrineCartClearButtonCaption": "OBRIŠI SVE IZ KORPE",
"shrineCartTotalCaption": "UKUPNO",
"shrineCartSubtotalCaption": "Međuzbir:",
"shrineCartShippingCaption": "Isporuka:",
"shrineProductGreySlouchTank": "Siva majica bez rukava",
"shrineProductStellaSunglasses": "Naočare za sunce Stella",
"shrineProductWhitePinstripeShirt": "Bela košulja sa prugama",
"demoTextFieldWhereCanWeReachYou": "Gde možemo da vas kontaktiramo?",
"settingsTextDirectionLTR": "Sleva nadesno",
"settingsTextScalingLarge": "Veliki",
"demoBottomSheetHeader": "Zaglavlje",
"demoBottomSheetItem": "Stavka: {value}",
"demoBottomTextFieldsTitle": "Polja za unos teksta",
"demoTextFieldTitle": "Polja za unos teksta",
"demoTextFieldSubtitle": "Jedan red teksta i brojeva koji mogu da se izmene",
"demoTextFieldDescription": "Polja za unos teksta omogućavaju korisnicima da unesu tekst u korisnički interfejs. Obično se prikazuju u obliku obrazaca i dijaloga.",
"demoTextFieldShowPasswordLabel": "Prikaži lozinku",
"demoTextFieldHidePasswordLabel": "Sakrij lozinku",
"demoTextFieldFormErrors": "Pre slanja ispravite greške označene crvenom bojom.",
"demoTextFieldNameRequired": "Ime je obavezno.",
"demoTextFieldOnlyAlphabeticalChars": "Unosite samo abecedne znakove.",
"demoTextFieldEnterUSPhoneNumber": "(###) ###-#### – unesite broj telefona u Sjedinjenim Američkim Državama",
"demoTextFieldEnterPassword": "Unesite lozinku.",
"demoTextFieldPasswordsDoNotMatch": "Lozinke se ne podudaraju",
"demoTextFieldWhatDoPeopleCallYou": "Kako vas ljudi zovu?",
"demoTextFieldNameField": "Ime*",
"demoBottomSheetButtonText": "PRIKAŽI DONJU TABELU",
"demoTextFieldPhoneNumber": "Broj telefona*",
"demoBottomSheetTitle": "Donja tabela",
"demoTextFieldEmail": "Imejl",
"demoTextFieldTellUsAboutYourself": "Recite nam nešto o sebi (npr. napišite čime se bavite ili koje hobije imate)",
"demoTextFieldKeepItShort": "Neka bude kratko, ovo je samo demonstracija.",
"starterAppGenericButton": "DUGME",
"demoTextFieldLifeStory": "Biografija",
"demoTextFieldSalary": "Plata",
"demoTextFieldUSD": "USD",
"demoTextFieldNoMoreThan": "Ne više od 8 znakova.",
"demoTextFieldPassword": "Lozinka*",
"demoTextFieldRetypePassword": "Ponovo unesite lozinku*",
"demoTextFieldSubmit": "POŠALJI",
"demoBottomNavigationSubtitle": "Donja navigacija koja se postepeno prikazuje i nestaje",
"demoBottomSheetAddLabel": "Dodajte",
"demoBottomSheetModalDescription": "Modalna donja tabela je alternativa meniju ili dijalogu i onemogućava interakciju korisnika sa ostatkom aplikacije.",
"demoBottomSheetModalTitle": "Modalna donja tabela",
"demoBottomSheetPersistentDescription": "Trajna donja tabela prikazuje informacije koje dopunjuju primarni sadržaj aplikacije. Trajna donja tabela ostaje vidljiva i pri interakciji korisnika sa drugim delovima aplikacije.",
"demoBottomSheetPersistentTitle": "Trajna donja tabela",
"demoBottomSheetSubtitle": "Trajne i modalne donje tabele",
"demoTextFieldNameHasPhoneNumber": "{name} ima broj telefona {phoneNumber}",
"buttonText": "DUGME",
"demoTypographyDescription": "Definicije raznih tipografskih stilova u materijalnom dizajnu.",
"demoTypographySubtitle": "Svi unapred definisani stilovi teksta",
"demoTypographyTitle": "Tipografija",
"demoFullscreenDialogDescription": "Proizvod fullscreenDialog određuje da li se sledeća stranica otvara u modalnom dijalogu preko celog ekrana",
"demoFlatButtonDescription": "Kada se pritisne, ravno dugme prikazuje mrlju boje, ali se ne podiže. Ravnu dugmad koristite na trakama s alatkama, u dijalozima i u tekstu sa razmakom",
"demoBottomNavigationDescription": "Donja traka za navigaciju prikazuje tri do pet odredišta u dnu ekrana. Svako odredište predstavljaju ikona i opcionalna tekstualna oznaka. Kada korisnik dodirne donju ikonu za navigaciju, otvara se odredište za destinaciju najvišeg nivoa koje je povezano sa tom ikonom.",
"demoBottomNavigationSelectedLabel": "Izabrana oznaka",
"demoBottomNavigationPersistentLabels": "Trajne oznake",
"starterAppDrawerItem": "Stavka: {value}",
"demoTextFieldRequiredField": "* označava obavezno polje",
"demoBottomNavigationTitle": "Donja navigacija",
"settingsLightTheme": "Svetla",
"settingsTheme": "Tema",
"settingsPlatformIOS": "iOS",
"settingsPlatformAndroid": "Android",
"settingsTextDirectionRTL": "Zdesna nalevo",
"settingsTextScalingHuge": "Ogroman",
"cupertinoButton": "Dugme",
"settingsTextScalingNormal": "Uobičajen",
"settingsTextScalingSmall": "Mali",
"settingsSystemDefault": "Sistem",
"settingsTitle": "Podešavanja",
"rallyDescription": "Aplikacija za lične finansije",
"aboutDialogDescription": "Da biste videli izvorni kôd za ovu aplikaciju, posetite {repoLink}.",
"bottomNavigationCommentsTab": "Komentari",
"starterAppGenericBody": "Glavni tekst",
"starterAppGenericHeadline": "Naslov",
"starterAppGenericSubtitle": "Titl",
"starterAppGenericTitle": "Naslov",
"starterAppTooltipSearch": "Pretraga",
"starterAppTooltipShare": "Delite",
"starterAppTooltipFavorite": "Omiljeno",
"starterAppTooltipAdd": "Dodajte",
"bottomNavigationCalendarTab": "Kalendar",
"starterAppDescription": "Izgled aplikacije za pokretanje koja reaguje",
"starterAppTitle": "Aplikacija za pokretanje",
"aboutFlutterSamplesRepo": "GitHub skladište za Flutter uzorke",
"bottomNavigationContentPlaceholder": "Čuvar mesta za karticu {title}",
"bottomNavigationCameraTab": "Kamera",
"bottomNavigationAlarmTab": "Alarm",
"bottomNavigationAccountTab": "Nalog",
"demoTextFieldYourEmailAddress": "Vaša imejl adresa",
"demoToggleButtonDescription": "Dugmad za uključivanje/isključivanje može da se koristi za grupisanje srodnih opcija. Da biste naglasili grupe srodne dugmadi za uključivanje/isključivanje, grupa treba da ima zajednički kontejner",
"colorsGrey": "SIVA",
"colorsBrown": "BRAON",
"colorsDeepOrange": "TAMNONARANDŽASTA",
"colorsOrange": "NARANDŽASTA",
"colorsAmber": "ŽUTOBRAON",
"colorsYellow": "ŽUTA",
"colorsLime": "ZELENOŽUTA",
"colorsLightGreen": "SVETLOZELENA",
"colorsGreen": "ZELENO",
"homeHeaderGallery": "Galerija",
"homeHeaderCategories": "Kategorije",
"shrineDescription": "Moderna aplikacija za maloprodaju",
"craneDescription": "Personalizovana aplikacija za putovanja",
"homeCategoryReference": "STILOVI I DRUGO",
"demoInvalidURL": "Prikazivanje URL-a nije uspelo:",
"demoOptionsTooltip": "Opcije",
"demoInfoTooltip": "Informacije",
"demoCodeTooltip": "Demo kôd",
"demoDocumentationTooltip": "Dokumentacija o API-jima",
"demoFullscreenTooltip": "Ceo ekran",
"settingsTextScaling": "Promena veličine teksta",
"settingsTextDirection": "Smer teksta",
"settingsLocale": "Lokalitet",
"settingsPlatformMechanics": "Mehanika platforme",
"settingsDarkTheme": "Tamna",
"settingsSlowMotion": "Usporeni snimak",
"settingsAbout": "O usluzi Flutter Gallery",
"settingsFeedback": "Pošalji povratne informacije",
"settingsAttribution": "Dizajnirala agencija TOASTER iz Londona",
"demoButtonTitle": "Dugmad",
"demoButtonSubtitle": "Dugme za tekst, izdignuto i oivičeno dugme i drugo",
"demoFlatButtonTitle": "Ravno dugme",
"demoRaisedButtonDescription": "Izdignuta dugmad pruža trodimenzionalni izgled na ravnom prikazu. Ona naglašava funkcije u širokim prostorima ili onima sa puno elemenata.",
"demoRaisedButtonTitle": "Izdignuto dugme",
"demoOutlineButtonTitle": "Oivičeno dugme",
"demoOutlineButtonDescription": "Oivičena dugmad postaje neprozirna i podiže se kada se pritisne. Obično se uparuje zajedno sa izdignutom dugmadi da bi označila alternativnu, sekundarnu radnju.",
"demoToggleButtonTitle": "Dugmad za uključivanje/isključivanje",
"colorsTeal": "TIRKIZNA",
"demoFloatingButtonTitle": "Plutajuće dugme za radnju",
"demoFloatingButtonDescription": "Plutajuće dugme za radnju je kružna ikona dugmeta koje se prikazuje iznad sadržaja radi isticanja primarne radnje u aplikaciji.",
"demoDialogTitle": "Dijalozi",
"demoDialogSubtitle": "Jednostavan, sa obaveštenjem i preko celog ekrana",
"demoAlertDialogTitle": "Obaveštenje",
"demoAlertDialogDescription": "Dijalog obaveštenja informiše korisnike o situacijama koje zahtevaju njihovu pažnju. Dijalog obaveštenja ima opcionalni naslov i opcionalnu listu radnji.",
"demoAlertTitleDialogTitle": "Obaveštenje sa naslovom",
"demoSimpleDialogTitle": "Jednostavan",
"demoSimpleDialogDescription": "Jednostavan dijalog korisniku nudi izbor između nekoliko opcija. Jednostavan dijalog ima opcionalni naslov koji se prikazuje iznad tih izbora.",
"demoFullscreenDialogTitle": "Ceo ekran",
"demoCupertinoButtonsTitle": "Dugmad",
"demoCupertinoButtonsSubtitle": "Dugmad u iOS stilu",
"demoCupertinoButtonsDescription": "Dugme u iOS stilu. Sadrži tekst i/ili ikonu koji postepeno nestaju ili se prikazuju kada se dugme dodirne. Opcionalno može da ima pozadinu.",
"demoCupertinoAlertsTitle": "Obaveštenja",
"demoCupertinoAlertsSubtitle": "Dijalozi obaveštenja u iOS stilu",
"demoCupertinoAlertTitle": "Obaveštenje",
"demoCupertinoAlertDescription": "Dijalog obaveštenja informiše korisnike o situacijama koje zahtevaju njihovu pažnju. Dijalog obaveštenja ima opcionalni naslov, opcionalni sadržaj i opcionalnu listu radnji. Naslov se prikazuje iznad sadržaja, a radnje se prikazuju ispod sadržaja.",
"demoCupertinoAlertWithTitleTitle": "Obaveštenje sa naslovom",
"demoCupertinoAlertButtonsTitle": "Obaveštenje sa dugmadi",
"demoCupertinoAlertButtonsOnlyTitle": "Samo dugmad sa obaveštenjem",
"demoCupertinoActionSheetTitle": "Tabela radnji",
"demoCupertinoActionSheetDescription": "Tabela radnji je poseban stil obaveštenja kojim se korisnicima nude dva ili više izbora u vezi sa aktuelnim kontekstom. Tabela radnji može da ima naslov, dodatnu poruku i listu radnji.",
"demoColorsTitle": "Boje",
"demoColorsSubtitle": "Sve unapred određene boje",
"demoColorsDescription": "Boje i šema boja koje predstavljaju paletu boja materijalnog dizajna.",
"buttonTextEnabled": "ENABLED",
"buttonTextDisabled": "DISABLED",
"buttonTextCreate": "Napravite",
"dialogSelectedOption": "Izabrali ste: „{value}“",
"dialogDiscardTitle": "Želite li da odbacite radnu verziju?",
"dialogLocationTitle": "Želite li da koristite Google usluge lokacije?",
"dialogLocationDescription": "Dozvolite da Google pomaže aplikacijama u određivanju lokacije. To znači da se Google-u šalju anonimni podaci o lokaciji, čak i kada nijedna aplikacija nije pokrenuta.",
"dialogCancel": "OTKAŽI",
"dialogDiscard": "ODBACI",
"dialogDisagree": "NE PRIHVATAM",
"dialogAgree": "PRIHVATAM",
"dialogSetBackup": "Podesite rezervni nalog",
"colorsBlueGrey": "PLAVOSIVA",
"dialogShow": "PRIKAŽI DIJALOG",
"dialogFullscreenTitle": "Dijalog preko celog ekrana",
"dialogFullscreenSave": "SAČUVAJ",
"dialogFullscreenDescription": "Demonstracija dijaloga na celom ekranu",
"cupertinoButtonEnabled": "Enabled",
"cupertinoButtonDisabled": "Disabled",
"cupertinoButtonWithBackground": "Sa pozadinom",
"cupertinoAlertCancel": "Otkaži",
"cupertinoAlertDiscard": "Odbaci",
"cupertinoAlertLocationTitle": "Želite li da dozvolite da Mape pristupaju vašoj lokaciji dok koristite tu aplikaciju?",
"cupertinoAlertLocationDescription": "Aktuelna lokacija će se prikazivati na mapama i koristi se za putanje, rezultate pretrage za stvari u blizini i procenjeno trajanje putovanja.",
"cupertinoAlertAllow": "Dozvoli",
"cupertinoAlertDontAllow": "Ne dozvoli",
"cupertinoAlertFavoriteDessert": "Izaberite omiljenu poslasticu",
"cupertinoAlertDessertDescription": "Na listi u nastavku izaberite omiljeni tip poslastice. Vaš izbor će se koristiti za prilagođavanje liste predloga za restorane u vašoj oblasti.",
"cupertinoAlertCheesecake": "Čizkejk",
"cupertinoAlertTiramisu": "Tiramisu",
"cupertinoAlertApplePie": "Pita od jabuka",
"cupertinoAlertChocolateBrownie": "Čokoladni brauni",
"cupertinoShowAlert": "Prikaži obaveštenje",
"colorsRed": "CRVENA",
"colorsPink": "ROZE",
"colorsPurple": "LJUBIČASTA",
"colorsDeepPurple": "TAMNOLJUBIČASTA",
"colorsIndigo": "TAMNOPLAVA",
"colorsBlue": "PLAVA",
"colorsLightBlue": "SVETLOPLAVO",
"colorsCyan": "TIRKIZNA",
"dialogAddAccount": "Dodaj nalog",
"Gallery": "Galerija",
"Categories": "Kategorije",
"SHRINE": "SHRINE",
"Basic shopping app": "Osnovna aplikacija za kupovinu",
"RALLY": "RALLY",
"CRANE": "CRANE",
"Travel app": "Aplikacija za putovanja",
"MATERIAL": "MATERIAL",
"CUPERTINO": "CUPERTINO",
"REFERENCE STYLES & MEDIA": "REFERENTNI STILOVI I MEDIJI"
}
| gallery/lib/l10n/intl_sr_Latn.arb/0 | {
"file_path": "gallery/lib/l10n/intl_sr_Latn.arb",
"repo_id": "gallery",
"token_count": 21655
} | 813 |
{
"loading": "Iyalayisha",
"deselect": "Susa ukukhetha",
"select": "Khetha",
"selectable": "Iyakhetheka (cindezela isikhathi eside)",
"selected": "Okukhethiwe",
"demo": "Idemo",
"bottomAppBar": "Ibha yaphansi ye-app",
"notSelected": "Ayikhethiwe",
"demoCupertinoSearchTextFieldTitle": "Inkambu yombhalo wosesho",
"demoCupertinoPicker": "Isikhi",
"demoCupertinoSearchTextFieldSubtitle": "Inkambu yombhalo wosesho wesitayela se-iOS",
"demoCupertinoSearchTextFieldDescription": "Inkambu yombhalo wosesho evumela umsebenzisi ukuthi aseshe ngokufaka umbhalo, futhi enganikeza futhi ihlunge iziphakamiso.",
"demoCupertinoSearchTextFieldPlaceholder": "Faka umbhalo",
"demoCupertinoScrollbarTitle": "Ibha yokuskrola",
"demoCupertinoScrollbarSubtitle": "Ibha yokuskrola yesitayela se-iOS",
"demoCupertinoScrollbarDescription": "Ibha yokuskrola egoqa ingane enikeziwe",
"demoTwoPaneItem": "Into {value}",
"demoTwoPaneList": "Uhlu",
"demoTwoPaneFoldableLabel": "Okungagoqeka",
"demoTwoPaneSmallScreenLabel": "Isikrini Esincane",
"demoTwoPaneSmallScreenDescription": "Lena yindlela i-TwoPane eziphatha ngayo kudivayisi enesikrini esincane.",
"demoTwoPaneTabletLabel": "Ithebulethi / Ideskithophu",
"demoTwoPaneTabletDescription": "Lena yindlela i-TwoPane eziphatha ngayo esikrinini esikhulu njengesethebulethi noma sedeskithophu.",
"demoTwoPaneTitle": "I-TwoPane",
"demoTwoPaneSubtitle": "Izinhlaka eziphendulayo kuzikrini ezigoqekayo, ezinkulu nezincane",
"splashSelectDemo": "Khetha idemo",
"demoTwoPaneFoldableDescription": "Lena yindlela i-TwoPane eziphatha ngayo kwidivayisi egoqekayo.",
"demoTwoPaneDetails": "Imininingwane",
"demoTwoPaneSelectItem": "Khetha into",
"demoTwoPaneItemDetails": "Imininingwane yento {value}",
"demoCupertinoContextMenuActionText": "Thepha futhi ubambe ilogo ye-Flutter ukuze ubone imenyu yokuqukethwe.",
"demoCupertinoContextMenuDescription": "Imenyu yokuqukethwe yesikrini esigcwele yesitayela se-iOS evela uma into icindezelwe isikhathi eside.",
"demoAppBarTitle": "Ibha ye-app",
"demoAppBarDescription": "Ibha ye-app inikeza okuqukethwe nezenzo ezihlobene nesikrini samanje. Isetshenziselwa ukufaka uphawu, izihloko zesikrini, ukufuna, nezenzo",
"demoDividerTitle": "Isihlukanisi",
"demoDividerSubtitle": "Isihlukanisi siwumugqa omncane ohlanganisa okuqukethwe ezinhlwini nasohlakeni.",
"demoDividerDescription": "Izihlukanisi zingasetshenziswa ezinhlwini, emakhabetheni, nakwezinye izindawo ukuze kuhlukaniswe okuqukethwe.",
"demoVerticalDividerTitle": "Isihlukanisi Esiqondile",
"demoCupertinoContextMenuTitle": "Imenyu Yokuqukethwe",
"demoCupertinoContextMenuSubtitle": "Imenyu yokuqukethwe yesitayela se-iOS",
"demoAppBarSubtitle": "Ibonisa ulwazi nezenzo ezihlobene nesikrini samanje",
"demoCupertinoContextMenuActionOne": "Isenzo sokuqala",
"demoCupertinoContextMenuActionTwo": "Isenzo sesibili",
"demoDateRangePickerDescription": "Ibonisa ibhokisi eliqukethe ibanga lelanga lokukhetha Idizayini Ebalulekile.",
"demoDateRangePickerTitle": "Ibanga Lelanga Lokukhetha",
"demoNavigationDrawerUserName": "Igama Lomsebenzisi",
"demoNavigationDrawerUserEmail": "[email protected]",
"demoNavigationDrawerText": "Swayipha kusuka onqenqemeni noma thepha isithonjana esiphezulu ngakwesobunxele ukuze ubone ikhabethe",
"demoNavigationRailTitle": "Uthango Lokuzulazula",
"demoNavigationRailSubtitle": "Ibonisa Uthango Lokuzulazula ngaphakathi kohlelo lokusebenza",
"demoNavigationRailDescription": "Iwijethi ebalulekile ehloselwe ukuboniswa kwesobunxele noma sokudla ukuze uhlelo lokusebenza luzulazule phakathi kwenombolo encane yokubuka, ngokuvamile phakathi kokuthathu nokuhlanu.",
"demoNavigationRailFirst": "Okokuqala",
"demoNavigationDrawerTitle": "Idrowa Lokuzula",
"demoNavigationRailThird": "Okwesithathu",
"replyStarredLabel": "Okunenkanyezi",
"demoTextButtonDescription": "Inkinobho yombhalo ibonisa ukusaphazeka kweyinki ekucindezelweni kodwa ayiphakami. Sebenzisa izinkinobho zombhalo kubha yamathuluzi, kumabhokisi nangaphakathi kolayini ngokokugxusha",
"demoElevatedButtonTitle": "Inkinobho Ephakanyisiwe",
"demoElevatedButtonDescription": "Izinkinobho eziphakanyisiwe zingeza ubukhulu kaningi kuzakhiwo eziphansi. Zigcizelela imisebenzi kuzikhala ezimatasa noma ezibanzi.",
"demoOutlinedButtonTitle": "Inkinobho Echaziwe",
"demoOutlinedButtonDescription": "Izinkinobho ezichaziwe ziba i-opaque ziphinde ziphakame uma zicindezelwa. Zivamise ukubhangqwa nezinkinobho eziphakanyisiwe ukuze zibonise esinye isenzo, sesibili.",
"demoContainerTransformDemoInstructions": "Amakhadi, Izinhla ne-FAB",
"demoNavigationDrawerSubtitle": "Ibonisa ikhabethe ngaphakathi kwebha yohlelo lokusebenza",
"replyDescription": "Uhlelo lokusebenza le-imeyili eligxilile, nelanele",
"demoNavigationDrawerDescription": "Iphaneli Yedizayini Ebalulekile eslayida ngokuvundlile kusuka onqenqemeni lwesikrini ukubonisa izixhumanisi zokuzulazula kuhlelo lokusebenza.",
"replyDraftsLabel": "Okusalungiswa",
"demoNavigationDrawerToPageOne": "Into Yokuqala",
"replyInboxLabel": "Ibhokisi lokungenayo",
"demoSharedXAxisDemoInstructions": "Inkinobho Yokulandelayo Neyasemuva",
"replySpamLabel": "Ugaxekile",
"replyTrashLabel": "Udoti",
"replySentLabel": "Kuthunyelwe",
"demoNavigationRailSecond": "Okwesibili",
"demoNavigationDrawerToPageTwo": "Into Yesibili",
"demoFadeScaleDemoInstructions": "I-Modal ne-FAB",
"demoFadeThroughDemoInstructions": "Ukuzulela phansi",
"demoSharedZAxisDemoInstructions": "Inkinobho yesithonjana samasethingi",
"demoSharedYAxisDemoInstructions": "Hlunga ngokuthi \"Okudlalwe Kamuva\"",
"demoTextButtonTitle": "Inkinobho Yombhalo",
"demoSharedZAxisBeefSandwichRecipeTitle": "Isemeshi yebhifu",
"demoSharedZAxisDessertRecipeDescription": "Iresiphu ye-dessert",
"demoSharedYAxisAlbumTileSubtitle": "Umculi",
"demoSharedYAxisAlbumTileTitle": "I-albhamu",
"demoSharedYAxisRecentSortTitle": "Okudlalwe kamuva",
"demoSharedYAxisAlphabeticalSortTitle": "A-Z",
"demoSharedYAxisAlbumCount": "ama-albhamu angama-268",
"demoSharedYAxisTitle": "I-y-axis eyabiwe",
"demoSharedXAxisCreateAccountButtonText": "DALA I-AKHAWUNTI",
"demoFadeScaleAlertDialogDiscardButton": "LAHLA",
"demoSharedXAxisSignInTextFieldLabel": "I-imeyili noma inombolo yefoni",
"demoSharedXAxisSignInSubtitleText": "Ngena ngemvume nge-akhawunti yakho",
"demoSharedXAxisSignInWelcomeText": "Sawubona David Park",
"demoSharedXAxisIndividualCourseSubtitle": "Kuboniswa Ngakunye",
"demoSharedXAxisBundledCourseSubtitle": "Okuhlanganisiwe",
"demoFadeThroughAlbumsDestination": "Ama-albhamu",
"demoSharedXAxisDesignCourseTitle": "Dizayina",
"demoSharedXAxisIllustrationCourseTitle": "Umfanekiso",
"demoSharedXAxisBusinessCourseTitle": "Ibhizinisi",
"demoSharedXAxisArtsAndCraftsCourseTitle": "Ubuciko nokwakha",
"demoMotionPlaceholderSubtitle": "Umbhalo wesibili",
"demoFadeScaleAlertDialogCancelButton": "KHANSELA",
"demoFadeScaleAlertDialogHeader": "Xwayisa Ibhokisi",
"demoFadeScaleHideFabButton": "FIHLA I-FAB",
"demoFadeScaleShowFabButton": "BONISA I-FAB",
"demoFadeScaleShowAlertDialogButton": "BONISA I-MODAL",
"demoFadeScaleDescription": "Iphethini yokufiphala isetshenziselwa ama-elementi e-UI angena noma aphuma ngaphakathi kwemikhawulo yesikrini, njengebhokisi elifiphala phakathi nendawo kusikrini.",
"demoFadeScaleTitle": "Ukufiphala",
"demoFadeThroughTextPlaceholder": "izithombe eziyi-123",
"demoFadeThroughSearchDestination": "Sesha",
"demoFadeThroughPhotosDestination": "Izithombe",
"demoSharedXAxisCoursePageSubtitle": "Izigaba ezenziwe inqwaba zivela njengamaqembu kokuphakelayo kwakho. Ungahlala ushintsha lokhu ngemuva kwesikhathi.",
"demoFadeThroughDescription": "Iphethini yokufiphala kudlulwe isetshenziselwa ukudlula okuphakathi kwama-elementi e-UI anganabo ubudlelwano obuqinile kokunye.",
"demoFadeThroughTitle": "Fiphala udlulele",
"demoSharedZAxisHelpSettingLabel": "Usizo",
"demoMotionSubtitle": "Wonke amaphethini okudlula achazwe ngaphambilini",
"demoSharedZAxisNotificationSettingLabel": "Izaziso",
"demoSharedZAxisProfileSettingLabel": "Iphrofayela",
"demoSharedZAxisSavedRecipesListTitle": "Amaresiphu Alondoloziwe",
"demoSharedZAxisBeefSandwichRecipeDescription": "Iresiphu yesemishi yebhifu",
"demoSharedZAxisCrabPlateRecipeDescription": "Iresiphu yepuleti lenkalankala",
"demoSharedXAxisCoursePageTitle": "Yenza umugqa oqondile izifundo zakho",
"demoSharedZAxisCrabPlateRecipeTitle": "Inkalankala",
"demoSharedZAxisShrimpPlateRecipeDescription": "Iresiphu yepuleti le-shrimp",
"demoSharedZAxisShrimpPlateRecipeTitle": "I-Shrimp",
"demoContainerTransformTypeFadeThrough": "FIPHALA UDLULELE",
"demoSharedZAxisDessertRecipeTitle": "I-Dessert",
"demoSharedZAxisSandwichRecipeDescription": "Iresiphi yesemishi",
"demoSharedZAxisSandwichRecipeTitle": "Isemishi",
"demoSharedZAxisBurgerRecipeDescription": "Iresiphi yebhega",
"demoSharedZAxisBurgerRecipeTitle": "Ibhega",
"demoSharedZAxisSettingsPageTitle": "Amasethingi",
"demoSharedZAxisTitle": "I-z-axis eyabiwe",
"demoSharedZAxisPrivacySettingLabel": "Ubumfihlo",
"demoMotionTitle": "Motion",
"demoContainerTransformTitle": "Ukuguqulwa Kwesiqukathi",
"demoContainerTransformDescription": "Iphethini yokuguqulwa kwesiqukathi idizayinelwe ukudlula phakathi kwama-elementi e-UI afaka isiqukathi. Le phethini idala ukuxhumana okubonakalayo phakathi kwama-elementi amabili e-UI",
"demoContainerTransformModalBottomSheetTitle": "Imodi yokufiphala",
"demoContainerTransformTypeFade": "UKUFIPHALA",
"demoSharedYAxisAlbumTileDurationUnit": "iminithi",
"demoMotionPlaceholderTitle": "Isihloko",
"demoSharedXAxisForgotEmailButtonText": "UKHOHLWE I-IMEYILI?",
"demoMotionSmallPlaceholderSubtitle": "Okwesibili",
"demoMotionDetailsPageTitle": "Ikhasi Lemininingwane",
"demoMotionListTileTitle": "Into yohlu",
"demoSharedAxisDescription": "Iphethini ye-axis eyabiwe isetshenziselwa ukuguqulwa okuphakathi kwama-elementi e-UI anobudlelwane be-spatial noma bokuzulazula. Le phethini isebenzisa ukuguqulwa okwabiwe ku-axis ka-x, y, noma u-z ukuze kuphinde kuqiniswe ubudlelwane phakathi kwama-elementi.",
"demoSharedXAxisTitle": "I-x-axis eyabiwe",
"demoSharedXAxisBackButtonText": "EMUVA",
"demoSharedXAxisNextButtonText": "OKULANDELAYO",
"demoSharedXAxisCulinaryCourseTitle": "Okokupheka",
"githubRepo": "{repoName} Ikhosombe le-GitHub",
"fortnightlyMenuUS": "I-US",
"fortnightlyMenuBusiness": "Ibhizinisi",
"fortnightlyMenuScience": "Isayensi",
"fortnightlyMenuSports": "Ezemidlalo",
"fortnightlyMenuTravel": "Ukuvakasha",
"fortnightlyMenuCulture": "Isiko",
"fortnightlyTrendingTechDesign": "I-TechDesign",
"rallyBudgetDetailAmountLeft": "Inani elisele",
"fortnightlyHeadlineArmy": "Ukulungiswa Kwempi Eluhlaza Kusukela Ngaphakathi",
"fortnightlyDescription": "Uhlelo lokusebenza lwezindaba olugxiliswe kokuqukethwe",
"rallyBillDetailAmountDue": "Inani elifunekayo",
"rallyBudgetDetailTotalCap": "I-cap yesamba",
"rallyBudgetDetailAmountUsed": "Inani elisetshenzisiwe",
"fortnightlyTrendingHealthcareRevolution": "I-HealthcareRevolution",
"fortnightlyMenuFrontPage": "Ikhasi langaphambili",
"fortnightlyMenuWorld": "Umhlaba",
"rallyBillDetailAmountPaid": "Inani elikhokhiwe",
"fortnightlyMenuPolitics": "Ipolotiki",
"fortnightlyHeadlineBees": "Izinyosi Zendawo Yefamu Zinokunikezwa Okumfushane",
"fortnightlyHeadlineGasoline": "Ikusasa Lephethiloli",
"fortnightlyTrendingGreenArmy": "I-GreenArmy",
"fortnightlyHeadlineFeminists": "Ama-Ferminist Athatha i-Partisanship",
"fortnightlyHeadlineFabrics": "Abadizayinayo Basebenzisa Ubuchwepheshe Ukuze Benze Izindwangu Ezizayo",
"fortnightlyHeadlineStocks": "Njengoba Izitoko Zihamba Kancane, Iningi Labantu Libheka Uhlobo Lwemali",
"fortnightlyTrendingReform": "Okulungisiwe",
"fortnightlyMenuTech": "Ubuchwepheshe",
"fortnightlyHeadlineWar": "Owasemelika Ohlukanisiwe Ophila Ngesikhathi Sempi",
"fortnightlyHeadlineHealthcare": "Ukuphenduka Okuthulile, Kodwa Okunamandla Kokunakekelwa Kwezempilo",
"fortnightlyLatestUpdates": "Izibuyekezo Zakamuva",
"fortnightlyTrendingStocks": "Izitoko",
"rallyBillDetailTotalAmount": "Inani lesamba",
"demoCupertinoPickerDateTime": "Idethi nesikhathi",
"signIn": "NGENA NGEMVUME",
"dataTableRowWithSugar": "{value} enoshukela",
"dataTableRowApplePie": "Uphaya we-apula",
"dataTableRowDonut": "Idonadi",
"dataTableRowHoneycomb": "Ikhekheba lezinyosi",
"dataTableRowLollipop": "I-Lollipop",
"dataTableRowJellyBean": "I-Jelly bean",
"dataTableRowGingerbread": "I-Gingerbread",
"dataTableRowCupcake": "I-Cupcake",
"dataTableRowEclair": "I-Eclair",
"dataTableRowIceCreamSandwich": "Isemeshi ka-ayisikhilimu",
"dataTableRowFrozenYogurt": "Iyogathi eqinile",
"dataTableColumnIron": "I-ayoni (%)",
"dataTableColumnCalcium": "Ikhalisiyamu (%)",
"dataTableColumnSodium": "Isodiyamu (mg)",
"demoTimePickerTitle": "Isikhi sesikhathi",
"demo2dTransformationsResetTooltip": "Setha kabusha ukuguqula",
"dataTableColumnFat": "Amafutha (g)",
"dataTableColumnCalories": "Amakhalori",
"dataTableColumnDessert": "Ukudla okumnandi kokugcina (1 ukuphakelwa)",
"cardsDemoTravelDestinationLocation1": "E-Thanjavur, e-Tamil Nadu",
"demoTimePickerDescription": "Ibonisa ibhokisi eliqukethe isikhi sesikhathi sedizayini ebalulekile.",
"demoPickersShowPicker": "BONISA ISIKHI",
"demoTabsScrollingTitle": "Iyapheqa",
"demoTabsNonScrollingTitle": "Ukungaskroli",
"craneHours": "{hours,plural,=1{1h}other{{hours}h}}",
"craneMinutes": "{minutes,plural,=1{1m}other{{minutes}m}}",
"craneFlightDuration": "{hoursShortForm} {minutesShortForm}",
"dataTableHeader": "Ukudla okunomsonco",
"demoDatePickerTitle": "Isikhi sedethi",
"demoPickersSubtitle": "Ukukhetha usuku nesikhathi",
"demoPickersTitle": "Izikhi",
"demo2dTransformationsEditTooltip": "Hlela uthayela",
"demoDataTableDescription": "Amathebula edatha abonisa imininingwane ngefomethi eyigridi yemigqa namakholomu. Ihlela imininingwane ngendlela yokuthi kube lula ukuskena, ukuze abasebenzisi babheke amaphethini nemininingwane.",
"demo2dTransformationsDescription": "Thepha ukuze uhlele amathayela, futhi usebenzise ukuthinta ukuze uzulazule esigcawini. Hudula ukuze unyakazise, nciza ukuze usondeze, phendukisa ngeminwe emibili. Cindezela inkinobho yokusetha kabusha ukuze ubuyele ekuqaleni komumo wesikrini.",
"demo2dTransformationsSubtitle": "Nyakaza, sondeza, phendukisa",
"demo2dTransformationsTitle": "2D ukuguqula",
"demoCupertinoTextFieldPIN": "I-PIN",
"demoCupertinoTextFieldDescription": "Inkambu yombhalo ivumela umsebenzisi afake umbhalo, kungaba khekhibhodi yekhompuyutha noma ngekhibhodi esesikrinini.",
"demoCupertinoTextFieldSubtitle": "Izinkambu zombhalo wesitayela se-iOS",
"demoCupertinoTextFieldTitle": "Izinkambu zombhalo",
"demoDatePickerDescription": "Ibonisa ibhokisi eliqukethe isikhi sedethi yedizayini ebalulekile.",
"demoCupertinoPickerTime": "Isikhathi",
"demoCupertinoPickerDate": "Idethi",
"demoCupertinoPickerTimer": "Isibali sikhathi",
"demoCupertinoPickerDescription": "Iwijethi yesikhi sesitayela se-iOS engasetshenziselwa ukukhetha iyunithi yezinhlamvu, izinsuku, izikhathi, noma kokubili usuku nesikhathi.",
"demoCupertinoPickerSubtitle": "Isikhi Sesitayela se-iOS",
"demoCupertinoPickerTitle": "Izikhi",
"dataTableRowWithHoney": "{value} enoju",
"cardsDemoTravelDestinationCity2": "E-Chettinad",
"bannerDemoResetText": "Setha kabusa isibhengenzo",
"bannerDemoMultipleText": "Izenzo eziningi",
"bannerDemoLeadingText": "Isithonjana esiholayo",
"dismiss": "CASHISA",
"cardsDemoTappable": "Iyathepheka",
"cardsDemoSelectable": "Iyakhetheka (cindezela isikhathi eside)",
"cardsDemoExplore": "Hlola",
"cardsDemoExploreSemantics": "Hlola i-{destinationName}",
"cardsDemoShareSemantics": "Yabelana nge-{destinationName}",
"cardsDemoTravelDestinationTitle1": "Amadolobha aphezulu angu-10 ongawavakashela e-Tamil Nadu",
"cardsDemoTravelDestinationDescription1": "Inombolo engu-10",
"cardsDemoTravelDestinationCity1": "E-Thanjavur",
"dataTableColumnProtein": "Amaphrotheni (g)",
"cardsDemoTravelDestinationTitle2": "Izingcwethi zase-Southern India",
"cardsDemoTravelDestinationDescription2": "Amaspina esilika",
"bannerDemoText": "Iphasiwedi yakho ibuyekezwe kwenye yamadivayisi akho. Sicela uphinde ungene ngemvume.",
"cardsDemoTravelDestinationLocation2": "E-Sivaganga, Tamil Nadu",
"cardsDemoTravelDestinationTitle3": "Ithempeli lase-Brihadisvara",
"cardsDemoTravelDestinationDescription3": "Amathempeli",
"demoBannerTitle": "Isibhengezo",
"demoBannerSubtitle": "Ukubonisa isibhengezo ngaphakathi kohlu",
"demoBannerDescription": "Isibhengezo sibonisa umlayezo obalulekile, nocacile, futhi sinikeza izenzo zokufanele kwenziwe ngumsebenzisi (noma ukucashisa leso sibhengezo). Isenzo somsebenzisi sidingekile ukuze sicashiswe.",
"demoCardTitle": "Amakhadi",
"demoCardSubtitle": "Amakhadi wesisekelo anamakona ayindilinga",
"demoCardDescription": "Ikhadi yishidi lokubalulekile okusetshenziselwa ukumelela imininingwane ethile ehlobene nakho, ngokwesibonelo i-albhamu, indawo yomhlaba, ukudla, imininingwane yokukuthinta, njll.",
"demoDataTableTitle": "Amathebula edatha",
"demoDataTableSubtitle": "Imigqa namakholomu emininingwane",
"dataTableColumnCarbs": "Amakhabhu (g)",
"placeTanjore": "E-Tanjore",
"demoGridListsTitle": "Uhlu lwegridi",
"placeFlowerMarket": "Imakethe yezimbali",
"placeBronzeWorks": "Imisebenzi yebhulonzi",
"placeMarket": "Emakethe",
"placeThanjavurTemple": "E-Thanjavur Temple",
"placeSaltFarm": "Ifamu yotswayi",
"placeScooters": "Izikuta",
"placeSilkMaker": "Isenzi sesilikhi",
"placeLunchPrep": "Ukulungiswa kwesidlo sasemini",
"placeBeach": "Ebhishi",
"placeFisherman": "Umdobi wezinhlanzi",
"demoMenuSelected": "Ikhethiwe: {value}",
"demoMenuRemove": "Susa",
"demoMenuGetLink": "Thola isixhumanisi",
"demoMenuShare": "Yabelana",
"demoBottomAppBarSubtitle": "Ibonisa ukuzula nezenzo phansi",
"demoMenuAnItemWithASectionedMenu": "Into enemenyu efakwe kusigaba",
"demoMenuADisabledMenuItem": "Into yemenyu ekhutshaziwe",
"demoLinearProgressIndicatorTitle": "Isikhombisi sokuqhubeka se-Linear",
"demoMenuContextMenuItemOne": "Into yokuqala yokuqukethwe kwemenyu",
"demoMenuAnItemWithASimpleMenu": "Into enemenyu elula",
"demoCustomSlidersTitle": "Izilayidi zangokwezifiso",
"demoMenuAnItemWithAChecklistMenu": "Into enemenyu yohlu lokuhlola",
"demoCupertinoActivityIndicatorTitle": "Isikhombi somsebenzi",
"demoCupertinoActivityIndicatorSubtitle": "isikhombisi somsebenzi wesitayela se-iOS",
"demoCupertinoActivityIndicatorDescription": "Isikhombisi somsebenzi wesitayela esiphendukela ku-clockwise.",
"demoCupertinoNavigationBarTitle": "Ibha yokuzula",
"demoCupertinoNavigationBarSubtitle": "Ibha yokuzulazula yesitayela se-iOS",
"demoCupertinoNavigationBarDescription": "Ibha yokuzulazula yesitayela se-iOS. Ibha yokuzulazula ibha yamathuluzi efaka ngokuncane isihloko sekhasi, ngaphakathi kwebha yamathuluzi.",
"demoCupertinoPullToRefreshTitle": "Donsa ukuze uvuselele",
"demoCupertinoPullToRefreshSubtitle": "Ulawulo lwesitayela se-iOS lokudonsa ukuze uvuselele",
"demoCupertinoPullToRefreshDescription": "Iwijethi esebenzisa ulawulo lwesitayela se-iOS lokudonsa ukuze uvuselele.",
"demoProgressIndicatorTitle": "Isikhombisi sokuqhubeka",
"demoProgressIndicatorSubtitle": "I-Linear, circular, indeterminate",
"demoCircularProgressIndicatorTitle": "Isikhombisi sokuqhubeka",
"demoCircularProgressIndicatorDescription": "Isikhombisi sokuqhubeka se-Material Design, okuphendukisa ukubonisa ukuthi uhlelo lokusebenza lumatasatasa.",
"demoMenuFour": "Kune",
"demoLinearProgressIndicatorDescription": "Isikhombisi sokuqhubeka se-Material Design linear, futhi saziwa ngebha yokuqhubeka.",
"demoTooltipTitle": "Amathulithiphu",
"demoTooltipSubtitle": "Umlayezo omfushane uboniswa ekucindezeleni kwesikhathi eside noma ekuhambiseni phezulu",
"demoTooltipDescription": "Amathulithiphu anikeza amalebula ombhalo asiza ukuchaza ukusebenza kwenkinobho noma esinye isenzo sokusetshenziswa kubonwa. Amathulithiphu abonisa umbhalo onolwazi uma abasebenzisa bahambisa ngaphezulu, bagxila, noma bacindezela isikhathi eside ku-elementi.",
"demoTooltipInstructions": "Cindezela isikhathi eside noma hambisa ngaphezulu ukuze ubonise ithulithiphu.",
"placeChennai": "E-Chennai",
"demoMenuChecked": "Ihloliwe: {value}",
"placeChettinad": "E-Chettinad",
"demoMenuPreview": "Buka kuqala",
"demoBottomAppBarTitle": "Ibha yaphansi yohlelo lokusebenza",
"demoBottomAppBarDescription": "Amabha wohlelo lokusebenza waphansi anikezela ngokufinyelela kwikhabethe lokuzula eliphansi futhi kufika kwizenzo ezine, kufaka phakathi inkinobho yesenzo yokuntanta.",
"bottomAppBarNotch": "I-Notch",
"bottomAppBarPosition": "Indawo Yenkinobho Yesenzo Yokuntanta",
"bottomAppBarPositionDockedEnd": "Kudokhiwe - Phelisa",
"bottomAppBarPositionDockedCenter": "Kudokhiwe - Maphakathi",
"bottomAppBarPositionFloatingEnd": "Ukuntanta - Phelisa",
"bottomAppBarPositionFloatingCenter": "Ukuntanta - Maphakathi",
"demoSlidersEditableNumericalValue": "Ivelu lenombolo elihlelekayo",
"demoGridListsSubtitle": "Isakhiwo somugqa nesekholomu",
"demoGridListsDescription": "Uhlu lwegridi lufaneleke kahle kakhulu ekuphrezenteni idatha enhlobonye, ngokuvamile izithombe. Into ngayinye ekuhlu lwegridi ibizwa ngokuthi ithayili.",
"demoGridListsImageOnlyTitle": "Isithombe kuphela",
"demoGridListsHeaderTitle": "Nesihloko",
"demoGridListsFooterTitle": "Nonyaweni",
"demoSlidersTitle": "Izilayidi",
"demoSlidersSubtitle": "Amawijethi wokukhetha ivelu ngokuswayipha",
"demoSlidersDescription": "Izilayidi zibonisa ibanga lamavelu kwibha, kusuka lapha abasebenzisi bangakhetha khona ivelu elilodwa. Abalulekele ukulungisa izilungiselelo ezifana nevolomu, ukukhanya, noma ukufaka izihlungi zesithombe.",
"demoRangeSlidersTitle": "Izilayidi zebanga",
"demoRangeSlidersDescription": "Izilayidi zibonisa ibanga lamavelu kwibha. Zingaba nezithonjana ngasekugcineni kwebha ezibonisa ibanga lamavelu. Abalulekele ukulungisa izilungiselelo ezifana nevolomu, ukukhanya, noma ukufaka izihlungi zesithombe.",
"demoMenuAnItemWithAContextMenuButton": "Into enemenyu yokuqukethwe",
"demoCustomSlidersDescription": "Izilayidi zibonisa ibanga lamavelu kwibha, kusuka lapho abasebenzisi bangakhetha khona ivelu elilodwa noma ibanga lamavelu. Izilayidi zingaba netimu futhi zenziwe ngokwezifiso.",
"demoSlidersContinuousWithEditableNumericalValue": "Ukuqhubeka ne-Editable Numerical Value",
"demoSlidersDiscrete": "Lahla",
"demoSlidersDiscreteSliderWithCustomTheme": "Lahla isilayidi ngetimu yangokwezifiso",
"demoSlidersContinuousRangeSliderWithCustomTheme": "Ukuqhubekisa isilayidi sebanga ngetimu yangokwezifsio",
"demoSlidersContinuous": "Okuqhubekayo",
"placePondicherry": "E-Pondicherry",
"demoMenuTitle": "Imenyu",
"demoContextMenuTitle": "Imenyu yokuqukethwe",
"demoSectionedMenuTitle": "Imenyu efakwe kusigaba",
"demoSimpleMenuTitle": "Imenyu elula",
"demoChecklistMenuTitle": "Imenyu yohlu lokuhlola",
"demoMenuSubtitle": "Izinkinobho zemenyu namamenyu alula",
"demoMenuDescription": "Imenyu ibonisa uhlu lwezinketho kundawo yangokwesikhashana. Zivela uma abasebenzisi bahlanganyela nenkinobho, isenzo, noma esinye isilawuli.",
"demoMenuItemValueOne": "Into yemenyu yokuqala",
"demoMenuItemValueTwo": "Into yemenyu yesibili",
"demoMenuItemValueThree": "Into yemenyu yesithathu",
"demoMenuOne": "Kunye",
"demoMenuTwo": "Kubili",
"demoMenuThree": "Kuthathu",
"demoMenuContextMenuItemThree": "Into yesithathu yokuqukethwe kwemenyu",
"demoCupertinoSwitchSubtitle": "iswishi yesitayela se-iOS",
"demoSnackbarsText": "Lena i-snackbar.",
"demoCupertinoSliderSubtitle": "isilayida sesitayela se-iOS",
"demoCupertinoSliderDescription": "Isilayida singasetshenziswa ukuze kukhethwe isethi yamanani aqhubekayo noma okuzikhethela.",
"demoCupertinoSliderContinuous": "Okuqhubekayo: {value}",
"demoCupertinoSliderDiscrete": "Ukuzikhethela: {value}",
"demoSnackbarsAction": "Ucindezele isenzo se-snackbar.",
"backToGallery": "Buyela kwigalari",
"demoCupertinoTabBarTitle": "Ibha yethebhu",
"demoCupertinoSwitchDescription": "Iswishi isetshenziselwa ukuguqula isimo sokuvula/sokuvala kusilungiselelo esisodwa.",
"demoSnackbarsActionButtonLabel": "ISENZO",
"cupertinoTabBarProfileTab": "Iphrofayela",
"demoSnackbarsButtonLabel": "BONISA I-SNACKBAR",
"demoSnackbarsDescription": "Ama-snackbar azisa abasebenzisi ngenqubo i-app eyenzile noma ezoyenza. Avela okwesikhashana, ngaphansi kwesikrini. Akumele aphazamise umuzwa womsebenzisi, futhi awadingi ukufakwa komsebenzisi ukuze anyamalale.",
"demoSnackbarsSubtitle": "Ama-snackbar abonisa imilayezo ngaphansi kwesikrini",
"demoSnackbarsTitle": "Ama-snackbar",
"demoCupertinoSliderTitle": "Isilayida",
"cupertinoTabBarChatTab": "Xoxa",
"cupertinoTabBarHomeTab": "Ekhaya",
"demoCupertinoTabBarDescription": "Ibha yethebhu yokuzulazula engaphansi yesitayela se-iOS. Ibonisa amathebhu amaningi ngethebhu eyodwa eyenziwe yasebenza, ithebhu yokuqala ngokuzenzakalela.",
"demoCupertinoTabBarSubtitle": "Ibha yethebhu engaphansi yesitayela se-iOS",
"demoOptionsFeatureTitle": "Buka izinketho",
"demoOptionsFeatureDescription": "Thepha lapha ukuze ubuke izinketho ezitholakalayo zale demo.",
"demoCodeViewerCopyAll": "KOPISHA KONKE",
"shrineScreenReaderRemoveProductButton": "Susa i-{product}",
"shrineScreenReaderProductAddToCart": "Engeza kukalishi",
"shrineScreenReaderCart": "{quantity,plural,=0{Ikalishi lokuthenga, azikho izinto}=1{Ikalishi lokuthenga, 1 into}other{Ikalishi lokuthenga, {quantity} izinto}}",
"demoCodeViewerFailedToCopyToClipboardMessage": "Yehlulekile ukukopishela kubhodi lokunamathisela: {error}",
"demoCodeViewerCopiedToClipboardMessage": "Kukopishwe kubhodi lokunamathisela.",
"craneSleep8SemanticLabel": "Ukonakala kwase-Mayan eweni ngaphezulu kwebhishi",
"craneSleep4SemanticLabel": "Ihhotela elikuhlangothi lwechibi ngaphambi kwezintaba",
"craneSleep2SemanticLabel": "I-Machu Picchu citadel",
"craneSleep1SemanticLabel": "I-chalet yokwakheka kwezwe eneqhwa enezihlahla ezihlala ziluhlaza",
"craneSleep0SemanticLabel": "Ama-bungalow angaphezu kwamanzi",
"craneFly13SemanticLabel": "Iphuli ekuhlangothi lolwandle olunezihlahla zamasundu",
"craneFly12SemanticLabel": "Iphuli enezihlahla zamasundu",
"craneFly11SemanticLabel": "Indlu enesibani yesitina esolwandle",
"craneFly10SemanticLabel": "I-Al-Azhar Mosque towers ngesikhathi sokushona kwelanga",
"craneFly9SemanticLabel": "Indoda encike kumoto endala eluhlaza okwesibhakabhaka",
"craneFly8SemanticLabel": "I-Supertree Grove",
"craneEat9SemanticLabel": "Ikhawunta yekhefi enama-pastry",
"craneEat2SemanticLabel": "Ibhega",
"craneFly5SemanticLabel": "Ihhotela elikuhlangothi lwechibi ngaphambi kwezintaba",
"demoSelectionControlsSubtitle": "Amabhokisi okuthikha, izinkinobho zerediyo, namaswishi",
"craneEat10SemanticLabel": "Owesifazane ophethe isemishi enkulu ye-pastrami",
"craneFly4SemanticLabel": "Ama-bungalow angaphezu kwamanzi",
"craneEat7SemanticLabel": "Indawo yokungena yokubhakwa kwezinkwa",
"craneEat6SemanticLabel": "Isidlo se-Shrimp",
"craneEat5SemanticLabel": "Indawo yokuhlala yerestshurenti ye-Artsy",
"craneEat4SemanticLabel": "Isidlo sokwehlisa soshokoledi",
"craneEat3SemanticLabel": "I-Korean taco",
"craneFly3SemanticLabel": "I-Machu Picchu citadel",
"craneEat1SemanticLabel": "Ibha engenalutho enezitulo zesitayela sedina",
"craneEat0SemanticLabel": "I-pizza kuwovini onomlilo wezinkuni",
"craneSleep11SemanticLabel": "I-Taipei 101 skyscraper",
"craneSleep10SemanticLabel": "I-Al-Azhar Mosque towers ngesikhathi sokushona kwelanga",
"craneSleep9SemanticLabel": "Indlu enesibani yesitina esolwandle",
"craneEat8SemanticLabel": "Ipuleti le-crawfish",
"craneSleep7SemanticLabel": "Izindawo zokuhlala ezinemibalabala e-Riberia Square",
"craneSleep6SemanticLabel": "Iphuli enezihlahla zamasundu",
"craneSleep5SemanticLabel": "Itende kunkambu",
"settingsButtonCloseLabel": "Vala izilungiselelo",
"demoSelectionControlsCheckboxDescription": "Amabhokisi okuhlola avumela umsebenzisi ukuthi akhethe okunye okungakhethwa kusukela kusethi. Inani elijwayelekile lebhokisi lokuhlola liyiqiniso noma lingamanga futhi inani lebhokisi lokuhlola le-tristate nalo lingaba ngelingavumelekile.",
"settingsButtonLabel": "Izilungiselelo",
"demoListsTitle": "Uhlu",
"demoListsSubtitle": "Izendlalelo zohlu lokuskrola",
"demoListsDescription": "Umugqa wokuphakama okulungisiwe oqukethe umbhalo kanye nesithonjana esilandelayo noma esiholayo.",
"demoOneLineListsTitle": "Umugqa owodwa",
"demoTwoLineListsTitle": "Imigqa emibili",
"demoListsSecondary": "Umbhalo wesibili",
"demoSelectionControlsTitle": "Izilawuli zokukhethwa",
"craneFly7SemanticLabel": "I-Mount Rushmore",
"demoSelectionControlsCheckboxTitle": "Ibhokisi lokuthikha",
"craneSleep3SemanticLabel": "Indoda encike kumoto endala eluhlaza okwesibhakabhaka",
"demoSelectionControlsRadioTitle": "Irediyo",
"demoSelectionControlsRadioDescription": "Izinkinobho zerediyo zivumela umsebenzisi ukuthi akhethe inketho eyodwa kusukela kusethi. Sebenzisa izinkinobho zerediyo zokukhethwa okukhethekile uma ucabanga ukuthi umsebenzisi kumele abone zonke izinketho ezikhethekile uhlangothi ukuya kolunye.",
"demoSelectionControlsSwitchTitle": "Iswishi",
"demoSelectionControlsSwitchDescription": "Amaswishi okuvula/ukuvala aguqula isimo senketho eyodwa yamasethingi. Inketho elawulwa iswishi kanye nesimo ekuyo, kumele kwenziwe kube sobala kusukela kulebula engaphakathi komugqa ehambisanayo.",
"craneFly0SemanticLabel": "I-chalet yokwakheka kwezwe eneqhwa enezihlahla ezihlala ziluhlaza",
"craneFly1SemanticLabel": "Itende kunkambu",
"craneFly2SemanticLabel": "Amafulegi omthandazo angaphambi kwentaba eneqhwa",
"craneFly6SemanticLabel": "Ukubuka okuphezulu kwe-Palacio de Bellas Artes",
"rallySeeAllAccounts": "Bona wonke ama-akhawunti",
"rallyBillAmount": "{billName} inkokhelo ifuneka ngomhla ka-{date} ngokungu-{amount}.",
"shrineTooltipCloseCart": "Vala ikalishi",
"shrineTooltipCloseMenu": "Vala imenyu",
"shrineTooltipOpenMenu": "Vula imenyu",
"shrineTooltipSettings": "Izilungiselelo",
"shrineTooltipSearch": "Sesha",
"demoTabsDescription": "Amathebhu ahlela okuqukethwe kuzikrini ezihlukile zokuqukethwe, amasethi edatha, nokunye ukuhlanganyela.",
"demoTabsSubtitle": "Amathebhu anokubuka okuzimele okuskrolekayo",
"demoTabsTitle": "Amathebhu",
"rallyBudgetAmount": "{budgetName} ibhajethi enokungu-{amountUsed} okusetshenzisiwe kokungu-{amountTotal}, {amountLeft} okusele",
"shrineTooltipRemoveItem": "Susa into",
"rallyAccountAmount": "{accountName} i-akhawunti engu-{accountNumber} enokungu-{amount}.",
"rallySeeAllBudgets": "Bona wonke amabhajethi",
"rallySeeAllBills": "Bona zonke izinkokhelo",
"craneFormDate": "Khetha idethi",
"craneFormOrigin": "Khetha okoqobo",
"craneFly2": "I-Khumbu Valley, Nepal",
"craneFly3": "I-Machu Picchu, Peru",
"craneFly4": "I-Malé, Maldives",
"craneFly5": "I-Vitznau, Switzerland",
"craneFly6": "I-Mexico City, Mexico",
"craneFly7": "I-Mount Rushmore, United States",
"settingsTextDirectionLocaleBased": "Kususelwa kokwasendaweni",
"craneFly9": "I-Havana, Cuba",
"craneFly10": "I-Cairo, Egypt",
"craneFly11": "I-Lisbon, e-Portugal",
"craneFly12": "I-Napa, United States",
"craneFly13": "I-Bali, Indonesia",
"craneSleep0": "I-Malé, Maldives",
"craneSleep1": "I-Aspen, United States",
"craneSleep2": "I-Machu Picchu, Peru",
"demoCupertinoSegmentedControlTitle": "Ulawulo olufakwe kusegmenti",
"craneSleep4": "I-Vitznau, Switzerland",
"craneSleep5": "I-Big Sur, United States",
"craneSleep6": "I-Napa, United States",
"craneSleep7": "I-Porto, Portugal",
"craneSleep8": "I-Tulum, Mexico",
"craneEat5": "I-Seoul, South Korea",
"demoChipTitle": "Amashipsi",
"demoChipSubtitle": "Izinto ezihlangene ezimela ukungena, ukuchasisa, noma isenzo",
"demoActionChipTitle": "I-Chip yesenzo",
"demoActionChipDescription": "Ama-chip ayisethi yezinketho acupha isenzo esiphathelene nokuqukethwe okuyinhloko. Ama-chip kufanele abonakale ngokubanzi nangokuqukethwe ku-UI.",
"demoChoiceChipTitle": "I-Chip yenketho",
"demoChoiceChipDescription": "Ama-chips amela inketho eyodwa kusuka kusethi. Ama-chip enketho aphathelene nombhalo wencazelo noma izigaba.",
"demoFilterChipTitle": "I-chip yesihlungi",
"demoFilterChipDescription": "Hlunga ama-chip wokusebenzisa noma amagama okuchaza njengendlela yokuhlunga okuqukethwe.",
"demoInputChipTitle": "I-Chip yokungena",
"demoInputChipDescription": "Ama-chip amela ucezu oluyingxube lolwazi, njengamabhizinisi (okomuntu, indawo, into) umbhalo wengxoxo ngendlela eminyene.",
"craneSleep9": "I-Lisbon, e-Portugal",
"craneEat10": "I-Lisbon, e-Portugal",
"demoCupertinoSegmentedControlDescription": "Kusetshenziselwe ukukhetha phakathi kwenombolo yezinketho ezikhethekile ngokufanayo. Uma inketho eyodwa ekulawulweni okwenziwe isegmenti ikhethwa, okunye okungakhethwa ekulawulweni okwenziwe isegmenti ziyayeka ukukhethwa.",
"chipTurnOnLights": "Vala amalambu",
"chipSmall": "Okuncane",
"chipMedium": "Maphakathi",
"chipLarge": "Okukhulu",
"chipElevator": "Ilifthi",
"chipWasher": "Kokuwasha",
"chipFireplace": "Iziko",
"chipBiking": "Ukuhamba ngamabhayisikili",
"craneFormDiners": "I-Diners",
"rallyAlertsMessageUnassignedTransactions": "{count,plural,=1{Khuphula amandla akho okudonselwa intela! Nikeza izigaba kumsebenzi ongu-1 ongenasigaba.}other{Khuphula amandla akho okudonselwa intela! Nikeza izigaba kumisebenzi enganikeziwe engu-{count}.}}",
"craneFormTime": "Khetha isikhathi",
"craneFormLocation": "Khetha indawo",
"craneFormTravelers": "Abavakashi",
"craneEat8": "I-Atlanta, United States",
"craneFormDestination": "Khetha indawo okuyiwa kuyo",
"craneFormDates": "Khetha amadethi",
"craneFly": "I-FLY",
"craneSleep": "LALA",
"craneEat": "I-EAT",
"craneFlySubhead": "Hlola izindiza ngendawo",
"craneSleepSubhead": "Hlola izinto ngendawo",
"craneEatSubhead": "Hlola izindawo zokudlela ngendawo",
"craneFlyStops": "{numberOfStops,plural,=0{Ukungami}=1{1 isitobhi}other{{numberOfStops} izitobhi}}",
"craneSleepProperties": "{totalProperties,plural,=0{Azikho izici ezitholakalayo}=1{1 isici esitholakalayo}other{{totalProperties} Izici ezitholakalayo}}",
"craneEatRestaurants": "{totalRestaurants,plural,=0{Awekho amarestshurenti}=1{1 irestshurenti}other{{totalRestaurants} Amarestshurenti}}",
"craneFly0": "I-Aspen, United States",
"demoCupertinoSegmentedControlSubtitle": "ulawulo olwenziwe isegmenti lwesitayela se-iOS",
"craneSleep10": "I-Cairo, Egypt",
"craneEat9": "I-Madrid, Spain",
"craneFly1": "I-Big Sur, United States",
"craneEat7": "I-Nashville, United States",
"craneEat6": "I-Seattle, United States",
"craneFly8": "U-Singapore",
"craneEat4": "I-Paris, France",
"craneEat3": "I-Portland, United States",
"craneEat2": "I-Córdoba, Argentina",
"craneEat1": "I-Dallas, United States",
"craneEat0": "I-Naples, Italy",
"craneSleep11": "I-Taipei, Taiwan",
"craneSleep3": "I-Havana, Cuba",
"shrineLogoutButtonCaption": "PHUMA NGEMVUME",
"rallyTitleBills": "AMABHILI",
"rallyTitleAccounts": "AMA-AKHAWUNTI",
"shrineProductVagabondSack": "I-Vagabond sack",
"rallyAccountDetailDataInterestYtd": "I-YTD yenzalo",
"shrineProductWhitneyBelt": "Ibhande le-Whitney",
"shrineProductGardenStrand": "I-Garden strand",
"shrineProductStrutEarrings": "Amacici e-Strut",
"shrineProductVarsitySocks": "Amasokisi e-Varsity",
"shrineProductWeaveKeyring": "I-Weave keyring",
"shrineProductGatsbyHat": "Isigqoko se-Gatsby",
"shrineProductShrugBag": "I-Shrug bag",
"shrineProductGiltDeskTrio": "Okuthathu kwetafula ye-Gilt",
"shrineProductCopperWireRack": "I-Copper wire rack",
"shrineProductSootheCeramicSet": "Isethi ye-Soothe ceramic",
"shrineProductHurrahsTeaSet": "Isethi yetiya ye-Hurrahs",
"shrineProductBlueStoneMug": "I-mug yetshe eluhlaza okwesibhakabhaka",
"shrineProductRainwaterTray": "Ithreyi ye-Rainwater",
"shrineProductChambrayNapkins": "I-Chambray napkins",
"shrineProductSucculentPlanters": "I-Succulent planters",
"shrineProductQuartetTable": "Ithebula lekota",
"shrineProductKitchenQuattro": "I-quattro yasekhishini",
"shrineProductClaySweater": "I-Clay sweater",
"shrineProductSeaTunic": "I-Sea tunic",
"shrineProductPlasterTunic": "I-Plaster tunic",
"rallyBudgetCategoryRestaurants": "Amarestshurenti",
"shrineProductChambrayShirt": "Ishedi le-Chambray",
"shrineProductSeabreezeSweater": "I-Seabreeze sweater",
"shrineProductGentryJacket": "Ijakethi ye-Gentry",
"shrineProductNavyTrousers": "Amabhulukwe anevi",
"shrineProductWalterHenleyWhite": "I-Walter henley (emhlophe)",
"shrineProductSurfAndPerfShirt": "Ishedi le-Surf and perf",
"shrineProductGingerScarf": "I-Ginger scarf",
"shrineProductRamonaCrossover": "I-Ramona crossover",
"shrineProductClassicWhiteCollar": "Ikhola emhlophe yakudala",
"shrineProductSunshirtDress": "Ingubo ye-Sunshirt",
"rallyAccountDetailDataInterestRate": "Isilinganiso senzalo",
"rallyAccountDetailDataAnnualPercentageYield": "Ukuvuma kwephesenti kwangonyaka",
"rallyAccountDataVacation": "Uhambo",
"shrineProductFineLinesTee": "I-Fine lines tee",
"rallyAccountDataHomeSavings": "Ukulondoloza kwekhaya",
"rallyAccountDataChecking": "Kuyahlolwa",
"rallyAccountDetailDataInterestPaidLastYear": "Inzuzo ekhokhelwe unyaka owedlule",
"rallyAccountDetailDataNextStatement": "Isitatimende esilandelayo",
"rallyAccountDetailDataAccountOwner": "Umnikazo we-akhawunti",
"rallyBudgetCategoryCoffeeShops": "Izitolo zekhofi",
"rallyBudgetCategoryGroceries": "Amagrosa",
"shrineProductCeriseScallopTee": "Cerise scallop tee",
"rallyBudgetCategoryClothing": "Izimpahla",
"rallySettingsManageAccounts": "Phatha ama-akhawunti",
"rallyAccountDataCarSavings": "Ukulondoloza kwemoto",
"rallySettingsTaxDocuments": "Amadokhumenti ombhalo",
"rallySettingsPasscodeAndTouchId": "I-Passcode ne-Touch ID",
"rallySettingsNotifications": "Izaziso",
"rallySettingsPersonalInformation": "Ulwazi ngawe",
"rallySettingsPaperlessSettings": "Izilungiselelo ezingenaphepha",
"rallySettingsFindAtms": "Thola ama-ATMs",
"rallySettingsHelp": "Usizo",
"rallySettingsSignOut": "Phuma ngemvume",
"rallyAccountTotal": "Isamba",
"rallyBillsDue": "Ifuneka",
"rallyBudgetLeft": "Kwesobunxele",
"rallyAccounts": "Ama-akhawunti",
"rallyBills": "Amabhili",
"rallyBudgets": "Amabhajethi",
"rallyAlerts": "Izexwayiso",
"rallySeeAll": "BONA KONKE",
"rallyFinanceLeft": "KWESOBUNXELE",
"rallyTitleOverview": "UKUBUKA KONKE",
"shrineProductShoulderRollsTee": "I-Shoulder rolls tee",
"shrineNextButtonCaption": "OKULANDELAYO",
"rallyTitleBudgets": "AMABHAJETHI",
"rallyTitleSettings": "IZILUNGISELELO",
"rallyLoginLoginToRally": "Ngena ku-Rally",
"rallyLoginNoAccount": "Awunayo i-akhawunti?",
"rallyLoginSignUp": "BHALISA",
"rallyLoginUsername": "Igama lomsebenzisi",
"rallyLoginPassword": "Iphasiwedi",
"rallyLoginLabelLogin": "Ngena ngemvume",
"rallyLoginRememberMe": "Ngikhumbule",
"rallyLoginButtonLogin": "NGENA NGEMVUME",
"rallyAlertsMessageHeadsUpShopping": "Bheka phambili, usebenzise u-{percent} webhajethi yakho Yokuthenga kule nyanga.",
"rallyAlertsMessageSpentOnRestaurants": "Usebenzise u-{amount} Ezindaweni Zokudlela kuleli viki.",
"rallyAlertsMessageATMFees": "Usebenzise u-{amount} enkokhelweni ye-ATM kule nyanga",
"rallyAlertsMessageCheckingAccount": "Umsebenzi omuhle! I-akhawunti yakho yokuhlola ngu-{percent} ngaphezulu kunenyanga edlule.",
"shrineMenuCaption": "IMENYU",
"shrineCategoryNameAll": "KONKE",
"shrineCategoryNameAccessories": "IZINSIZA",
"shrineCategoryNameClothing": "IZINGUBO",
"shrineCategoryNameHome": "IKHAYA",
"shrineLoginUsernameLabel": "Igama lomsebenzisi",
"shrineLoginPasswordLabel": "Iphasiwedi",
"shrineCancelButtonCaption": "KHANSELA",
"shrineCartTaxCaption": "Intela:",
"shrineCartPageCaption": "IKALISHI",
"shrineProductQuantity": "Ubuningi: {quantity}",
"shrineProductPrice": "x {price}",
"shrineCartItemCount": "{quantity,plural,=0{AZIKHO IZINTO}=1{1 INTO}other{{quantity} IZINTO}}",
"shrineCartClearButtonCaption": "SULA INQOLA",
"shrineCartTotalCaption": "ISAMBA",
"shrineCartSubtotalCaption": "Inani elingaphansi:",
"shrineCartShippingCaption": "Ukuthunyelwa:",
"shrineProductGreySlouchTank": "Ithanki ye-slouch empunga",
"shrineProductStellaSunglasses": "Izibuko ze-Stella",
"shrineProductWhitePinstripeShirt": "Ishedi le-pinstripe elimhlophe",
"demoTextFieldWhereCanWeReachYou": "Singakuthola kuphi?",
"settingsTextDirectionLTR": "LTR",
"settingsTextScalingLarge": "Omkhulu",
"demoBottomSheetHeader": "Unhlokweni",
"demoBottomSheetItem": "Into {value}",
"demoBottomTextFieldsTitle": "Izinkambu zombhalo",
"demoTextFieldTitle": "Izinkambu zombhalo",
"demoTextFieldSubtitle": "Umugqa owodwa wombhalo ohlelekayo nezinombolo",
"demoTextFieldDescription": "Izinkambu zombhalo zivumela abasebenzisi ukufaka umbhalo ku-UI. Ibonakala kumafomu nezingxoxo.",
"demoTextFieldShowPasswordLabel": "Bonisa iphasiwedi",
"demoTextFieldHidePasswordLabel": "Fihla iphasiwedi",
"demoTextFieldFormErrors": "Sicela ulungise amaphutha abomvu ngaphambi kokuhambisa.",
"demoTextFieldNameRequired": "Igama liyadingeka.",
"demoTextFieldOnlyAlphabeticalChars": "Sicela ufake izinhlamvu ngokulandelana.",
"demoTextFieldEnterUSPhoneNumber": "(###) ###-#### - Faka inombolo yefoni ye-US.",
"demoTextFieldEnterPassword": "Sicela ufake iphasiwedi.",
"demoTextFieldPasswordsDoNotMatch": "Amaphasiwedi awafani",
"demoTextFieldWhatDoPeopleCallYou": "Bakubiza ngokuthini abantu?",
"demoTextFieldNameField": "Igama*",
"demoBottomSheetButtonText": "BONISA ISHIDI ELIPHANSI",
"demoTextFieldPhoneNumber": "Inombolo yefoni*",
"demoBottomSheetTitle": "Ishidi eliphansi",
"demoTextFieldEmail": "I-imeyili",
"demoTextFieldTellUsAboutYourself": "Sitshele ngawe (isb., bhala phansi okwenzayo noma okuthandayo onakho)",
"demoTextFieldKeepItShort": "Igcine iyimfushane, le idemo nje.",
"starterAppGenericButton": "INKINOBHO",
"demoTextFieldLifeStory": "Indaba yempilo",
"demoTextFieldSalary": "Umholo",
"demoTextFieldUSD": "USD",
"demoTextFieldNoMoreThan": "Hhayi ngaphezu kwezinhlamvu ezingu-8.",
"demoTextFieldPassword": "Iphasiwedi*",
"demoTextFieldRetypePassword": "Thayipha kabusha iphasiwedi*",
"demoTextFieldSubmit": "THUMELA",
"demoBottomNavigationSubtitle": "Ukuzula kwaphansi ngokubuka kwe-cross-fading",
"demoBottomSheetAddLabel": "Engeza",
"demoBottomSheetModalDescription": "Ishidi eliphansi le-modal kungenye indlela kumentu noma ingxoxo futhi ivimbela umsebenzisi ekusebenzisaneni nalo lonke uhlelo lokusebenza.",
"demoBottomSheetModalTitle": "Ishidi laphansi le-Modal",
"demoBottomSheetPersistentDescription": "Ishidi eliphansi eliphoqelelayo libonisa uolwazi olusekela okuqukethwe okuyinhloko kohlelo lokusebenza. Ishidi laphansi eliphoqelelayo lihlala libonakala ngisho noma umsebenzisi exhumana nezinye izingxenye zohlelo lokusebenza.",
"demoBottomSheetPersistentTitle": "ishidi eliphansi eliphoqelelayo",
"demoBottomSheetSubtitle": "Amashidi waphansi aphoqelelayo nawe-modal",
"demoTextFieldNameHasPhoneNumber": "{name} inombolo yefoni ngu-{phoneNumber}",
"buttonText": "INKINOBHO",
"demoTypographyDescription": "Izincazelo zezitayela ezahlukahlukene ze-typographical zitholakele kudizayini ebalulekile.",
"demoTypographySubtitle": "Zonke izitayela zombhalo ezichazwe ngaphambilini",
"demoTypographyTitle": "I-Typography",
"demoFullscreenDialogDescription": "Isici se-FullscreenDialog sicacisa uma ngabe ikhasi elingenayo liyibhokisi lesikrini esigcwele se-modal yini",
"demoFlatButtonDescription": "Inkinobho ephansi ibonisa ukusaphazeka kweyinki ekucindezweni kodwa ayiphakami. Sebenzisa izinkinobho eziphansi kumabha wamathuluzi, kumabhokisi nangaphakathi kolayini ngokokugxusha",
"demoBottomNavigationDescription": "Amabha wokuzula aphansi abonisa ubukhulu obuthathu bezindawo ezinhlanu phansi kwesikrini. Indawo ngayinye imelwe isithonjana kanye nelebuli yombhalo ekhethekayo. Uma isithonjana sokuzula sithephiwa, umsebenzisi uyiswa endaweni yokuzula ephathelene naleso sithonjana.",
"demoBottomNavigationSelectedLabel": "Ilebuli ekhethiwe",
"demoBottomNavigationPersistentLabels": "Amalebuli aphoqelelayo",
"starterAppDrawerItem": "Into {value}",
"demoTextFieldRequiredField": "* ibonisa inkambu edingekayo",
"demoBottomNavigationTitle": "Ukuzulela phansi",
"settingsLightTheme": "Ukukhanya",
"settingsTheme": "itimu",
"settingsPlatformIOS": "I-iOS",
"settingsPlatformAndroid": "I-Android",
"settingsTextDirectionRTL": "RTL",
"settingsTextScalingHuge": "Nkulu kakhulu",
"cupertinoButton": "Inkinobho",
"settingsTextScalingNormal": "Jwayelekile",
"settingsTextScalingSmall": "Omncane",
"settingsSystemDefault": "Isistimu",
"settingsTitle": "Izilungiselelo",
"rallyDescription": "Uhlelo lokusebenza lezezimali zomuntu",
"aboutDialogDescription": "Ukuze ubone ikhodi yomthombo yalolu hlelo lokusebenza, sicela uvakashele i-{repoLink}.",
"bottomNavigationCommentsTab": "Amazwana",
"starterAppGenericBody": "Umzimba",
"starterAppGenericHeadline": "Isihlokwana",
"starterAppGenericSubtitle": "Umbhalo ongezansi",
"starterAppGenericTitle": "Isihloko",
"starterAppTooltipSearch": "Sesha",
"starterAppTooltipShare": "Yabelana",
"starterAppTooltipFavorite": "Intandokazi",
"starterAppTooltipAdd": "Engeza",
"bottomNavigationCalendarTab": "Ikhalenda",
"starterAppDescription": "Isendlalelo sokuqalisa sokuphendula",
"starterAppTitle": "Uhlelo lokusebenza lokuqalisa",
"aboutFlutterSamplesRepo": "Amasampuli we-Flutter we-GitHub repo",
"bottomNavigationContentPlaceholder": "Isimeli sethebhu ye-{title}",
"bottomNavigationCameraTab": "Ikhamera",
"bottomNavigationAlarmTab": "I-alamu",
"bottomNavigationAccountTab": "I-akhawunti",
"demoTextFieldYourEmailAddress": "Ikheli lakho le-imeyili",
"demoToggleButtonDescription": "Izinkinobho zokuguqula zingasetshenziswa ukuze zifake kuqembu izinketho ezihambisanayo. Ukuze kugcizelelwe amaqembu ezinkinobho ezihambisanayo zokuguqula, iqembu kumele labelane ngesiqukathi esijwayelekile",
"colorsGrey": "OKUMPUNGA",
"colorsBrown": "OKUMPOFU",
"colorsDeepOrange": "OKUWOLINTSHI OKUJULILE",
"colorsOrange": "IWOLINTSHI",
"colorsAmber": "I-AMBER",
"colorsYellow": "OKULIPHUZI",
"colorsLime": "I-LIME",
"colorsLightGreen": "OKULUHLAZA OKUKHANYAYO",
"colorsGreen": "OKULUHLAZA OKOTSHANI",
"homeHeaderGallery": "Igalari",
"homeHeaderCategories": "Izigaba",
"shrineDescription": "Uhlelo lokusebenza lokuthenga lwemfashini",
"craneDescription": "Uhlelo lokusebenza lokuhamba olwenziwe ngezifiso",
"homeCategoryReference": "IZITAYELA NOKUNYE",
"demoInvalidURL": "Ayikwazanga ukubonisa i-URL:",
"demoOptionsTooltip": "Izinketho",
"demoInfoTooltip": "Ulwazi",
"demoCodeTooltip": "Ikhodi ye-Demo",
"demoDocumentationTooltip": "Amadokhumenti e-API",
"demoFullscreenTooltip": "Isikrini Esigcwele",
"settingsTextScaling": "Ukukalwa kombhalo",
"settingsTextDirection": "Isiqondisindlela sombhalo",
"settingsLocale": "Isifunda",
"settingsPlatformMechanics": "I-Platform mechanics",
"settingsDarkTheme": "Kumnyama",
"settingsSlowMotion": "Islowu moshini",
"settingsAbout": "Mayelana ne-Flutter Gallery",
"settingsFeedback": "Thumela impendulo",
"settingsAttribution": "Kudizayinwe ngu-TOASTER e-London",
"demoButtonTitle": "Izinkinobho",
"demoButtonSubtitle": "Umbhalo, okuphakanyisiwe, okuchaziwe, nokuningi",
"demoFlatButtonTitle": "Inkinobho ephansi",
"demoRaisedButtonDescription": "Izinkinobho ezingeziwe zingeza ubukhulu kaningi kuzakhiwo eziphansi. Zigcizelela imisebenzi kuzikhala ezimatasa noma ezibanzi.",
"demoRaisedButtonTitle": "Inkinobho ephakanyisiwe",
"demoOutlineButtonTitle": "Inkinobho yohlaka",
"demoOutlineButtonDescription": "Izinkinobho zohlala ziba i-opaque ziphinde ziphakame uma zicindezelwa. Zivamise ukubhangqwa nezinkinobho eziphakanyisiwe ukuze zibonise esinye isenzo, sesibili.",
"demoToggleButtonTitle": "Izinkinobho zokuguqula",
"colorsTeal": "I-TEAL",
"demoFloatingButtonTitle": "Inkinobho yesenzo entantayo",
"demoFloatingButtonDescription": "Inkinobho yesenzo esintantayo inkinobho esandingiliza yesithonjana ehamba ngaphezulu kokuqukethwe ukuze kuphromothwe isenzo esiyinhloko kuhlelo lokusebenza.",
"demoDialogTitle": "Amabhokisi",
"demoDialogSubtitle": "Ilula, isexwayiso, nesikrini esigcwele",
"demoAlertDialogTitle": "Isexwayiso",
"demoAlertDialogDescription": "Ibhokisi lesexwayiso lazisa umsebenzisi mayelana nezimo ezidinga ukuvunywa. Ibhokisi lesexwayiso linesihloko ongasikhetha kanye nohlu ongalukhetha lwezenzo.",
"demoAlertTitleDialogTitle": "Isexwayiso esinesihloko",
"demoSimpleDialogTitle": "Kulula",
"demoSimpleDialogDescription": "Ibhokisi elilula linikeza umsebenzisi inketho ephakathi kwezinketho ezithile. Ibhokisi elilula linesihloko ongasikhetha esiboniswa ngaphezulu kwezinketho.",
"demoFullscreenDialogTitle": "Isikrini esigcwele",
"demoCupertinoButtonsTitle": "Izinkinobho",
"demoCupertinoButtonsSubtitle": "izinkinobho zesitayela se-iOS",
"demoCupertinoButtonsDescription": "Inkinobho yesitayela se-iOS. Ithatha ifake ngaphakathi umbhalo kanye/noma isithonjana esifiphalayo siphume siphinde sifiphale singene ekuthintweni. Kungenzeka ngokukhetheka ibe nengemuva.",
"demoCupertinoAlertsTitle": "Izexwayiso",
"demoCupertinoAlertsSubtitle": "amabhokisi esexwayiso sesitayela se-iOS",
"demoCupertinoAlertTitle": "Isexwayiso",
"demoCupertinoAlertDescription": "Ibhokisi lesexwayiso lazisa umsebenzisi mayelana nezimo ezidinga ukuvunywa. Ibhokisi lesexwayiso linesihloko ongasikhetha, okuqukethwe ongakukhetha, kanye nohlu ongalukhetha lwezenzo. Isihloko siboniswa ngaphezulu kokuqukethwe futhi izenzo ziboniswa ngaphansi kokuqukethwe.",
"demoCupertinoAlertWithTitleTitle": "Isexwayiso esinesihloko",
"demoCupertinoAlertButtonsTitle": "Isexwayiso esinezinkinobho",
"demoCupertinoAlertButtonsOnlyTitle": "Izinkinobho zesexwayiso kuphela",
"demoCupertinoActionSheetTitle": "Ishidi lesenzo",
"demoCupertinoActionSheetDescription": "Ishidi lesenzo uhlobo oluthile lwesexwayiso oluphrezenta umsebenzisi ngesethi yezinketho ezimbili noma ngaphezulu ezihambisana nokuqukethwe kwamanje. Ishidi lesenzo lingaba nesihloko, umlayezo ongeziwe, kanye nohlu lwezenzo.",
"demoColorsTitle": "Imibala",
"demoColorsSubtitle": "Yonke imibala echazwe ngaphambilini",
"demoColorsDescription": "Umbala nokuhambisana kahle kwe-swatch yombala okumele i-palette yombala yedizayini yokubalulekile.",
"buttonTextEnabled": "ENABLED",
"buttonTextDisabled": "DISABLED",
"buttonTextCreate": "Dala",
"dialogSelectedOption": "Ukhethe: \"{value}\"",
"dialogDiscardTitle": "Lahla okusalungiswa?",
"dialogLocationTitle": "Sebenzisa isevisi yendawo ye-Google?",
"dialogLocationDescription": "Vumela i-Google isize izinhlelo zokusebenza zithole indawo. Lokhu kusho ukuthumela idatha yendawo engaziwa ku-Google, nanoma kungekho zinhlelo zokusebenza ezisebenzayo.",
"dialogCancel": "KHANSELA",
"dialogDiscard": "LAHLA",
"dialogDisagree": "UNGAVUMI",
"dialogAgree": "VUMA",
"dialogSetBackup": "Setha i-akhawunti yokwenza isipele",
"colorsBlueGrey": "OKUMPUNGA SALUHLAZA OKWESIBHAKABHAKA",
"dialogShow": "BONISA IBHOKISI",
"dialogFullscreenTitle": "Ibhokisi lesikrini esigcwele",
"dialogFullscreenSave": "LONDOLOZA",
"dialogFullscreenDescription": "Idemo yebhokisi lesikrini esigcwele",
"cupertinoButtonEnabled": "Enabled",
"cupertinoButtonDisabled": "Disabled",
"cupertinoButtonWithBackground": "Nengemuva",
"cupertinoAlertCancel": "Khansela",
"cupertinoAlertDiscard": "Lahla",
"cupertinoAlertLocationTitle": "Vumela okuthi \"Amamephu\" ukuze ufinyelele kundawo yakho ngenkathi usebenzisa uhlelo lokusebenza?",
"cupertinoAlertLocationDescription": "Indawo yakho yamanje izoboniswa kumephu iphinde isetshenziselwe izikhombisi-ndlela, imiphumela yosesho oluseduze, nezikhathi zokuvakasha ezilinganisiwe.",
"cupertinoAlertAllow": "Vumela",
"cupertinoAlertDontAllow": "Ungavumeli",
"cupertinoAlertFavoriteDessert": "Khetha isidlo sokwehlisa esiyintandokazi",
"cupertinoAlertDessertDescription": "Sicela ukhethe uhlobo lwakho oluyintandokazi lwesidlo sokwehlisa kusukela kuhlu olungezansi. Ukukhethwa kwakho kuzosetshenziselwa ukwenza kube ngokwakho uhlu oluphakanyisiwe lwezindawo zokudlela endaweni yangakini.",
"cupertinoAlertCheesecake": "I-Cheesecake",
"cupertinoAlertTiramisu": "I-Tiramisu",
"cupertinoAlertApplePie": "Uphaya we-apula",
"cupertinoAlertChocolateBrownie": "I-Chocolate brownie",
"cupertinoShowAlert": "Bonisa isexwayiso",
"colorsRed": "OKUBOMVU",
"colorsPink": "OKUPHINKI",
"colorsPurple": "OKUPHEPHULI",
"colorsDeepPurple": "OKUPHEPHULI OKUJULILE",
"colorsIndigo": "I-INDIGO",
"colorsBlue": "OKULUHLAZA OKWESIBHAKABHAKA",
"colorsLightBlue": "OKULUHLAZA OKWESIBHAKABHAKA NGOKUKHANYAYO",
"colorsCyan": "I-CYAN",
"dialogAddAccount": "Engeza i-akhawunti",
"Gallery": "Igalari",
"Categories": "Izigaba",
"SHRINE": "I-SHRINE",
"Basic shopping app": "Uhlelo lokusebenza lokuthenga oluyisisekelo",
"RALLY": "I-RALLY",
"CRANE": "I-CRANE",
"Travel app": "Uhlelo lokusebenza lokuvakasha",
"MATERIAL": "OKUBALULEKILE",
"CUPERTINO": "I-CUPERTINO",
"REFERENCE STYLES & MEDIA": "IZITAYELA ZENKOMBA NEMIDIYA"
}
| gallery/lib/l10n/intl_zu.arb/0 | {
"file_path": "gallery/lib/l10n/intl_zu.arb",
"repo_id": "gallery",
"token_count": 22014
} | 814 |
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/widgets.dart';
import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
import 'package:gallery/studies/rally/charts/pie_chart.dart';
import 'package:gallery/studies/rally/data.dart';
import 'package:gallery/studies/rally/finance.dart';
import 'package:gallery/studies/rally/tabs/sidebar.dart';
/// A page that shows a summary of bills.
class BillsView extends StatefulWidget {
const BillsView({super.key});
@override
State<BillsView> createState() => _BillsViewState();
}
class _BillsViewState extends State<BillsView>
with SingleTickerProviderStateMixin {
@override
Widget build(BuildContext context) {
final items = DummyDataService.getBillDataList(context);
final dueTotal = sumBillDataPrimaryAmount(items);
final paidTotal = sumBillDataPaidAmount(items);
final detailItems = DummyDataService.getBillDetailList(
context,
dueTotal: dueTotal,
paidTotal: paidTotal,
);
return TabWithSidebar(
restorationId: 'bills_view',
mainView: FinancialEntityView(
heroLabel: GalleryLocalizations.of(context)!.rallyBillsDue,
heroAmount: dueTotal,
segments: buildSegmentsFromBillItems(items),
wholeAmount: dueTotal,
financialEntityCards: buildBillDataListViews(items, context),
),
sidebarItems: [
for (UserDetailData item in detailItems)
SidebarItem(title: item.title, value: item.value)
],
);
}
}
| gallery/lib/studies/rally/tabs/bills.dart/0 | {
"file_path": "gallery/lib/studies/rally/tabs/bills.dart",
"repo_id": "gallery",
"token_count": 585
} | 815 |
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
import 'package:gallery/layout/letter_spacing.dart';
import 'package:gallery/studies/shrine/colors.dart';
import 'package:gallery/studies/shrine/expanding_bottom_sheet.dart';
import 'package:gallery/studies/shrine/model/app_state_model.dart';
import 'package:gallery/studies/shrine/model/product.dart';
import 'package:gallery/studies/shrine/theme.dart';
import 'package:intl/intl.dart';
import 'package:scoped_model/scoped_model.dart';
const _startColumnWidth = 60.0;
const _ordinalSortKeyName = 'shopping_cart';
class ShoppingCartPage extends StatefulWidget {
const ShoppingCartPage({super.key});
@override
State<ShoppingCartPage> createState() => _ShoppingCartPageState();
}
class _ShoppingCartPageState extends State<ShoppingCartPage> {
List<Widget> _createShoppingCartRows(AppStateModel model) {
return model.productsInCart.keys
.map(
(id) => ShoppingCartRow(
product: model.getProductById(id),
quantity: model.productsInCart[id],
onPressed: () {
model.removeItemFromCart(id);
},
),
)
.toList();
}
@override
Widget build(BuildContext context) {
final localTheme = Theme.of(context);
return Scaffold(
backgroundColor: shrinePink50,
body: SafeArea(
child: ScopedModelDescendant<AppStateModel>(
builder: (context, child, model) {
final localizations = GalleryLocalizations.of(context)!;
final expandingBottomSheet = ExpandingBottomSheet.of(context);
return Stack(
children: [
ListView(
children: [
Semantics(
sortKey:
const OrdinalSortKey(0, name: _ordinalSortKeyName),
child: Row(
children: [
SizedBox(
width: _startColumnWidth,
child: IconButton(
icon: const Icon(Icons.keyboard_arrow_down),
onPressed: () => expandingBottomSheet!.close(),
tooltip: localizations.shrineTooltipCloseCart,
),
),
Text(
localizations.shrineCartPageCaption,
style: localTheme.textTheme.titleMedium!
.copyWith(fontWeight: FontWeight.w600),
),
const SizedBox(width: 16),
Text(
localizations.shrineCartItemCount(
model.totalCartQuantity,
),
),
],
),
),
const SizedBox(height: 16),
Semantics(
sortKey:
const OrdinalSortKey(1, name: _ordinalSortKeyName),
child: Column(
children: _createShoppingCartRows(model),
),
),
Semantics(
sortKey:
const OrdinalSortKey(2, name: _ordinalSortKeyName),
child: ShoppingCartSummary(model: model),
),
const SizedBox(height: 100),
],
),
PositionedDirectional(
bottom: 16,
start: 16,
end: 16,
child: Semantics(
sortKey: const OrdinalSortKey(3, name: _ordinalSortKeyName),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: const BeveledRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(7)),
),
backgroundColor: shrinePink100,
),
onPressed: () {
model.clearCart();
expandingBottomSheet!.close();
},
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 12),
child: Text(
localizations.shrineCartClearButtonCaption,
style: TextStyle(
letterSpacing:
letterSpacingOrNone(largeLetterSpacing)),
),
),
),
),
),
],
);
},
),
),
);
}
}
class ShoppingCartSummary extends StatelessWidget {
const ShoppingCartSummary({
super.key,
required this.model,
});
final AppStateModel model;
@override
Widget build(BuildContext context) {
final smallAmountStyle =
Theme.of(context).textTheme.bodyMedium!.copyWith(color: shrineBrown600);
final largeAmountStyle = Theme.of(context)
.textTheme
.headlineMedium!
.copyWith(letterSpacing: letterSpacingOrNone(mediumLetterSpacing));
final formatter = NumberFormat.simpleCurrency(
decimalDigits: 2,
locale: Localizations.localeOf(context).toString(),
);
final localizations = GalleryLocalizations.of(context)!;
return Row(
children: [
const SizedBox(width: _startColumnWidth),
Expanded(
child: Padding(
padding: const EdgeInsetsDirectional.only(end: 16),
child: Column(
children: [
MergeSemantics(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SelectableText(
localizations.shrineCartTotalCaption,
),
Expanded(
child: SelectableText(
formatter.format(model.totalCost),
style: largeAmountStyle,
textAlign: TextAlign.end,
),
),
],
),
),
const SizedBox(height: 16),
MergeSemantics(
child: Row(
children: [
SelectableText(
localizations.shrineCartSubtotalCaption,
),
Expanded(
child: SelectableText(
formatter.format(model.subtotalCost),
style: smallAmountStyle,
textAlign: TextAlign.end,
),
),
],
),
),
const SizedBox(height: 4),
MergeSemantics(
child: Row(
children: [
SelectableText(
localizations.shrineCartShippingCaption,
),
Expanded(
child: SelectableText(
formatter.format(model.shippingCost),
style: smallAmountStyle,
textAlign: TextAlign.end,
),
),
],
),
),
const SizedBox(height: 4),
MergeSemantics(
child: Row(
children: [
SelectableText(
localizations.shrineCartTaxCaption,
),
Expanded(
child: SelectableText(
formatter.format(model.tax),
style: smallAmountStyle,
textAlign: TextAlign.end,
),
),
],
),
),
],
),
),
),
],
);
}
}
class ShoppingCartRow extends StatelessWidget {
const ShoppingCartRow({
super.key,
required this.product,
required this.quantity,
this.onPressed,
});
final Product product;
final int? quantity;
final VoidCallback? onPressed;
@override
Widget build(BuildContext context) {
final formatter = NumberFormat.simpleCurrency(
decimalDigits: 0,
locale: Localizations.localeOf(context).toString(),
);
final localTheme = Theme.of(context);
final localizations = GalleryLocalizations.of(context)!;
return Padding(
padding: const EdgeInsets.only(bottom: 16),
child: Row(
key: ValueKey<int>(product.id),
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Semantics(
container: true,
label: localizations
.shrineScreenReaderRemoveProductButton(product.name(context)),
button: true,
enabled: true,
child: ExcludeSemantics(
child: SizedBox(
width: _startColumnWidth,
child: IconButton(
icon: const Icon(Icons.remove_circle_outline),
onPressed: onPressed,
tooltip: localizations.shrineTooltipRemoveItem,
),
),
),
),
Expanded(
child: Padding(
padding: const EdgeInsetsDirectional.only(end: 16),
child: Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
product.assetName,
package: product.assetPackage,
fit: BoxFit.cover,
width: 75,
height: 75,
excludeFromSemantics: true,
),
const SizedBox(width: 16),
Expanded(
child: MergeSemantics(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MergeSemantics(
child: Row(
children: [
Expanded(
child: SelectableText(
localizations
.shrineProductQuantity(quantity!),
),
),
SelectableText(
localizations.shrineProductPrice(
formatter.format(product.price),
),
),
],
),
),
SelectableText(
product.name(context),
style: localTheme.textTheme.titleMedium!
.copyWith(fontWeight: FontWeight.w600),
),
],
),
),
),
],
),
const SizedBox(height: 16),
const Divider(
color: shrineBrown900,
height: 10,
),
],
),
),
),
],
),
);
}
}
| gallery/lib/studies/shrine/shopping_cart.dart/0 | {
"file_path": "gallery/lib/studies/shrine/shopping_cart.dart",
"repo_id": "gallery",
"token_count": 7541
} | 816 |
#include "../../Flutter/Flutter-Release.xcconfig"
#include "Warnings.xcconfig"
| gallery/macos/Runner/Configs/Release.xcconfig/0 | {
"file_path": "gallery/macos/Runner/Configs/Release.xcconfig",
"repo_id": "gallery",
"token_count": 32
} | 817 |
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'testing/font_loader.dart';
Future<void> testExecutable(FutureOr<void> Function() testMain) async {
final defaultReportTestException = reportTestException;
reportTestException = (details, testDescription) {
defaultReportTestException(details, testDescription);
stdout.writeln(
'\nThe golden tests failed. Please read test_goldens/README.md for how '
'to update them.',
);
};
TestWidgetsFlutterBinding.ensureInitialized();
await loadFonts();
await testMain();
}
| gallery/test_goldens/flutter_test_config.dart/0 | {
"file_path": "gallery/test_goldens/flutter_test_config.dart",
"repo_id": "gallery",
"token_count": 240
} | 818 |
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:io';
import 'package:grinder/grinder.dart';
import 'package:path/path.dart' as path;
void main(List<String> args) => grind(args);
@Task('Get packages')
Future<void> pubGet({String? directory}) async {
await _runProcess(
'flutter',
['pub', 'get', if (directory != null) directory],
);
}
@Task('Format dart files')
Future<void> format({String path = '.'}) async {
await _runProcess('flutter', ['format', path]);
}
@Task('Transform arb to xml for English')
Future<void> l10n() async {
final l10nPath =
path.join(Directory.current.path, 'tool', 'l10n_cli', 'main.dart');
Dart.run(l10nPath);
}
@Task('Update code segments')
Future<void> updateCodeSegments() async {
final codeviewerPath =
path.join(Directory.current.path, 'tool', 'codeviewer_cli', 'main.dart');
Dart.run(codeviewerPath);
}
Future<void> _runProcess(String executable, List<String> arguments) async {
final result = await Process.run(executable, arguments);
stdout.write(result.stdout);
stderr.write(result.stderr);
}
| gallery/tool/grind.dart/0 | {
"file_path": "gallery/tool/grind.dart",
"repo_id": "gallery",
"token_count": 421
} | 819 |
<!DOCTYPE html>
<html>
<head>
<base href="/">
<meta charset="UTF-8">
<title>Flutter Gallery</title>
<meta name="description" content="A resource to help developers evaluate and use Flutter.">
<link rel="manifest" href="manifest.json">
<!-- Browser meta tags & icons -->
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="gallery">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<link rel="icon" type="image/png" href="favicon.png" sizes="32x32" />
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Roboto:400" rel="stylesheet" media="all">
<link href="https://fonts.googleapis.com/css?family=Google+Sans:700" rel="stylesheet" media="all">
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-HBB5H8CECM"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-HBB5H8CECM');
</script>
<!-- Renderer specifier -->
<script>
let searchParams = new URLSearchParams(window.location.search);
if (searchParams.has('renderer')) {
window.flutterWebRenderer = searchParams.get('renderer');
console.log(searchParams.get('renderer') + ' renderer requested in the URL');
}
// The value below is injected by flutter build, do not touch.
var serviceWorkerVersion = null;
</script>
<script src="flutter.js" defer></script>
</head>
<body>
<style>
body {
background-color: #030303;
}
</style>
<!-- Cookie notice -->
<div>
<style>
#cookie-notice {
background-color: #fff;
bottom: 0;
box-shadow: 0px 8px 24px rgba(0, 0, 0, .25);
-webkit-box-direction: normal;
-webkit-font-smoothing: antialiased;
display: none;
left: 0;
opacity: 0;
padding: 40px 0;
position: fixed;
width: 100%;
z-index: 11;
}
#cookie-notice.show {
animation-delay: .2s;
animation-duration: .5s;
animation-fill-mode: forwards;
animation-iteration-count: 1;
animation-name: fadein;
animation-timing-function: cubic-bezier(.27, .89, .39, .95);
display: block;
}
@keyframes fadein {
0% {
opacity: 0
}
to {
opacity: 1
}
}
.container {
align-items: center;
display: flex;
justify-content: space-between;
position: relative;
top: 1px;
margin: 0 auto;
max-width: calc(1280px - 100px);
width: calc(100% - 24px*2);
}
.container p {
max-width: 1200px;
margin: 0;
margin-right: 50px;
color: #4a4a4a;
font-size: 16px;
font-family: "Roboto", sans-serif;
line-height: 1.5;
}
p a {
color: #0468d7;
text-decoration: none;
}
button {
background-color: #0468d7;
color: #fff;
align-items: center;
justify-content: center;
border: 0 solid;
border-radius: 24px;
cursor: pointer;
display: inline-flex;
font-family: "Google Sans", sans-serif;
font-size: 14px;
font-weight: 700;
height: 40px;
padding: 0 32px;
text-align: center;
line-height: 1.15;
}
</style>
<section id="cookie-notice">
<div class="container">
<p>Google uses cookies to deliver its services, to personalize ads, and to analyze traffic. You can
adjust your privacy controls anytime in your
<a href="https://myaccount.google.com/data-and-personalization" target="_blank" rel="noopener">Google
settings</a>.
<a href="https://policies.google.com/technologies/cookies" target="_blank" rel="noopener">Learn more</a>.
</p>
<button id="cookie-consent">Okay</button>
</div>
</section>
</div>
<script>
function _setCookie(name, value) {
const expires = "; expires=2147483647"; // ~2038 i.e. until user clears cookies
document.cookie = name + "=" + (value || "") + expires + "; SameSite=Strict";
}
function _getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
function initCookieNotice() {
const notice = document.getElementById('cookie-notice');
const consentBtn = document.getElementById('cookie-consent');
const cookieKey = 'cookie-consent';
const cookieConsentValue = 'true'
const activeClass = 'show';
if (_getCookie(cookieKey) === cookieConsentValue) {
return;
}
notice.classList.add(activeClass);
consentBtn.classList.add(activeClass);
consentBtn.addEventListener('click', (e) => {
e.preventDefault();
_setCookie(cookieKey, cookieConsentValue);
notice.classList.remove(activeClass);
consentBtn.classList.add(activeClass);
});
}
initCookieNotice();
</script>
<!-- Background -->
<style>
body.light {
background-color: #E6EBEB;
}
body.dark {
background-color: #241E30;
}
</style>
<script>
var queryParams = new URLSearchParams(window.location.search);
// Set the theme from the URL param, with fallback to user preference if no theme is
// specified.
var theme = queryParams.get("brightness");
theme ||= window.matchMedia("(prefers-color-scheme: dark)").matches
? "dark"
: "light";
document.body.classList.add(theme);
</script>
<!-- Loading indicator -->
<div id="loading">
<style>
body {
inset: 0;
overflow: hidden;
margin: 0;
padding: 0;
position: fixed;
}
#loading {
align-items: center;
display: flex;
height: 100%;
justify-content: center;
width: 100%;
}
#loading img {
animation: 1s ease-in-out 0s infinite alternate breathe;
opacity: .66;
transition: opacity .4s;
}
#loading.main_done img {
opacity: 1;
}
#loading.init_done img {
animation: .33s ease-in-out 0s 1 forwards zooooom;
opacity: .05;
}
@keyframes breathe {
from {
transform: scale(1)
}
to {
transform: scale(0.95)
}
}
@keyframes zooooom {
from {
transform: scale(1)
}
to {
transform: scale(0.01)
}
}
</style>
<img src="icons/Icon-192.png" alt="Loading indicator..." />
</div>
<script>
window.addEventListener('load', function () {
var loading = document.querySelector('#loading');
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
}
}).then(function (engineInitializer) {
loading.classList.add('main_done');
return engineInitializer.initializeEngine();
}).then(function (appRunner) {
loading.classList.add('init_done');
return appRunner.runApp();
}).then(function (app) {
// Wait a few milliseconds so users can see the "zoooom" animation
// before getting rid of the "loading" div.
window.setTimeout(function () {
loading.remove();
}, 200);
});
});
</script>
<!-- App -->
</body>
</html>
| gallery/web/index.html/0 | {
"file_path": "gallery/web/index.html",
"repo_id": "gallery",
"token_count": 3521
} | 820 |
include: package:very_good_analysis/analysis_options.4.0.0.yaml
linter:
rules:
public_member_api_docs: false
| io_flip/analysis_options.yaml/0 | {
"file_path": "io_flip/analysis_options.yaml",
"repo_id": "io_flip",
"token_count": 44
} | 821 |
import 'dart:io';
import 'package:api/game_url.dart';
import 'package:cards_repository/cards_repository.dart';
import 'package:config_repository/config_repository.dart';
import 'package:dart_frog/dart_frog.dart';
import 'package:db_client/db_client.dart';
import 'package:encryption_middleware/encryption_middleware.dart';
import 'package:firebase_cloud_storage/firebase_cloud_storage.dart';
import 'package:game_domain/game_domain.dart';
import 'package:game_script_machine/game_script_machine.dart';
import 'package:image_model_repository/image_model_repository.dart';
import 'package:jwt_middleware/jwt_middleware.dart';
import 'package:language_model_repository/language_model_repository.dart';
import 'package:leaderboard_repository/leaderboard_repository.dart';
import 'package:logging/logging.dart';
import 'package:match_repository/match_repository.dart';
import 'package:prompt_repository/prompt_repository.dart';
import 'package:scripts_repository/scripts_repository.dart';
import 'prompts.dart';
late CardsRepository cardsRepository;
late MatchRepository matchRepository;
late ScriptsRepository scriptsRepository;
late LeaderboardRepository leaderboardRepository;
late DbClient dbClient;
late GameScriptMachine gameScriptMachine;
late JwtMiddleware jwtMiddleware;
late EncryptionMiddleware encryptionMiddleware;
late GameUrl gameUrl;
late PromptRepository promptRepository;
late FirebaseCloudStorage firebaseCloudStorage;
late ScriptsState scriptsState;
late ConfigRepository configRepository;
Future<HttpServer> run(Handler handler, InternetAddress ip, int port) async {
final dbClient = DbClient.initialize(_appId, useEmulator: _useEmulator);
configRepository = ConfigRepository(
dbClient: dbClient,
);
promptRepository = PromptRepository(
dbClient: dbClient,
);
final imageModelRepository = ImageModelRepository(
imageHost:
'https://firebasestorage.googleapis.com/v0/b/$_appId.appspot.com/o/public%2Fillustrations%2F',
promptRepository: promptRepository,
urlParams: '?alt=media',
);
final languageModelRepository = LanguageModelRepository(
dbClient: dbClient,
promptRepository: promptRepository,
);
jwtMiddleware = JwtMiddleware(
projectId: _appId,
isEmulator: _useEmulator,
);
encryptionMiddleware = const EncryptionMiddleware();
Logger.root.onRecord.listen((record) {
// ignore: avoid_print
print('${record.level.name}: ${record.time}: ${record.message}');
});
scriptsRepository = ScriptsRepository(dbClient: dbClient);
final initialScript = await scriptsRepository.getCurrentScript();
gameScriptMachine = GameScriptMachine.initialize(initialScript);
cardsRepository = CardsRepository(
imageModelRepository: imageModelRepository,
languageModelRepository: languageModelRepository,
configRepository: configRepository,
dbClient: dbClient,
gameScriptMachine: gameScriptMachine,
);
matchRepository = MatchRepository(
cardsRepository: cardsRepository,
dbClient: dbClient,
matchSolver: MatchSolver(gameScriptMachine: gameScriptMachine),
trackPlayerPresence: Platform.environment['DISABLE_TAB_CHECK'] != 'true',
);
if (_useEmulator) {
await dbClient.set(
'initials_blacklist',
DbEntityRecord(
id: _initialsBlacklistId,
data: const {
'blacklist': ['TST'],
},
),
);
const prompts = {
PromptTermType.character: characters,
PromptTermType.characterClass: classes,
PromptTermType.power: powers,
PromptTermType.location: locations,
};
var id = 0;
for (final entry in prompts.entries) {
for (final prompt in entry.value) {
await dbClient.set(
'prompt_terms',
DbEntityRecord(
id: 'id_${prompt}_${id++}',
data: {
'term': prompt,
if (entry.key == PromptTermType.power)
'shortenedTerm': prompt.replaceAll('ing', ''),
'type': entry.key.name,
},
),
);
}
}
}
leaderboardRepository = LeaderboardRepository(
dbClient: dbClient,
blacklistDocumentId: _initialsBlacklistId,
);
firebaseCloudStorage = FirebaseCloudStorage(
bucketName: _firebaseStorageBucket,
);
gameUrl = GameUrl(_gameUrl);
scriptsState = _scriptsState;
return serve(
handler,
ip,
port,
);
}
String get _appId {
final value = Platform.environment['FB_APP_ID'];
if (value == null) {
throw ArgumentError('FB_APP_ID is required to run the API');
}
return value;
}
String get projectId => _appId;
bool get _useEmulator => Platform.environment['USE_EMULATOR'] == 'true';
String get _gameUrl {
final value = Platform.environment['GAME_URL'];
if (value == null) {
throw ArgumentError('GAME_URL is required to run the API');
}
return value;
}
String get _initialsBlacklistId {
final value = Platform.environment['INITIALS_BLACKLIST_ID'];
if (value == null) {
throw ArgumentError('INITIALS_BLACKLIST_ID is required to run the API');
}
return value;
}
String get _firebaseStorageBucket {
final value = Platform.environment['FB_STORAGE_BUCKET'];
if (value == null) {
throw ArgumentError('FB_STORAGE_BUCKET is required to run the API');
}
return value;
}
enum ScriptsState {
enabled,
disabled,
}
ScriptsState get _scriptsState {
final value = Platform.environment['SCRIPTS_ENABLED'];
if (value == null) {
throw ArgumentError('SCRIPTS_ENABLED is required to run the API');
}
return value == 'true' ? ScriptsState.enabled : ScriptsState.disabled;
}
| io_flip/api/main.dart/0 | {
"file_path": "io_flip/api/main.dart",
"repo_id": "io_flip",
"token_count": 1988
} | 822 |
// ignore_for_file: prefer_const_constructors, one_member_abstracts
import 'dart:typed_data';
import 'package:card_renderer/card_renderer.dart';
import 'package:game_domain/game_domain.dart';
import 'package:http/http.dart';
import 'package:image/image.dart';
import 'package:mocktail/mocktail.dart';
import 'package:test/test.dart';
class _MockCommand extends Mock implements Command {}
class _MockBitmapFont extends Mock implements BitmapFont {}
class _MockBitmapFontCharacter extends Mock implements BitmapFontCharacter {}
class _MockResponse extends Mock implements Response {}
abstract class __HttpClient {
Future<Response> get(Uri uri);
}
class _MockHttpClient extends Mock implements __HttpClient {}
abstract class __BitmapFontLoader {
BitmapFont load(Uint8List bytes);
}
class _MockBitmapFontLoader extends Mock implements __BitmapFontLoader {}
void main() {
group('CardRenderer', () {
late __HttpClient httpClient;
late __BitmapFontLoader bitmapFontLoader;
late BitmapFont font;
late BitmapFontCharacter character;
late Map<int, BitmapFontCharacter> characters;
late CardRenderer cardRenderer;
setUpAll(() {
registerFallbackValue(Uint8List(0));
registerFallbackValue(Uri.parse(''));
registerFallbackValue(_MockBitmapFont());
});
test('can be instantiated', () {
expect(CardRenderer(), isNotNull);
});
group('renderCard', () {
late Command illustrationCommand;
late Command frameCommand;
late Command compositionCommand;
late Command elementIconCommand;
late Command powerSpriteCommand;
const card = Card(
id: 'Description',
name: 'Card Description',
description: '',
image: 'http://image.com/bla.png',
power: 0,
suit: Suit.fire,
rarity: false,
);
const rareCard = Card(
id: '',
name: 'Card Description',
description: '',
image: 'http://image.com/bla.png',
power: 0,
suit: Suit.fire,
rarity: true,
);
setUp(() {
illustrationCommand = _MockCommand();
frameCommand = _MockCommand();
compositionCommand = _MockCommand();
elementIconCommand = _MockCommand();
powerSpriteCommand = _MockCommand();
when(compositionCommand.execute)
.thenAnswer((_) async => compositionCommand);
when(() => compositionCommand.outputBytes).thenReturn(Uint8List(0));
httpClient = _MockHttpClient();
when(() => httpClient.get(any())).thenAnswer((_) async {
final response = _MockResponse();
when(() => response.statusCode).thenReturn(200);
when(() => response.bodyBytes).thenReturn(Uint8List(0));
return response;
});
bitmapFontLoader = _MockBitmapFontLoader();
font = _MockBitmapFont();
character = _MockBitmapFontCharacter();
characters = {67: character};
when(() => bitmapFontLoader.load(any())).thenReturn(font);
when(() => font.lineHeight).thenReturn(0);
when(() => font.base).thenReturn(0);
when(() => font.characters).thenReturn(characters);
when(() => character.xAdvance).thenReturn(0);
var commandCounter = 0;
cardRenderer = CardRenderer(
getCall: httpClient.get,
parseFont: bitmapFontLoader.load,
createCommand: () {
switch (commandCounter++) {
case 0:
return illustrationCommand;
case 1:
return frameCommand;
case 2:
return elementIconCommand;
case 3:
return powerSpriteCommand;
case 4:
return compositionCommand;
default:
throw Exception('Unexpected command creation');
}
},
);
});
test('returns the image bytes', () async {
final bytes = await cardRenderer.renderCard(card);
expect(bytes, isNotNull);
});
test('loads the correct images', () async {
const elementIconAssets = {
Suit.air: 'http://127.0.0.1:8080/assets/icon-air.png',
Suit.earth: 'http://127.0.0.1:8080/assets/icon-ground.png',
Suit.fire: 'http://127.0.0.1:8080/assets/icon-fire.png',
Suit.water: 'http://127.0.0.1:8080/assets/icon-water.png',
Suit.metal: 'http://127.0.0.1:8080/assets/icon-metal.png',
};
await cardRenderer.renderCard(card);
verify(() => httpClient.get(Uri.parse(card.image))).called(1);
verify(
() => httpClient.get(
Uri.parse('http://127.0.0.1:8080/assets/card-fire.png'),
),
).called(1);
verify(
() => httpClient.get(
Uri.parse('http://127.0.0.1:8080/assets/power-sprites.png'),
),
).called(1);
verify(
() => httpClient.get(
Uri.parse(elementIconAssets[card.suit]!),
),
).called(1);
verify(
() => httpClient.get(
Uri.parse(
'http://127.0.0.1:8080/assets/GoogleSans-14.ttf.zip',
),
),
).called(1);
verify(
() => httpClient.get(
Uri.parse(
'http://127.0.0.1:8080/assets/Saira-Bold-28.ttf.zip',
),
),
).called(1);
});
test('decode images correctly', () async {
await cardRenderer.renderCard(card);
verify(() => illustrationCommand.decodePng(any())).called(1);
verify(() => frameCommand.decodePng(any())).called(1);
verify(() => elementIconCommand.decodePng(any())).called(1);
verify(() => powerSpriteCommand.decodePng(any())).called(1);
});
test('draw the correct texts in the image', () async {
await cardRenderer.renderCard(card);
verify(
() => compositionCommand.drawString(
card.description,
font: any(named: 'font'),
x: any(named: 'x'),
y: any(named: 'y'),
),
).called(1);
verify(
() => compositionCommand.drawString(
card.name,
font: any(named: 'font'),
x: any(named: 'x'),
y: any(named: 'y'),
),
).called(1);
});
test('applies correct filters when card is rare', () async {
await cardRenderer.renderCard(rareCard);
verify(() => compositionCommand.filter(rainbowFilter)).called(1);
verify(() => compositionCommand.chromaticAberration(shift: 2))
.called(1);
});
test('throws CardRendererFailure when the output is null', () async {
when(() => compositionCommand.outputBytes).thenReturn(null);
await expectLater(
() => cardRenderer.renderCard(card),
throwsA(
isA<CardRendererFailure>().having(
(e) => e.toString(),
'message',
'[CardRendererFailure]: Failed to render card',
),
),
);
});
test('throws CardRendererFailure when the request fails', () async {
when(
() => httpClient.get(
Uri.parse('http://127.0.0.1:8080/assets/card-fire.png'),
),
).thenAnswer((_) async {
final response = _MockResponse();
when(() => response.statusCode).thenReturn(500);
return response;
});
await expectLater(
() => cardRenderer.renderCard(card),
throwsA(
isA<CardRendererFailure>().having(
(e) => e.message,
'message',
'Exception: Failed to get image from http://127.0.0.1:8080/assets/card-fire.png',
),
),
);
});
});
group('renderDeck', () {
late Command compositionCommand;
final cards = List.generate(
3,
(i) => Card(
id: 'card$i',
name: 'Card Description',
description: '',
image: 'http://image.com/bla.png',
power: 0,
suit: Suit.fire,
rarity: false,
),
);
setUp(() {
compositionCommand = _MockCommand();
when(compositionCommand.execute)
.thenAnswer((_) async => compositionCommand);
when(() => compositionCommand.outputBytes).thenReturn(Uint8List(0));
httpClient = _MockHttpClient();
when(() => httpClient.get(any())).thenAnswer((_) async {
final response = _MockResponse();
when(() => response.statusCode).thenReturn(200);
when(() => response.bodyBytes).thenReturn(Uint8List(0));
return response;
});
bitmapFontLoader = _MockBitmapFontLoader();
font = _MockBitmapFont();
character = _MockBitmapFontCharacter();
characters = {67: character};
when(() => bitmapFontLoader.load(any())).thenReturn(font);
when(() => font.lineHeight).thenReturn(0);
when(() => font.base).thenReturn(0);
when(() => font.characters).thenReturn(characters);
when(() => character.xAdvance).thenReturn(0);
var commandCounter = 0;
cardRenderer = CardRenderer(
getCall: httpClient.get,
parseFont: bitmapFontLoader.load,
createCommand: () {
if (commandCounter++ == 18) {
return compositionCommand;
} else {
final command = _MockCommand();
when(command.execute).thenAnswer((_) async => command);
when(() => command.outputBytes).thenReturn(Uint8List(0));
return command;
}
},
);
});
test('returns the image bytes', () async {
final bytes = await cardRenderer.renderDeck(cards);
expect(bytes, isNotNull);
});
test('throws CardRendererFailure when the output is null', () async {
when(() => compositionCommand.outputBytes).thenReturn(null);
await expectLater(
() => cardRenderer.renderDeck(cards),
throwsA(
isA<CardRendererFailure>().having(
(e) => e.toString(),
'message',
'[CardRendererFailure]: Failed to render deck',
),
),
);
});
test('throws CardRendererFailure when something else fails', () async {
when(compositionCommand.execute).thenThrow(Exception('Ops'));
await expectLater(
() => cardRenderer.renderDeck(cards),
throwsA(
isA<CardRendererFailure>().having(
(e) => e.message,
'message',
'Exception: Ops',
),
),
);
});
});
});
}
| io_flip/api/packages/card_renderer/test/src/card_renderer_test.dart/0 | {
"file_path": "io_flip/api/packages/card_renderer/test/src/card_renderer_test.dart",
"repo_id": "io_flip",
"token_count": 5036
} | 823 |
name: config_repository
description: Repository with access to dynamic project configurations
version: 0.1.0+1
publish_to: none
environment:
sdk: ">=2.18.0 <3.0.0"
dependencies:
db_client:
path: ../db_client
dev_dependencies:
mocktail: ^0.3.0
test: ^1.19.2
very_good_analysis: ^3.1.0
| io_flip/api/packages/config_repository/pubspec.yaml/0 | {
"file_path": "io_flip/api/packages/config_repository/pubspec.yaml",
"repo_id": "io_flip",
"token_count": 124
} | 824 |
name: encryption_middleware
description: A dart_frog middleware for encrypting responses.
version: 0.1.0+1
publish_to: none
environment:
sdk: ">=3.0.0 <4.0.0"
dependencies:
dart_frog: ^0.3.0
encrypt: ^5.0.1
dev_dependencies:
mocktail: ^0.3.0
test: ^1.19.2
very_good_analysis: ^3.1.0
| io_flip/api/packages/encryption_middleware/pubspec.yaml/0 | {
"file_path": "io_flip/api/packages/encryption_middleware/pubspec.yaml",
"repo_id": "io_flip",
"token_count": 131
} | 825 |
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
part 'card_description.g.dart';
/// {@template card_description}
/// Card description.
/// {@endtemplate}
@JsonSerializable(ignoreUnannotated: true, explicitToJson: true)
class CardDescription extends Equatable {
/// {@macro card_description}
const CardDescription({
required this.character,
required this.characterClass,
required this.power,
required this.location,
required this.description,
});
/// {@macro card_description}
factory CardDescription.fromJson(Map<String, dynamic> json) =>
_$CardDescriptionFromJson(json);
/// Character.
@JsonKey()
final String character;
/// Character class.
@JsonKey()
final String characterClass;
/// Power.
@JsonKey()
final String power;
/// Location.
@JsonKey()
final String location;
/// Description.
@JsonKey()
final String description;
/// Converts this object to a map in JSON format.
Map<String, dynamic> toJson() => _$CardDescriptionToJson(this);
@override
List<Object?> get props => [
character,
characterClass,
power,
location,
description,
];
}
| io_flip/api/packages/game_domain/lib/src/models/card_description.dart/0 | {
"file_path": "io_flip/api/packages/game_domain/lib/src/models/card_description.dart",
"repo_id": "io_flip",
"token_count": 413
} | 826 |
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'score_card.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
ScoreCard _$ScoreCardFromJson(Map<String, dynamic> json) => ScoreCard(
id: json['id'] as String,
wins: json['wins'] as int? ?? 0,
longestStreak: json['longestStreak'] as int? ?? 0,
currentStreak: json['currentStreak'] as int? ?? 0,
latestStreak: json['latestStreak'] as int? ?? 0,
longestStreakDeck: json['longestStreakDeck'] as String? ?? '',
currentDeck: json['currentDeck'] as String? ?? '',
latestDeck: json['latestDeck'] as String? ?? '',
initials: json['initials'] as String?,
);
Map<String, dynamic> _$ScoreCardToJson(ScoreCard instance) => <String, dynamic>{
'id': instance.id,
'wins': instance.wins,
'longestStreak': instance.longestStreak,
'currentStreak': instance.currentStreak,
'latestStreak': instance.latestStreak,
'longestStreakDeck': instance.longestStreakDeck,
'currentDeck': instance.currentDeck,
'latestDeck': instance.latestDeck,
'initials': instance.initials,
};
| io_flip/api/packages/game_domain/lib/src/models/score_card.g.dart/0 | {
"file_path": "io_flip/api/packages/game_domain/lib/src/models/score_card.g.dart",
"repo_id": "io_flip",
"token_count": 450
} | 827 |
// ignore_for_file: prefer_const_constructors
import 'package:game_domain/game_domain.dart';
import 'package:game_script_machine/game_script_machine.dart';
import 'package:mocktail/mocktail.dart';
import 'package:test/test.dart';
class _MockGameScriptEngine extends Mock implements GameScriptMachine {}
void main() {
setUpAll(() {
registerFallbackValue(
Card(
id: 'card',
description: '',
name: '',
image: '',
rarity: false,
power: 1,
suit: Suit.air,
),
);
});
group('MatchSolver', () {
late GameScriptMachine gameScriptMachine;
late MatchSolver matchSolver;
setUp(() {
gameScriptMachine = _MockGameScriptEngine();
matchSolver = MatchSolver(gameScriptMachine: gameScriptMachine);
});
group('calculateMatchResult', () {
final cards = List.generate(
6,
(i) => Card(
id: 'card_$i',
description: '',
name: '',
image: '',
rarity: false,
power: 1 + i,
suit: Suit.values[i % Suit.values.length],
),
);
test("throws MatchResolutionFailure when the match isn't over yet", () {
final match = Match(
id: '',
hostDeck: Deck(
id: '',
userId: '',
cards: [cards[0], cards[2], cards[4]],
),
guestDeck: Deck(
id: '',
userId: '',
cards: [cards[1], cards[3], cards[5]],
),
);
final state = MatchState(
id: '',
matchId: '',
hostPlayedCards: [cards[4].id, cards[2].id, cards[0].id],
guestPlayedCards: [cards[3].id, cards[1].id],
);
expect(
() => matchSolver.calculateMatchResult(
match,
state,
),
throwsA(isA<MatchResolutionFailure>()),
);
});
test('return host when the host has won', () {
when(() => gameScriptMachine.compare(any(), any())).thenReturn(1);
final match = Match(
id: '',
hostDeck: Deck(
id: '',
userId: '',
cards: [cards[0], cards[2], cards[4]],
),
guestDeck: Deck(
id: '',
userId: '',
cards: [cards[1], cards[3], cards[5]],
),
);
final state = MatchState(
id: '',
matchId: '',
hostPlayedCards: [cards[4].id, cards[2].id, cards[0].id],
guestPlayedCards: [cards[3].id, cards[1].id, cards[5].id],
);
final matchResult = matchSolver.calculateMatchResult(
match,
state,
);
expect(matchResult, equals(MatchResult.host));
});
test('return guest when the guest has won', () {
when(() => gameScriptMachine.compare(any(), any())).thenReturn(-1);
final match = Match(
id: '',
hostDeck: Deck(
id: '',
userId: '',
cards: [cards[0], cards[2], cards[4]],
),
guestDeck: Deck(
id: '',
userId: '',
cards: [cards[1], cards[3], cards[5]],
),
);
final state = MatchState(
id: '',
matchId: '',
hostPlayedCards: [cards[0].id, cards[2].id, cards[4].id],
guestPlayedCards: [cards[3].id, cards[1].id, cards[5].id],
);
final matchResult = matchSolver.calculateMatchResult(
match,
state,
);
expect(matchResult, equals(MatchResult.guest));
});
test('returns draw when match is draw', () {
when(() => gameScriptMachine.compare(any(), any())).thenReturn(0);
final cards = List.generate(
6,
(i) => Card(
id: 'card_$i',
description: '',
name: '',
image: '',
rarity: false,
power: 1,
suit: Suit.values[i % Suit.values.length],
),
);
final match = Match(
id: '',
hostDeck: Deck(
id: '',
userId: '',
cards: [cards[0], cards[2], cards[4]],
),
guestDeck: Deck(
id: '',
userId: '',
cards: [cards[1], cards[3], cards[5]],
),
);
final state = MatchState(
id: '',
matchId: '',
hostPlayedCards: [cards[0].id, cards[2].id, cards[4].id],
guestPlayedCards: [cards[3].id, cards[1].id, cards[5].id],
);
final matchResult = matchSolver.calculateMatchResult(
match,
state,
);
expect(matchResult, equals(MatchResult.draw));
});
});
group('calculateRoundResult', () {
final cards = List.generate(
6,
(i) => Card(
id: 'card_$i',
description: '',
name: '',
image: '',
rarity: false,
power: 1 + i,
suit: Suit.values[i % Suit.values.length],
),
);
test("throws MatchResolutionFailure when the round isn't over yet", () {
final match = Match(
id: '',
hostDeck: Deck(
id: '',
userId: '',
cards: [cards[0], cards[2], cards[4]],
),
guestDeck: Deck(
id: '',
userId: '',
cards: [cards[1], cards[3], cards[5]],
),
);
final state = MatchState(
id: '',
matchId: '',
hostPlayedCards: [cards[4].id, cards[2].id, cards[0].id],
guestPlayedCards: [cards[3].id, cards[1].id],
);
expect(
() => matchSolver.calculateRoundResult(
match,
state,
2,
),
throwsA(isA<MatchResolutionFailure>()),
);
});
test('correctly call the gameScriptMachine', () {
final match = Match(
id: '',
hostDeck: Deck(
id: '',
userId: '',
cards: [cards[0], cards[2], cards[4]],
),
guestDeck: Deck(
id: '',
userId: '',
cards: [cards[1], cards[3], cards[5]],
),
);
final state = MatchState(
id: '',
matchId: '',
hostPlayedCards: [cards[4].id, cards[2].id, cards[0].id],
guestPlayedCards: [cards[3].id, cards[1].id, cards[5].id],
);
when(() => gameScriptMachine.compare(cards[2], cards[1])).thenReturn(1);
final matchResult = matchSolver.calculateRoundResult(
match,
state,
1,
);
expect(matchResult, equals(MatchResult.host));
verify(() => gameScriptMachine.compare(cards[2], cards[1])).called(1);
});
});
group('isPlayerTurn', () {
group('when the host starts the match', () {
group('when is the first round', () {
group('first move', () {
final matchState = MatchState(
id: '',
matchId: '',
hostPlayedCards: const [],
guestPlayedCards: const [],
);
test('returns true when is the host', () {
expect(
matchSolver.isPlayerAllowedToPlay(matchState, isHost: true),
isTrue,
);
});
test('returns true when is the guest', () {
expect(
matchSolver.isPlayerAllowedToPlay(matchState, isHost: false),
isTrue,
);
});
});
group('second move', () {
final matchState = MatchState(
id: '',
matchId: '',
hostPlayedCards: const [''],
guestPlayedCards: const [],
);
test('returns false when is the host', () {
expect(
matchSolver.isPlayerAllowedToPlay(matchState, isHost: true),
isFalse,
);
});
test('returns true when is the guest', () {
expect(
matchSolver.isPlayerAllowedToPlay(matchState, isHost: false),
isTrue,
);
});
});
});
group('when is the second round', () {
group('first move', () {
final matchState = MatchState(
id: '',
matchId: '',
hostPlayedCards: const [''],
guestPlayedCards: const [''],
);
test('returns true when is the host', () {
expect(
matchSolver.isPlayerAllowedToPlay(matchState, isHost: true),
isTrue,
);
});
test('returns true when is the guest', () {
expect(
matchSolver.isPlayerAllowedToPlay(matchState, isHost: false),
isTrue,
);
});
});
group('second move', () {
final matchState = MatchState(
id: '',
matchId: '',
hostPlayedCards: const [''],
guestPlayedCards: const ['', ''],
);
test('returns true when is the host', () {
expect(
matchSolver.isPlayerAllowedToPlay(matchState, isHost: true),
true,
);
});
test('returns false when is the guest', () {
expect(
matchSolver.isPlayerAllowedToPlay(matchState, isHost: false),
isFalse,
);
});
});
});
group('when is the third round', () {
group('first move', () {
final matchState = MatchState(
id: '',
matchId: '',
hostPlayedCards: const ['', ''],
guestPlayedCards: const ['', ''],
);
test('returns true when is the host', () {
expect(
matchSolver.isPlayerAllowedToPlay(matchState, isHost: true),
isTrue,
);
});
test('returns true when is the guest', () {
expect(
matchSolver.isPlayerAllowedToPlay(matchState, isHost: false),
isTrue,
);
});
});
group('second move', () {
final matchState = MatchState(
id: '',
matchId: '',
hostPlayedCards: const ['', '', ''],
guestPlayedCards: const ['', ''],
);
test('returns false when is the host', () {
expect(
matchSolver.isPlayerAllowedToPlay(matchState, isHost: true),
isFalse,
);
});
test('returns true when is the guest', () {
expect(
matchSolver.isPlayerAllowedToPlay(matchState, isHost: false),
isTrue,
);
});
});
});
});
});
group('canPlayCard', () {
group('when is the host', () {
const isHost = true;
test('returns false when host has already played card', () {
const cardId = 'test';
final matchState = MatchState(
id: '',
matchId: '',
hostPlayedCards: const [cardId],
guestPlayedCards: const ['', ''],
);
expect(
matchSolver.canPlayCard(matchState, cardId, isHost: isHost),
isFalse,
);
});
test('returns value based on turn', () {
final matchState = MatchState(
id: '',
matchId: '',
hostPlayedCards: const [],
guestPlayedCards: const [],
);
expect(
matchSolver.canPlayCard(matchState, '', isHost: isHost),
matchSolver.isPlayerAllowedToPlay(matchState, isHost: isHost),
);
});
});
group('when is the guest', () {
const isHost = false;
test('returns false when guest has already played card', () {
const cardId = 'test';
final matchState = MatchState(
id: '',
matchId: '',
hostPlayedCards: const ['', ''],
guestPlayedCards: const [cardId],
);
expect(
matchSolver.canPlayCard(matchState, cardId, isHost: isHost),
isFalse,
);
});
test('returns value based on turn', () {
final matchState = MatchState(
id: '',
matchId: '',
hostPlayedCards: const [],
guestPlayedCards: const [],
);
expect(
matchSolver.canPlayCard(matchState, '', isHost: isHost),
matchSolver.isPlayerAllowedToPlay(matchState, isHost: isHost),
);
});
});
});
});
}
| io_flip/api/packages/game_domain/test/src/solvers/match_solver_test.dart/0 | {
"file_path": "io_flip/api/packages/game_domain/test/src/solvers/match_solver_test.dart",
"repo_id": "io_flip",
"token_count": 7155
} | 828 |
name: image_model_repository
description: Repository providing access image model services
version: 0.1.0+1
publish_to: none
environment:
sdk: ">=3.0.0 <4.0.0"
dependencies:
game_domain:
path: ../game_domain
prompt_repository:
path: ../prompt_repository
dev_dependencies:
mocktail: ^0.3.0
test: ^1.24.2
very_good_analysis: ^4.0.0
| io_flip/api/packages/image_model_repository/pubspec.yaml/0 | {
"file_path": "io_flip/api/packages/image_model_repository/pubspec.yaml",
"repo_id": "io_flip",
"token_count": 147
} | 829 |
include: package:very_good_analysis/analysis_options.4.0.0.yaml
| io_flip/api/packages/language_model_repository/analysis_options.yaml/0 | {
"file_path": "io_flip/api/packages/language_model_repository/analysis_options.yaml",
"repo_id": "io_flip",
"token_count": 23
} | 830 |
/// Access to the game scripts data source
library scripts_repository;
export 'src/scripts_repository.dart';
| io_flip/api/packages/scripts_repository/lib/scripts_repository.dart/0 | {
"file_path": "io_flip/api/packages/scripts_repository/lib/scripts_repository.dart",
"repo_id": "io_flip",
"token_count": 32
} | 831 |
import 'dart:async';
import 'dart:io';
import 'package:dart_frog/dart_frog.dart';
import 'package:leaderboard_repository/leaderboard_repository.dart';
FutureOr<Response> onRequest(RequestContext context) async {
if (context.request.method == HttpMethod.get) {
final leaderboardRepository = context.read<LeaderboardRepository>();
final leaderboardPlayers = await leaderboardRepository.getLeaderboard();
return Response.json(
body: {
'leaderboardPlayers': leaderboardPlayers
.map(
(player) => player.toJson(),
)
.toList(),
},
);
}
return Response(statusCode: HttpStatus.methodNotAllowed);
}
| io_flip/api/routes/game/leaderboard/results/index.dart/0 | {
"file_path": "io_flip/api/routes/game/leaderboard/results/index.dart",
"repo_id": "io_flip",
"token_count": 266
} | 832 |
import 'dart:io';
import 'package:cards_repository/cards_repository.dart';
import 'package:dart_frog/dart_frog.dart';
import 'package:jwt_middleware/jwt_middleware.dart';
import 'package:logging/logging.dart';
import 'package:mocktail/mocktail.dart';
import 'package:test/test.dart';
import '../../../../routes/game/decks/index.dart' as route;
class _MockRequestContext extends Mock implements RequestContext {}
class _MockCardsRepository extends Mock implements CardsRepository {}
class _MockAuthenticatedUser extends Mock implements AuthenticatedUser {}
class _MockRequest extends Mock implements Request {}
class _MockLogger extends Mock implements Logger {}
void main() {
group('POST /game/decks', () {
late CardsRepository cardsRepository;
late AuthenticatedUser user;
late Request request;
late RequestContext context;
late Logger logger;
setUp(() {
cardsRepository = _MockCardsRepository();
when(
() => cardsRepository.createDeck(
cardIds: any(named: 'cardIds'),
userId: any(named: 'userId'),
),
).thenAnswer((_) async => 'deckId');
user = _MockAuthenticatedUser();
when(() => user.id).thenReturn('mock-userId');
request = _MockRequest();
when(() => request.method).thenReturn(HttpMethod.post);
when(request.json).thenAnswer(
(_) async => {
'cards': ['a', 'b', 'c'],
'userId': 'mock-userId',
},
);
logger = _MockLogger();
context = _MockRequestContext();
when(() => context.request).thenReturn(request);
when(() => context.read<CardsRepository>()).thenReturn(cardsRepository);
when(() => context.read<AuthenticatedUser>()).thenReturn(user);
when(() => context.read<Logger>()).thenReturn(logger);
});
test('responds with a 200', () async {
final response = await route.onRequest(context);
expect(response.statusCode, equals(HttpStatus.ok));
});
test('responds with a 400 when request is invalid', () async {
when(request.json).thenAnswer((_) async => {'cards': 'a'});
final response = await route.onRequest(context);
expect(response.statusCode, equals(HttpStatus.badRequest));
});
test('responds with the deck id', () async {
final response = await route.onRequest(context);
final json = await response.json() as Map<String, dynamic>;
expect(
json['id'],
equals('deckId'),
);
});
test('allows only post methods', () async {
when(() => request.method).thenReturn(HttpMethod.get);
final response = await route.onRequest(context);
expect(response.statusCode, equals(HttpStatus.methodNotAllowed));
});
});
}
| io_flip/api/test/routes/game/decks/index_test.dart/0 | {
"file_path": "io_flip/api/test/routes/game/decks/index_test.dart",
"repo_id": "io_flip",
"token_count": 1022
} | 833 |
# Data Loader
[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link]
[](https://github.com/felangel/mason)
[![License: MIT][license_badge]][license_link]
Dart tool that feed data into the Database
## Installation 💻
**❗ In order to start using Data Loader you must have the [Dart SDK][dart_install_link] installed on your machine.**
Add `data_loader` to your `pubspec.yaml`:
```yaml
dependencies:
data_loader:
```
Install it:
```sh
dart pub get
```
## Run the tool
This tool is used to insert data in firebase,
It have a couple of commands, one to load the prompt terms in the firestore database of the project, another one quite similar, but that loads card descriptions, and one to load placeholder images in firestore cloud storage for those prompts.
Download the prompts CSV which must have the following format:
```
'Character,Class,Power,Location,'
'Dash,Alien,Banjos,City,'
...
```
Download the description CSV which must have the following format:
```
'Character,Class,Power,Location,Description 1,Description X...'
'Dash,Alien,Banjos,City,Desc 1, Desc X...'
...
```
### Loading prompts
Run:
```
dart bin/data_loader.dart prompts projectId csv_file_location.csv
```
It uses the gcloud default admin app for auth, so you must have it properly configured
in your machine before running it.
### Loading descriptions
Run:
```
dart bin/data_loader.dart descriptions projectId csv_file_location.csv
```
It uses the gcloud default admin app for auth, so you must have it properly configured
in your machine before running it.
### Loading images placeholder
The images placeholder command will create the expected file structure in a `destination_folder`
which should then be uploaded to firebase cloud storage.
In order to do so, run:
```
dart bin/data_loader.dart images destination_folder csv_file_location.csv placeholder_image_path <card_variation_number>
```
Then, inside the `destination_folder`, run:
```
gcloud storage cp --gzip-local-all --recursive . gs://<bucket-id>
```
Similar to the prompts command, you need to have the gcloud cli properly configured
and authenticated.
### Validating images
This commands takes a CSV with the prompts, a number of variations and check if a certain folder
has an image for all of the prompt combinations. This commands assumes that which character has its
own folder, so it should be executed once per character.
```
dart bin/data_loader.dart validate_images <images_folder> <csv_file_location.csv> <card_variation_number> <character>
```
### Generating lookup table
This commands takes a CSV with the prompts, a number of variations and check if a certain folder
has an image for all of the prompt combinations.
When it find prompts combinations that does not have all the variations, it will insert a lookup record in the db, so the game have a way of knowing which are the available images that it can use as a fall back.
This commands assumes that which character has its
own folder, so it should be executed once per character.
```
dart bin/data_loader.dart generate_tables <projectId> <images_folder> <csv_file_location.csv> <card_variation_number> <character>
```
| io_flip/api/tools/data_loader/README.md/0 | {
"file_path": "io_flip/api/tools/data_loader/README.md",
"repo_id": "io_flip",
"token_count": 948
} | 834 |
// ignore_for_file: prefer_const_constructors
import 'dart:io';
import 'package:data_loader/data_loader.dart';
import 'package:db_client/db_client.dart';
import 'package:game_domain/game_domain.dart';
import 'package:mocktail/mocktail.dart';
import 'package:path/path.dart' as path;
import 'package:test/test.dart';
class _MockFile extends Mock implements File {}
class _MockDirectory extends Mock implements Directory {}
class _MockDbClient extends Mock implements DbClient {}
void main() {
group('CreateImageLookup', () {
setUpAll(() {
registerFallbackValue(
PromptTerm(term: '', type: PromptTermType.character),
);
});
test('can be instantiated', () {
expect(
CreateImageLookup(
dbClient: _MockDbClient(),
csv: _MockFile(),
imagesFolder: _MockDirectory(),
character: 'dash',
variations: 3,
),
isNotNull,
);
});
group('validate', () {
late File csv;
late Directory imagesFolder;
late DbClient dbClient;
setUp(() {
csv = _MockFile();
dbClient = _MockDbClient();
when(
() => dbClient.add(
any(),
any(),
),
).thenAnswer((_) async => '');
imagesFolder = Directory(
path.join(
Directory.systemTemp.path,
'character_folder_validator_test',
),
);
if (imagesFolder.existsSync()) {
imagesFolder.deleteSync(recursive: true);
}
imagesFolder.createSync();
final files = [
File(path.join(imagesFolder.path, 'dash_alien_city_0.png')),
File(path.join(imagesFolder.path, 'dash_alien_city_1.png')),
File(path.join(imagesFolder.path, 'dash_mage_city_1.png')),
File(path.join(imagesFolder.path, 'dash_alien_forest_0.png')),
File(path.join(imagesFolder.path, 'dash_mage_forest_0.png')),
File(path.join(imagesFolder.path, 'dash_mage_forest_1.png')),
];
for (final file in files) {
file.createSync();
}
});
test('return the missing files', () async {
when(() => csv.readAsLines()).thenAnswer(
(_) async => [
'Character,Class,Power,Power(Shorter),Location,',
'Dash,Alien,Banjos,B,City,',
'Android,Mage,Bass,B,Forest,',
],
);
final generator = CreateImageLookup(
dbClient: dbClient,
csv: csv,
imagesFolder: imagesFolder,
character: 'dash',
variations: 2,
);
await generator.generateLookupTable((_, __) {});
verify(
() => dbClient.add('image_lookup_table', {
'prompt': 'dash_alien_forest',
'available_images': ['dash_alien_forest_0.png'],
}),
).called(1);
verify(
() => dbClient.add('image_lookup_table', {
'prompt': 'dash_mage_city',
'available_images': ['dash_mage_city_1.png'],
}),
).called(1);
});
test('progress is called correctly', () async {
when(() => csv.readAsLines()).thenAnswer(
(_) async => [
'Character,Class,Power,Power(Shorter),Location,',
'Dash,Alien,Banjos,B,City,',
'Android,Mage,Bass,B,Forest,',
],
);
final generator = CreateImageLookup(
dbClient: dbClient,
csv: csv,
imagesFolder: imagesFolder,
character: 'dash',
variations: 2,
);
final progress = <List<int>>[];
await generator.generateLookupTable((current, total) {
progress.add([current, total]);
});
expect(
progress,
equals(
[
[1, 4],
[2, 4],
[3, 4],
[4, 4],
],
),
);
});
});
});
}
| io_flip/api/tools/data_loader/test/src/create_image_lookup_test.dart/0 | {
"file_path": "io_flip/api/tools/data_loader/test/src/create_image_lookup_test.dart",
"repo_id": "io_flip",
"token_count": 1973
} | 835 |
// ignore_for_file: prefer_const_constructors
import 'package:bloc_test/bloc_test.dart';
import 'package:flop/flop/flop.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mocktail/mocktail.dart';
class _MockFlopBloc extends Mock implements FlopBloc {}
void main() {
group('Flop', () {
testWidgets('renders FlopView', (tester) async {
final bloc = _MockFlopBloc();
whenListen(
bloc,
Stream.fromIterable([
const FlopState.initial(),
]),
initialState: const FlopState.initial(),
);
await tester.pumpWidget(
BlocProvider<FlopBloc>.value(
value: bloc,
child: MaterialApp(
home: Scaffold(
body: FlopView(),
),
),
),
);
expect(find.byType(FlopView), findsOneWidget);
});
});
}
| io_flip/flop/test/flop_test.dart/0 | {
"file_path": "io_flip/flop/test/flop_test.dart",
"repo_id": "io_flip",
"token_count": 444
} | 836 |
{
"include": [
".eslintrc.js",
"test"
]
}
| io_flip/functions/tsconfig.dev.json/0 | {
"file_path": "io_flip/functions/tsconfig.dev.json",
"repo_id": "io_flip",
"token_count": 32
} | 837 |
import 'package:flutter/material.dart' hide ConnectionState;
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:game_domain/game_domain.dart';
import 'package:io_flip/connection/connection.dart';
import 'package:io_flip/l10n/l10n.dart';
import 'package:io_flip_ui/io_flip_ui.dart';
class ConnectionOverlay extends StatelessWidget {
const ConnectionOverlay({super.key, this.child});
final Widget? child;
@override
Widget build(BuildContext context) {
return BlocBuilder<ConnectionBloc, ConnectionState>(
builder: (context, state) {
if (state is ConnectionFailure) {
return _ConnectionOverlayFailure(
error: state.error,
child: child,
);
}
return child ?? const SizedBox.shrink();
},
);
}
}
class _ConnectionOverlayFailure extends StatelessWidget {
const _ConnectionOverlayFailure({
required this.error,
required this.child,
});
final WebSocketErrorCode error;
final Widget? child;
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
return Stack(
children: [
if (child != null) child!,
Positioned.fill(
child: Material(
color: IoFlipColors.seedScrim.withOpacity(0.75),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
error == WebSocketErrorCode.playerAlreadyConnected
? l10n.playerAlreadyConnectedError
: l10n.unknownConnectionError,
style: IoFlipTextStyles.mobileH1,
textAlign: TextAlign.center,
),
const SizedBox(height: 8),
Text(
error == WebSocketErrorCode.playerAlreadyConnected
? l10n.playerAlreadyConnectedErrorBody
: l10n.unknownConnectionErrorBody,
style: IoFlipTextStyles.bodyXL,
textAlign: TextAlign.center,
),
if (error == WebSocketErrorCode.unknown) ...[
const SizedBox(height: 40),
RoundedButton.text(
l10n.unknownConnectionErrorButton,
onPressed: () => context.read<ConnectionBloc>().add(
const ConnectionRequested(),
),
backgroundColor: IoFlipColors.seedBlack,
foregroundColor: IoFlipColors.seedWhite,
borderColor: IoFlipColors.seedPaletteNeutral40,
),
],
],
),
),
),
],
);
}
}
| io_flip/lib/connection/view/connection_overlay.dart/0 | {
"file_path": "io_flip/lib/connection/view/connection_overlay.dart",
"repo_id": "io_flip",
"token_count": 1360
} | 838 |
part of 'game_bloc.dart';
abstract class GameState extends Equatable {
const GameState();
}
class MatchLoadingState extends GameState {
const MatchLoadingState();
@override
List<Object> get props => [];
}
class MatchLoadFailedState extends GameState {
const MatchLoadFailedState({required this.deck});
final Deck? deck;
@override
List<Object?> get props => [deck];
}
class MatchRound extends Equatable {
const MatchRound({
required this.playerCardId,
required this.opponentCardId,
this.showCardsOverlay = false,
this.turnTimerStarted = false,
});
final String? playerCardId;
final String? opponentCardId;
final bool showCardsOverlay;
final bool turnTimerStarted;
MatchRound copyWith({
String? playerCardId,
String? opponentCardId,
bool? showCardsOverlay,
bool? turnTimerStarted,
}) {
return MatchRound(
playerCardId: playerCardId ?? this.playerCardId,
opponentCardId: opponentCardId ?? this.opponentCardId,
showCardsOverlay: showCardsOverlay ?? this.showCardsOverlay,
turnTimerStarted: turnTimerStarted ?? this.turnTimerStarted,
);
}
@override
List<Object?> get props => [
playerCardId,
opponentCardId,
showCardsOverlay,
turnTimerStarted,
];
}
class MatchLoadedState extends GameState {
const MatchLoadedState({
required this.match,
required this.matchState,
required this.rounds,
required this.playerScoreCard,
required this.turnTimeRemaining,
required this.turnAnimationsFinished,
required this.isClashScene,
required this.showCardLanding,
this.lastPlayedCardId,
});
final Match match;
final MatchState matchState;
final List<MatchRound> rounds;
final ScoreCard playerScoreCard;
final int turnTimeRemaining;
final bool turnAnimationsFinished;
final bool isClashScene;
final bool showCardLanding;
final String? lastPlayedCardId;
MatchLoadedState copyWith({
Match? match,
MatchState? matchState,
List<MatchRound>? rounds,
ScoreCard? playerScoreCard,
int? turnTimeRemaining,
bool? turnAnimationsFinished,
bool? isClashScene,
bool? showCardLanding,
String? lastPlayedCardId,
}) {
return MatchLoadedState(
match: match ?? this.match,
matchState: matchState ?? this.matchState,
rounds: rounds ?? this.rounds,
playerScoreCard: playerScoreCard ?? this.playerScoreCard,
turnTimeRemaining: turnTimeRemaining ?? this.turnTimeRemaining,
turnAnimationsFinished:
turnAnimationsFinished ?? this.turnAnimationsFinished,
isClashScene: isClashScene ?? this.isClashScene,
showCardLanding: showCardLanding ?? this.showCardLanding,
lastPlayedCardId: lastPlayedCardId,
);
}
@override
List<Object> get props => [
match,
matchState,
rounds,
playerScoreCard,
turnTimeRemaining,
turnAnimationsFinished,
isClashScene,
showCardLanding,
];
}
class LeaderboardEntryState extends GameState {
const LeaderboardEntryState(
this.scoreCardId, {
this.shareHandPageData,
});
final String scoreCardId;
final ShareHandPageData? shareHandPageData;
@override
List<Object?> get props => [scoreCardId, shareHandPageData];
}
class OpponentAbsentState extends GameState {
const OpponentAbsentState({required this.deck});
final Deck? deck;
@override
List<Object?> get props => [deck];
}
class ManagePlayerPresenceFailedState extends GameState {
const ManagePlayerPresenceFailedState();
@override
List<Object> get props => [];
}
| io_flip/lib/game/bloc/game_state.dart/0 | {
"file_path": "io_flip/lib/game/bloc/game_state.dart",
"repo_id": "io_flip",
"token_count": 1290
} | 839 |
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:io_flip/gen/assets.gen.dart';
import 'package:io_flip/how_to_play/how_to_play.dart';
import 'package:io_flip/l10n/l10n.dart';
import 'package:io_flip/utils/utils.dart';
import 'package:io_flip_ui/io_flip_ui.dart';
const _imageHeight = 184.0;
class HowToPlayView extends StatelessWidget {
const HowToPlayView({super.key});
@override
Widget build(BuildContext context) {
final totalSteps = context.select<HowToPlayBloc, int>(
(bloc) => bloc.state.totalSteps,
);
final selectedPageIndex = context.select<HowToPlayBloc, int>(
(bloc) => bloc.state.position,
);
return Column(
mainAxisSize: MainAxisSize.min,
children: [
const SizedBox(
height: 400,
child: HowToPlayStepView(),
),
Container(
padding: const EdgeInsets.only(
top: IoFlipSpacing.lg * 2,
bottom: IoFlipSpacing.lg,
),
constraints: const BoxConstraints(maxWidth: 224),
child: Row(
key: const Key('how_to_play_page_indicator'),
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: List.generate(
totalSteps,
(index) => Container(
height: 12,
width: 12,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: selectedPageIndex == index
? IoFlipColors.seedYellow
: IoFlipColors.seedGrey70,
),
),
),
),
),
Padding(
padding: const EdgeInsets.symmetric(vertical: IoFlipSpacing.lg),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
RoundedButton.icon(
Icons.arrow_back,
onPressed: () {
final bloc = context.read<HowToPlayBloc>();
if (bloc.state.position == 0) {
context.maybePop();
} else {
bloc.add(const PreviousPageRequested());
}
},
),
const SizedBox(width: IoFlipSpacing.md),
RoundedButton.icon(
Icons.arrow_forward,
onPressed: () {
final bloc = context.read<HowToPlayBloc>();
if (bloc.state.position == totalSteps - 1) {
context.maybePop();
} else {
bloc.add(const NextPageRequested());
}
},
),
],
),
),
],
);
}
}
class HowToPlayStepView extends StatelessWidget {
const HowToPlayStepView({super.key});
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
const steps = HowToPlayState.steps;
return BlocBuilder<HowToPlayBloc, HowToPlayState>(
builder: (context, state) {
final Widget child;
final Key key;
if (state.position < steps.length) {
key = ValueKey(state.position);
child = steps[state.position];
} else {
key = const ValueKey('suits_wheel');
child = SuitsWheel(
suits: state.wheelSuits,
affectedIndexes: state.affectedIndicatorIndexes,
text: state.wheelSuits.first.text(l10n),
);
}
return FadeAnimatedSwitcher(
duration: transitionDuration,
child: Container(
key: key,
child: child,
),
);
},
);
}
}
class HowToPlayIntro extends StatelessWidget {
const HowToPlayIntro({super.key});
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
return Column(
mainAxisSize: MainAxisSize.min,
children: [
IoFlipLogo(height: _imageHeight),
const SizedBox(height: IoFlipSpacing.xxlg),
Flexible(
child: HowToPlayStyledText(l10n.howToPlayIntroTitle),
),
],
);
}
}
class HowToPlayHandBuilding extends StatelessWidget {
const HowToPlayHandBuilding({super.key});
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
return Column(
mainAxisSize: MainAxisSize.min,
children: [
Image.asset(
platformAwareAsset(
desktop: Assets.images.desktop.main.path,
mobile: Assets.images.mobile.main.path,
),
height: _imageHeight,
),
const SizedBox(height: IoFlipSpacing.xxlg),
Padding(
padding: const EdgeInsets.symmetric(horizontal: IoFlipSpacing.md),
child: HowToPlayStyledText(l10n.howToPlayDeckTitle),
),
],
);
}
}
class HowToPlaySuitsIntro extends StatelessWidget {
const HowToPlaySuitsIntro({super.key});
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
const scale = .69;
return Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
height: _imageHeight,
width: _imageHeight,
child: Stack(
children: [
Align(
alignment: Alignment.topCenter,
child: SuitIcon.fire(scale: scale),
),
Align(
alignment: const Alignment(-1, -.1),
child: SuitIcon.water(scale: scale),
),
Align(
alignment: const Alignment(1, -.1),
child: SuitIcon.air(scale: scale),
),
Align(
alignment: const Alignment(-.6, 1),
child: SuitIcon.earth(scale: scale),
),
Align(
alignment: const Alignment(.6, 1),
child: SuitIcon.metal(scale: scale),
),
],
),
),
const SizedBox(height: IoFlipSpacing.xxlg),
Padding(
padding: const EdgeInsets.symmetric(horizontal: IoFlipSpacing.md),
child: HowToPlayStyledText(l10n.howToPlayElementsTitle),
),
],
);
}
}
| io_flip/lib/how_to_play/view/how_to_play_view.dart/0 | {
"file_path": "io_flip/lib/how_to_play/view/how_to_play_view.dart",
"repo_id": "io_flip",
"token_count": 3266
} | 840 |
import 'package:api_client/api_client.dart';
import 'package:bloc/bloc.dart';
import 'package:equatable/equatable.dart';
part 'initials_form_event.dart';
part 'initials_form_state.dart';
class InitialsFormBloc extends Bloc<InitialsFormEvent, InitialsFormState> {
InitialsFormBloc({
required LeaderboardResource leaderboardResource,
required String scoreCardId,
}) : _leaderboardResource = leaderboardResource,
_scoreCardId = scoreCardId,
super(const InitialsFormState()) {
_setBlacklist();
on<InitialsChanged>(_onInitialsChanged);
on<InitialsSubmitted>(_onInitialsSubmitted);
}
final LeaderboardResource _leaderboardResource;
final initialsRegex = RegExp('[A-Z]{3}');
late final List<String> blacklist;
late final String _scoreCardId;
Future<void> _setBlacklist() async {
blacklist = await _leaderboardResource.getInitialsBlacklist();
}
void _onInitialsChanged(
InitialsChanged event,
Emitter<InitialsFormState> emit,
) {
final initials = [...state.initials];
initials[event.index] = event.initial;
final status = (state.status == InitialsFormStatus.blacklisted)
? InitialsFormStatus.initial
: state.status;
emit(state.copyWith(initials: initials, status: status));
}
Future<void> _onInitialsSubmitted(
InitialsSubmitted event,
Emitter<InitialsFormState> emit,
) async {
try {
if (!_hasValidPattern()) {
emit(state.copyWith(status: InitialsFormStatus.invalid));
} else if (_isBlacklisted()) {
emit(state.copyWith(status: InitialsFormStatus.blacklisted));
} else {
emit(state.copyWith(status: InitialsFormStatus.valid));
await _leaderboardResource.addInitialsToScoreCard(
scoreCardId: _scoreCardId,
initials: state.initials.join(),
);
emit(state.copyWith(status: InitialsFormStatus.success));
}
} catch (e, s) {
addError(e, s);
emit(state.copyWith(status: InitialsFormStatus.failure));
}
}
bool _hasValidPattern() {
final value = state.initials;
return value.isNotEmpty && initialsRegex.hasMatch(value.join());
}
bool _isBlacklisted() {
return blacklist.contains(state.initials.join());
}
}
| io_flip/lib/leaderboard/initials_form/bloc/initials_form_bloc.dart/0 | {
"file_path": "io_flip/lib/leaderboard/initials_form/bloc/initials_form_bloc.dart",
"repo_id": "io_flip",
"token_count": 830
} | 841 |
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
import 'package:io_flip/l10n/l10n.dart';
import 'package:io_flip/prompt/prompt.dart';
import 'package:io_flip_ui/io_flip_ui.dart';
class PromptView extends StatelessWidget {
const PromptView({super.key});
@override
Widget build(BuildContext context) {
return BlocConsumer<PromptFormBloc, PromptFormState>(
listener: (context, state) {
if (!state.prompts.props.contains(null)) {
GoRouter.of(context).go('/draft', extra: state.prompts);
}
},
builder: (context, state) {
if ((state.status == PromptTermsStatus.initial) ||
(state.status == PromptTermsStatus.loading)) {
return const IoFlipScaffold(
body: Center(child: CircularProgressIndicator()),
);
} else if (state.status == PromptTermsStatus.loaded) {
return IoFlipScaffold(
body: PromptForm(),
);
}
return IoFlipScaffold(
body: Center(
child: Text(context.l10n.unknownConnectionError),
),
);
},
);
}
}
| io_flip/lib/prompt/view/prompt_view.dart/0 | {
"file_path": "io_flip/lib/prompt/view/prompt_view.dart",
"repo_id": "io_flip",
"token_count": 542
} | 842 |
export 'settings_controller.dart';
| io_flip/lib/settings/settings.dart/0 | {
"file_path": "io_flip/lib/settings/settings.dart",
"repo_id": "io_flip",
"token_count": 10
} | 843 |
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:api_client/src/resources/resources.dart';
import 'package:encrypt/encrypt.dart';
import 'package:game_domain/game_domain.dart';
import 'package:http/http.dart' as http;
import 'package:web_socket_client/web_socket_client.dart';
/// {@template api_client_error}
/// Error throw when accessing api failed.
///
/// Check [cause] and [stackTrace] for specific details.
/// {@endtemplate}
class ApiClientError implements Exception {
/// {@macro api_client_error}
ApiClientError(this.cause, this.stackTrace);
/// Error cause.
final dynamic cause;
/// The stack trace of the error.
final StackTrace stackTrace;
@override
String toString() {
return cause.toString();
}
}
/// Definition of a post call used by this client.
typedef PostCall = Future<http.Response> Function(
Uri, {
Object? body,
Map<String, String>? headers,
});
/// Definition of a patch call used by this client.
typedef PatchCall = Future<http.Response> Function(
Uri, {
Object? body,
Map<String, String>? headers,
});
/// Definition of a put call used by this client.
typedef PutCall = Future<http.Response> Function(
Uri, {
Object? body,
Map<String, String>? headers,
});
/// Definition of a get call used by this client.
typedef GetCall = Future<http.Response> Function(
Uri, {
Map<String, String>? headers,
});
/// A factory to create and connect to a [WebSocket] instance.
typedef WebSocketFactory = WebSocket Function(
Uri uri, {
Duration? timeout,
String? binaryType,
});
/// {@template api_client}
/// Client to access the api
/// {@endtemplate}
class ApiClient {
/// {@macro api_client}
ApiClient({
required String baseUrl,
required Stream<String?> idTokenStream,
required Future<String?> Function() refreshIdToken,
required Stream<String?> appCheckTokenStream,
String? appCheckToken,
PostCall postCall = http.post,
PutCall putCall = http.put,
PatchCall patchCall = http.patch,
GetCall getCall = http.get,
WebSocketFactory webSocketFactory = WebSocket.new,
Duration webSocketTimeout = const Duration(seconds: 20),
}) : _base = Uri.parse(baseUrl),
_post = postCall,
_put = putCall,
_patch = patchCall,
_get = getCall,
_webSocketFactory = webSocketFactory,
_webSocketTimeout = webSocketTimeout,
_appCheckToken = appCheckToken,
_refreshIdToken = refreshIdToken {
_idTokenSubscription = idTokenStream.listen((idToken) {
_idToken = idToken;
});
_appCheckTokenSubscription = appCheckTokenStream.listen((appCheckToken) {
_appCheckToken = appCheckToken;
});
}
final Uri _base;
final PostCall _post;
final PostCall _put;
final PatchCall _patch;
final GetCall _get;
final Future<String?> Function() _refreshIdToken;
final WebSocketFactory _webSocketFactory;
final Duration _webSocketTimeout;
late final StreamSubscription<String?> _idTokenSubscription;
late final StreamSubscription<String?> _appCheckTokenSubscription;
String? _idToken;
String? _appCheckToken;
Map<String, String> get _headers => {
if (_idToken != null) 'Authorization': 'Bearer $_idToken',
if (_appCheckToken != null) 'X-Firebase-AppCheck': _appCheckToken!,
};
/// {@macro game_resource}
late final GameResource gameResource = GameResource(apiClient: this);
/// {@macro share_resource}
late final ShareResource shareResource = ShareResource(apiClient: this);
/// {@macro prompt_resource}
late final PromptResource promptResource = PromptResource(apiClient: this);
/// {@macro scripts_resource}
late final ScriptsResource scriptsResource = ScriptsResource(apiClient: this);
/// {@macro leaderboard_resource}
late final LeaderboardResource leaderboardResource =
LeaderboardResource(apiClient: this);
Future<http.Response> _handleUnauthorized(
Future<http.Response> Function() sendRequest,
) async {
final response = await sendRequest();
if (response.statusCode == HttpStatus.unauthorized) {
_idToken = await _refreshIdToken();
return sendRequest();
}
return response;
}
/// Dispose of resources used by this client.
Future<void> dispose() async {
await _idTokenSubscription.cancel();
await _appCheckTokenSubscription.cancel();
}
/// Sends a POST request to the specified [path] with the given [body].
Future<http.Response> post(
String path, {
Object? body,
Map<String, String>? queryParameters,
}) async {
return _handleUnauthorized(() async {
final response = await _post(
_base.replace(
path: path,
queryParameters: queryParameters,
),
body: body,
headers: _headers..addContentTypeJson(),
);
return response.decrypted;
});
}
/// Sends a PATCH request to the specified [path] with the given [body].
Future<http.Response> patch(
String path, {
Object? body,
Map<String, String>? queryParameters,
}) async {
return _handleUnauthorized(() async {
final response = await _patch(
_base.replace(
path: path,
queryParameters: queryParameters,
),
body: body,
headers: _headers..addContentTypeJson(),
);
return response.decrypted;
});
}
/// Sends a PUT request to the specified [path] with the given [body].
Future<http.Response> put(
String path, {
Object? body,
}) async {
return _handleUnauthorized(() async {
final response = await _put(
_base.replace(path: path),
body: body,
headers: _headers..addContentTypeJson(),
);
return response.decrypted;
});
}
/// Sends a GET request to the specified [path].
Future<http.Response> get(
String path, {
Map<String, String>? queryParameters,
}) async {
return _handleUnauthorized(() async {
final response = await _get(
_base.replace(
path: path,
queryParameters: queryParameters,
),
headers: _headers,
);
return response.decrypted;
});
}
/// Sends a GET request to the specified public [path].
Future<http.Response> getPublic(
String path, {
Map<String, String>? queryParameters,
}) async {
return _handleUnauthorized(() async {
final response = await _get(
_base.replace(
path: path,
queryParameters: queryParameters,
),
headers: _headers,
);
return response;
});
}
/// Returns a WebSocket for the specified [path].
Future<WebSocket> connect(String path) async {
final uri = _base.replace(
scheme: _base.scheme.replaceAll('http', 'ws'),
path: path,
);
try {
final webSocket = _webSocketFactory(
uri,
timeout: _webSocketTimeout,
binaryType: 'blob',
);
if (_idToken != null) {
webSocket
..onConnected(
() => webSocket.send(
jsonEncode(
WebSocketMessage.token(
_idToken!,
reconnect: true,
),
),
),
)
..onReconnected(
() => webSocket.send(
jsonEncode(
WebSocketMessage.token(
_idToken!,
reconnect: true,
),
),
),
);
}
return webSocket;
} catch (error) {
throw ApiClientError(
'WebSocket: $path returned with the following error: "$error"',
StackTrace.current,
);
}
}
/// Returns the share page url for the specified [deckId].
String shareHandUrl(String deckId) {
return _base.replace(
path: '/public/share',
queryParameters: {
'deckId': deckId,
},
).toString();
}
/// Returns the share page url for the specified [cardId].
String shareCardUrl(String cardId) {
return _base.replace(
path: '/public/share',
queryParameters: {
'cardId': cardId,
},
).toString();
}
}
extension on http.Response {
http.Response get decrypted {
if (body.isEmpty) return this;
final key = Key.fromUtf8(_encryptionKey);
final iv = IV.fromUtf8(_encryptionIV);
final encrypter = Encrypter(AES(key));
final decrypted = encrypter.decrypt64(body, iv: iv);
return http.Response(
jsonDecode(decrypted).toString(),
statusCode,
headers: headers,
isRedirect: isRedirect,
persistentConnection: persistentConnection,
reasonPhrase: reasonPhrase,
request: request,
);
}
String get _encryptionKey {
const value = String.fromEnvironment(
'ENCRYPTION_KEY',
// Default value is set at 32 characters to match required length of
// AES key. The default value can then be used for testing purposes.
defaultValue: 'encryption_key_not_set_123456789',
);
return value;
}
String get _encryptionIV {
const value = String.fromEnvironment(
'ENCRYPTION_IV',
// Default value is set at 116 characters to match required length of
// IV key. The default value can then be used for testing purposes.
defaultValue: 'iv_not_set_12345',
);
return value;
}
}
extension on WebSocket {
void onConnected(void Function() onConnected) {
connection.firstWhere((state) => state is Connected).then((_) {
onConnected();
});
}
void onReconnected(void Function() onReconnected) {
connection.where((state) => state is Reconnected).forEach((_) {
onReconnected();
});
}
}
extension on Map<String, String> {
void addContentTypeJson() {
addAll({HttpHeaders.contentTypeHeader: ContentType.json.value});
}
}
| io_flip/packages/api_client/lib/src/api_client.dart/0 | {
"file_path": "io_flip/packages/api_client/lib/src/api_client.dart",
"repo_id": "io_flip",
"token_count": 3761
} | 844 |
include: package:very_good_analysis/analysis_options.4.0.0.yaml
| io_flip/packages/authentication_repository/analysis_options.yaml/0 | {
"file_path": "io_flip/packages/authentication_repository/analysis_options.yaml",
"repo_id": "io_flip",
"token_count": 23
} | 845 |
// ignore_for_file: subtype_of_sealed_class, prefer_const_constructors
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:config_repository/config_repository.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mocktail/mocktail.dart';
class _MockFirebaseFirestore extends Mock implements FirebaseFirestore {}
class _MockCollectionReference<T> extends Mock
implements CollectionReference<T> {}
class _MockQuerySnapshot<T> extends Mock implements QuerySnapshot<T> {}
class _MockQueryDocumentSnapshot<T> extends Mock
implements QueryDocumentSnapshot<T> {}
void main() {
group('ConfigRepository', () {
late _MockFirebaseFirestore db;
late CollectionReference<Map<String, dynamic>> collection;
late ConfigRepository configRepository;
setUp(() {
db = _MockFirebaseFirestore();
collection = _MockCollectionReference();
when(() => db.collection('config')).thenReturn(collection);
configRepository = ConfigRepository(
db: db,
);
});
void mockQueryResult(dynamic value) {
final doc = _MockQueryDocumentSnapshot<Map<String, dynamic>>();
final query = _MockQuerySnapshot<Map<String, dynamic>>();
when(
() => collection.where(
'type',
isEqualTo: 'private_match_time_limit',
),
).thenReturn(collection);
when(
() => collection.where(
'type',
isEqualTo: 'match_wait_time_limit',
),
).thenReturn(collection);
when(
() => collection.where(
'type',
isEqualTo: 'cpu_auto_match_percentage',
),
).thenReturn(collection);
when(collection.get).thenAnswer((_) async => query);
when(() => query.docs).thenReturn([doc]);
when(doc.data).thenReturn({'value': value});
}
test('can be instantiated', () {
expect(
ConfigRepository(db: db),
isNotNull,
);
});
group('getPrivateMatchTimeLimit', () {
test('returns time limit from firebase config', () async {
mockQueryResult(0);
await expectLater(
await configRepository.getPrivateMatchTimeLimit(),
equals(0),
);
});
test('returns default time limit when none exists on firebase', () async {
when(
() => collection.where(
'type',
isEqualTo: 'private_match_time_limit',
),
).thenThrow(Exception('oops'));
await expectLater(
await configRepository.getPrivateMatchTimeLimit(),
equals(configRepository.defaultPrivateTimeLimit),
);
});
});
group('getMatchWaitTimeLimit', () {
test('returns time limit from firebase config', () async {
mockQueryResult(0);
await expectLater(
await configRepository.getMatchWaitTimeLimit(),
equals(0),
);
});
test('returns default time limit when none exists on firebase', () async {
when(
() => collection.where(
'type',
isEqualTo: 'match_wait_time_limit',
),
).thenThrow(Exception('oops'));
await expectLater(
await configRepository.getMatchWaitTimeLimit(),
equals(configRepository.defaultMatchWaitTimeLimit),
);
});
group('getMatchWaitTimeLimit', () {
test('returns time limit from firebase config', () async {
mockQueryResult(0.1);
await expectLater(
await configRepository.getCPUAutoMatchPercentage(),
equals(0.1),
);
});
test('clamps value if too high', () async {
mockQueryResult(1.1);
await expectLater(
await configRepository.getCPUAutoMatchPercentage(),
equals(1.0),
);
});
test('returns default time limit when none exists on firebase',
() async {
when(
() => collection.where(
'type',
isEqualTo: 'cpu_auto_match_percentage',
),
).thenThrow(Exception('oops'));
await expectLater(
await configRepository.getCPUAutoMatchPercentage(),
equals(configRepository.defaultCPUAutoMatchPercentage),
);
});
});
});
});
}
| io_flip/packages/config_repository/test/src/config_repository_test.dart/0 | {
"file_path": "io_flip/packages/config_repository/test/src/config_repository_test.dart",
"repo_id": "io_flip",
"token_count": 1869
} | 846 |
import 'package:flame/cache.dart';
import 'package:flutter/material.dart';
import 'package:gallery/story_scaffold.dart';
import 'package:io_flip_ui/io_flip_ui.dart';
import 'package:provider/provider.dart';
class FlipCountdownStory extends StatefulWidget {
const FlipCountdownStory({super.key});
@override
State<StatefulWidget> createState() => _FlipCountdownStoryState();
}
class _FlipCountdownStoryState extends State<FlipCountdownStory> {
int _replayCounter = 0;
@override
Widget build(BuildContext context) {
return Provider(
create: (_) => Images(prefix: ''),
child: StoryScaffold(
title: 'Flip Countdown',
body: Center(
child: Column(
children: [
FlipCountdown(
key: ValueKey(_replayCounter),
),
const SizedBox(height: IoFlipSpacing.lg),
ElevatedButton(
onPressed: () => setState(() {
_replayCounter++;
}),
child: const Text('Replay'),
),
],
),
),
),
);
}
}
| io_flip/packages/io_flip_ui/gallery/lib/widgets/flip_countdown_story.dart/0 | {
"file_path": "io_flip/packages/io_flip_ui/gallery/lib/widgets/flip_countdown_story.dart",
"repo_id": "io_flip",
"token_count": 530
} | 847 |
// ignore_for_file: overridden_fields
import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';
import 'package:io_flip_ui/io_flip_ui.dart';
/// {@template game_card_rect}
/// A class that holds information about card dimensions and position.
/// {@endtemplate}
class GameCardRect extends Equatable {
/// {@macro game_card_rect}
const GameCardRect({required this.gameCardSize, required this.offset});
/// The size of the card.
final GameCardSize gameCardSize;
/// The offset of the card.
final Offset offset;
/// The calculated rect of the card.
Rect get rect => offset & gameCardSize.size;
@override
List<Object?> get props => [gameCardSize, offset];
}
/// Interpolates between two [GameCardRect]s.
class GameCardRectTween extends Tween<GameCardRect?> {
/// Creates a [GameCardRectTween].
///
/// The [begin] and [end] properties must not be null when interpolated, but
/// they may be null when constructed if they are filled in later.
GameCardRectTween({
super.begin,
super.end,
});
@override
GameCardRect? lerp(double t) {
final gameCardSize = GameCardSize.lerp(
begin?.gameCardSize,
end?.gameCardSize,
t,
);
return GameCardRect(
gameCardSize: gameCardSize!,
offset: Offset.lerp(begin?.offset, end?.offset, t)!,
);
}
}
| io_flip/packages/io_flip_ui/lib/src/animations/game_card_rect_tween.dart/0 | {
"file_path": "io_flip/packages/io_flip_ui/lib/src/animations/game_card_rect_tween.dart",
"repo_id": "io_flip",
"token_count": 464
} | 848 |
import 'package:flame/cache.dart';
import 'package:flame/extensions.dart';
import 'package:flame/widgets.dart';
import 'package:flutter/material.dart';
import 'package:io_flip_ui/gen/assets.gen.dart';
import 'package:provider/provider.dart';
/// {@template card_landing}
/// A widget that renders a [SpriteAnimation] for the card landing effect.
/// {@endtemplate}
class CardLandingPuff extends StatelessWidget {
/// {@macro card_landing}
const CardLandingPuff({
super.key,
this.height = 500,
this.width = 500,
this.playing = false,
this.onComplete,
});
/// The height of the widget.
///
/// Defaults to `500`.
final double height;
/// The width of the widget.
///
/// Defaults to `500`.
final double width;
/// Whether the animation is being played or not.
final bool playing;
/// Optional callback to be called when the animation is complete.
final VoidCallback? onComplete;
/// Number of frames in the animation.
static const frames = 12;
/// Time between frames in the animation, in seconds.
static const stepTime = 0.04;
/// Animation duration
static Duration duration =
Duration(milliseconds: (frames * stepTime * 1000).toInt());
@override
Widget build(BuildContext context) {
final images = context.read<Images>();
return SizedBox(
height: height,
width: width,
child: SpriteAnimationWidget.asset(
path: Assets.images.cardLanding.keyName,
images: images,
anchor: Anchor.center,
onComplete: onComplete,
data: SpriteAnimationData.sequenced(
amount: frames,
amountPerRow: 4,
textureSize: Vector2(496, 698),
stepTime: stepTime,
loop: false,
),
),
);
}
}
| io_flip/packages/io_flip_ui/lib/src/widgets/card_landing_puff.dart/0 | {
"file_path": "io_flip/packages/io_flip_ui/lib/src/widgets/card_landing_puff.dart",
"repo_id": "io_flip",
"token_count": 635
} | 849 |
import 'package:flutter/material.dart';
import 'package:io_flip_ui/io_flip_ui.dart';
/// {@template io_flip_dialog}
/// IO FLIP themed dialog.
/// {@endtemplate}
class IoFlipDialog extends StatelessWidget {
/// {@macro io_flip_dialog}
const IoFlipDialog({
required this.child,
this.showCloseButton = true,
this.onClose,
super.key,
this.isTransparent = false,
});
/// Shows the dialog.
static Future<void> show(
BuildContext context, {
required Widget child,
bool showCloseButton = true,
VoidCallback? onClose,
bool isTransparent = false,
}) async {
return showGeneralDialog<void>(
context: context,
pageBuilder: (context, _, __) => IoFlipDialog(
isTransparent: isTransparent,
showCloseButton: showCloseButton,
onClose: onClose,
child: child,
),
transitionDuration: const Duration(milliseconds: 250),
transitionBuilder: (context, animation, secondaryAnimation, child) {
final curvedAnimation = Curves.easeOutBack.transform(animation.value);
final dy = (1 - curvedAnimation) * 40;
return Opacity(
opacity: Curves.easeOutQuart.transform(animation.value),
child: Transform.translate(
offset: Offset(0, dy),
child: child,
),
);
},
);
}
/// The child of the dialog.
final Widget child;
/// Whether to show the close button.
///
/// Defaults to `true`.
final bool showCloseButton;
/// The callback to call when the close button is pressed.
final VoidCallback? onClose;
/// Sets the background of the dialog to be transparent.
/// Defaults to `false`.
final bool isTransparent;
@override
Widget build(BuildContext context) {
return Dialog(
backgroundColor: isTransparent ? Colors.transparent : null,
insetPadding: const EdgeInsets.all(IoFlipSpacing.sm),
child: ClipRRect(
borderRadius: BorderRadius.circular(IoFlipSpacing.lg),
child: SingleChildScrollView(
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 400),
child: Padding(
padding: const EdgeInsets.all(IoFlipSpacing.lg),
child: Column(
children: [
if (showCloseButton)
Align(
alignment: Alignment.centerRight,
child: CloseButton(
onPressed: onClose,
color: IoFlipColors.seedWhite,
),
),
const SizedBox(height: IoFlipSpacing.lg),
child,
],
),
),
),
),
),
);
}
}
| io_flip/packages/io_flip_ui/lib/src/widgets/io_flip_dialog.dart/0 | {
"file_path": "io_flip/packages/io_flip_ui/lib/src/widgets/io_flip_dialog.dart",
"repo_id": "io_flip",
"token_count": 1249
} | 850 |
import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:io_flip_ui/io_flip_ui.dart';
void main() {
group('TransformTween', () {
group('translateX', () {
test('interpolates correctly', () {
final tween = TransformTween(beginTranslateX: 20, endTranslateX: 100);
expect(tween.translateX.transform(0.5), equals(60));
});
});
group('translateY', () {
test('interpolates correctly', () {
final tween = TransformTween(beginTranslateY: 20, endTranslateY: 100);
expect(tween.translateY.transform(0.5), equals(60));
});
});
group('translateZ', () {
test('interpolates correctly', () {
final tween = TransformTween(beginTranslateZ: 20, endTranslateZ: 100);
expect(tween.translateZ.transform(0.5), equals(60));
});
});
group('rotateX', () {
test('interpolates correctly', () {
final tween = TransformTween(beginRotateX: 0.5, endRotateX: 1.5);
expect(tween.rotateX.transform(0.5), equals(1));
});
});
group('rotateY', () {
test('interpolates correctly', () {
final tween = TransformTween(beginRotateY: 0.5, endRotateY: 1.5);
expect(tween.rotateY.transform(0.5), equals(1));
});
});
group('rotateZ', () {
test('interpolates correctly', () {
final tween = TransformTween(beginRotateZ: 0.5, endRotateZ: 1.5);
expect(tween.rotateZ.transform(0.5), equals(1));
});
});
group('scale', () {
test('interpolates correctly', () {
final tween = TransformTween(beginScale: 0.5, endScale: 1.5);
expect(tween.scale.transform(0.5), equals(1));
});
});
group('composed matrix', () {
final tween = TransformTween(
beginRotateX: 0.1,
endRotateX: 0.3,
beginRotateY: 0.5,
endRotateY: 0.75,
beginRotateZ: 0.2,
endRotateZ: 0.5,
beginScale: 0.5,
endScale: 2,
beginTranslateX: 20,
endTranslateX: 100,
beginTranslateY: 30,
endTranslateY: 110,
beginTranslateZ: 40,
endTranslateZ: 120,
);
test('at beginning', () {
expect(
tween.begin,
equals(
Matrix4.zero()
..setIdentity()
..setEntry(3, 2, 0.001)
..scale(0.5)
..translate(20.0, 30, 40)
..rotateX(0.1)
..rotateY(0.5)
..rotateZ(0.2),
),
);
});
test('at end', () {
expect(
tween.end,
equals(
Matrix4.zero()
..setIdentity()
..setEntry(3, 2, 0.001)
..scale(2.0)
..translate(100.0, 110, 120)
..rotateX(0.3)
..rotateY(0.75)
..rotateZ(0.5),
),
);
});
test('lerp interpolates correctly', () {
expect(
tween.transform(0.5),
equals(
Matrix4.zero()
..setIdentity()
..setEntry(3, 2, 0.001)
..scale(1.25)
..translate(60.0, 70, 80)
..rotateX(0.2)
..rotateY(0.625)
..rotateZ(0.35),
),
);
});
});
});
}
| io_flip/packages/io_flip_ui/test/src/animations/transform_tween_test.dart/0 | {
"file_path": "io_flip/packages/io_flip_ui/test/src/animations/transform_tween_test.dart",
"repo_id": "io_flip",
"token_count": 1785
} | 851 |
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:io_flip_ui/io_flip_ui.dart';
void main() {
group('FoilShader', () {
const child = SizedBox(key: Key('child'));
testWidgets('renders child', (tester) async {
await tester.pumpWidget(const FoilShader(package: null, child: child));
await tester.pump();
expect(find.byWidget(child), findsOneWidget);
});
});
}
| io_flip/packages/io_flip_ui/test/src/widgets/foil_shader_test.dart/0 | {
"file_path": "io_flip/packages/io_flip_ui/test/src/widgets/foil_shader_test.dart",
"repo_id": "io_flip",
"token_count": 177
} | 852 |
include: package:very_good_analysis/analysis_options.4.0.0.yaml
| io_flip/packages/match_maker_repository/analysis_options.yaml/0 | {
"file_path": "io_flip/packages/match_maker_repository/analysis_options.yaml",
"repo_id": "io_flip",
"token_count": 23
} | 853 |
echo ' ################################# '
echo ' ## Starting game in local mode ## '
echo ' ################################# '
flutter run \
-d chrome \
--target lib/main_local.dart \
--flavor development \
--dart-define ENCRYPTION_KEY=X9YTchZdcnyZTNBSBgzj29p7RMBAIubD \
--dart-define ENCRYPTION_IV=FxC21ctRg9SgiXuZ \
--dart-define RECAPTCHA_KEY=6LeafHolAAAAAH-kou5bR2y4gtEOmFXdd6pM4cJz \
--dart-define APPCHECK_DEBUG_TOKEN=1E88A2CC-8D94-4ADC-A156-A63DBA49627D \
--dart-define ALLOW_PRIVATE_MATCHES=true
| io_flip/scripts/start_local_game.sh/0 | {
"file_path": "io_flip/scripts/start_local_game.sh",
"repo_id": "io_flip",
"token_count": 225
} | 854 |
// ignore_for_file: prefer_const_constructors
import 'dart:async';
import 'package:api_client/api_client.dart';
import 'package:authentication_repository/authentication_repository.dart';
import 'package:bloc_test/bloc_test.dart';
import 'package:connection_repository/connection_repository.dart';
import 'package:fake_async/fake_async.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:game_domain/game_domain.dart';
import 'package:io_flip/audio/audio_controller.dart';
import 'package:io_flip/game/game.dart';
import 'package:io_flip/gen/assets.gen.dart';
import 'package:io_flip_ui/io_flip_ui.dart';
import 'package:match_maker_repository/match_maker_repository.dart';
import 'package:mocktail/mocktail.dart';
class _MockGameResource extends Mock implements GameResource {}
class _MockConnectionRepository extends Mock implements ConnectionRepository {}
class _MockMatchMakerRepository extends Mock implements MatchMakerRepository {}
class _MockAudioController extends Mock implements AudioController {}
class _MockMatchSolver extends Mock implements MatchSolver {}
class _MockUser extends Mock implements User {
@override
String get id => 'mock-id';
}
class _MockTimer extends Mock implements Timer {}
void main() {
group('GameBloc', () {
final match = Match(
id: 'matchId',
hostDeck: Deck(id: '', userId: '', cards: const []),
guestDeck: Deck(id: '', userId: '', cards: const []),
);
final matchState = MatchState(
id: 'matchStateId',
matchId: match.id,
guestPlayedCards: const [],
hostPlayedCards: const [],
);
late StreamController<MatchState> matchStateController;
late StreamController<DraftMatch> matchController;
late StreamController<ScoreCard> scoreController;
late GameResource gameResource;
late MatchMakerRepository matchMakerRepository;
late MatchSolver matchSolver;
late AudioController audioController;
late User user;
late ConnectionRepository connectionRepository;
const isHost = true;
setUpAll(() {
registerFallbackValue(match);
registerFallbackValue(matchState);
});
setUp(() {
connectionRepository = _MockConnectionRepository();
matchSolver = _MockMatchSolver();
audioController = _MockAudioController();
gameResource = _MockGameResource();
matchMakerRepository = _MockMatchMakerRepository();
user = _MockUser();
when(() => gameResource.getMatch(match.id))
.thenAnswer((_) async => match);
when(() => gameResource.getMatchState(match.id))
.thenAnswer((_) async => matchState);
matchStateController = StreamController();
matchController = StreamController();
scoreController = StreamController();
when(() => matchMakerRepository.watchMatchState(any()))
.thenAnswer((_) => matchStateController.stream);
when(() => matchMakerRepository.watchScoreCard(any()))
.thenAnswer((_) => scoreController.stream);
when(() => matchMakerRepository.watchMatch(any()))
.thenAnswer((_) => matchController.stream);
when(() => matchMakerRepository.getScoreCard(any()))
.thenAnswer((_) async => ScoreCard(id: 'scoreCardId'));
});
const hostCards = [
Card(
id: 'card1',
name: '',
description: '',
image: '',
power: 10,
rarity: false,
suit: Suit.air,
),
Card(
id: 'card2',
name: '',
description: '',
image: '',
power: 10,
rarity: false,
suit: Suit.air,
),
Card(
id: 'card3',
name: '',
description: '',
image: '',
power: 10,
rarity: false,
suit: Suit.air,
),
];
const guestCards = [
Card(
id: 'card4',
name: '',
description: '',
image: '',
power: 10,
rarity: false,
suit: Suit.air,
),
Card(
id: 'card5',
name: '',
description: '',
image: '',
power: 10,
rarity: false,
suit: Suit.air,
),
Card(
id: 'card6',
name: '',
description: '',
image: '',
power: 10,
rarity: false,
suit: Suit.air,
),
];
const hostDeck = Deck(
id: 'hostDeck',
userId: 'hostUserId',
cards: hostCards,
);
const guestDeck = Deck(
id: 'guestDeck',
userId: 'guestUserId',
cards: guestCards,
);
const baseState = MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: Match(
id: 'matchId',
hostDeck: hostDeck,
guestDeck: guestDeck,
),
matchState: MatchState(
id: 'matchStateId',
matchId: 'matchId',
hostPlayedCards: [],
guestPlayedCards: [],
),
rounds: [],
turnAnimationsFinished: true,
isClashScene: false,
showCardLanding: false,
turnTimeRemaining: 10,
);
test('can be instantiated', () {
expect(
GameBloc(
gameResource: _MockGameResource(),
matchMakerRepository: _MockMatchMakerRepository(),
audioController: audioController,
matchSolver: matchSolver,
user: user,
isHost: true,
connectionRepository: _MockConnectionRepository(),
),
isNotNull,
);
});
test('has the correct initial state', () {
expect(
GameBloc(
gameResource: _MockGameResource(),
matchMakerRepository: _MockMatchMakerRepository(),
matchSolver: matchSolver,
audioController: audioController,
user: user,
isHost: false,
connectionRepository: _MockConnectionRepository(),
).state,
equals(MatchLoadingState()),
);
});
blocTest<GameBloc, GameState>(
'loads a match',
build: () => GameBloc(
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
matchSolver: matchSolver,
user: user,
isHost: isHost,
connectionRepository: connectionRepository,
),
act: (bloc) => bloc.add(MatchRequested(match.id, hostDeck)),
expect: () => [
MatchLoadingState(),
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: match,
matchState: matchState,
rounds: const [],
turnAnimationsFinished: true,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
],
verify: (_) {
verify(() => gameResource.getMatch(match.id)).called(1);
},
);
blocTest<GameBloc, GameState>(
'loads a match with an initially played guest card',
setUp: () {
when(() => gameResource.getMatchState(match.id)).thenAnswer(
(_) async => MatchState(
id: 'matchStateId',
matchId: match.id,
guestPlayedCards: const ['playedCardId'],
hostPlayedCards: const [],
),
);
},
build: () => GameBloc(
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
matchSolver: matchSolver,
user: user,
isHost: true,
connectionRepository: connectionRepository,
),
act: (bloc) => bloc.add(MatchRequested(match.id, hostDeck)),
expect: () => [
MatchLoadingState(),
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: match,
matchState: MatchState(
id: 'matchStateId',
matchId: match.id,
guestPlayedCards: const ['playedCardId'],
hostPlayedCards: const [],
),
rounds: const [
MatchRound(playerCardId: null, opponentCardId: 'playedCardId'),
],
turnAnimationsFinished: true,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
],
verify: (_) {
verify(() => gameResource.getMatch(match.id)).called(1);
},
);
blocTest<GameBloc, GameState>(
'loads a match with an initially played host card',
setUp: () {
when(() => gameResource.getMatchState(match.id)).thenAnswer(
(_) async => MatchState(
id: 'matchStateId',
matchId: match.id,
guestPlayedCards: const [],
hostPlayedCards: const ['playedCardId'],
),
);
},
build: () => GameBloc(
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
matchSolver: matchSolver,
user: user,
isHost: false,
connectionRepository: connectionRepository,
),
act: (bloc) => bloc.add(MatchRequested(match.id, hostDeck)),
expect: () => [
MatchLoadingState(),
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: match,
matchState: MatchState(
id: 'matchStateId',
matchId: match.id,
guestPlayedCards: const [],
hostPlayedCards: const ['playedCardId'],
),
rounds: const [
MatchRound(playerCardId: null, opponentCardId: 'playedCardId'),
],
turnAnimationsFinished: true,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
],
verify: (_) {
verify(() => gameResource.getMatch(match.id)).called(1);
},
);
blocTest<GameBloc, GameState>(
'plays the startGame sfx when match is loaded',
build: () => GameBloc(
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
matchSolver: matchSolver,
user: user,
isHost: isHost,
connectionRepository: connectionRepository,
),
act: (bloc) => bloc.add(MatchRequested(match.id, hostDeck)),
verify: (_) {
verify(() => audioController.playSfx(Assets.sfx.startGame)).called(1);
},
);
blocTest<GameBloc, GameState>(
'fails when the match is not found',
build: () => GameBloc(
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
matchSolver: matchSolver,
user: user,
isHost: isHost,
connectionRepository: connectionRepository,
),
setUp: () {
when(() => gameResource.getMatch(match.id))
.thenAnswer((_) async => null);
},
act: (bloc) => bloc.add(MatchRequested(match.id, hostDeck)),
expect: () => [
MatchLoadingState(),
MatchLoadFailedState(deck: hostDeck),
],
);
blocTest<GameBloc, GameState>(
'fails when fetching the match throws an exception',
build: () => GameBloc(
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
matchSolver: matchSolver,
user: user,
isHost: isHost,
connectionRepository: connectionRepository,
),
setUp: () {
when(() => gameResource.getMatch(match.id)).thenThrow(Exception('Ops'));
},
act: (bloc) => bloc.add(MatchRequested(match.id, hostDeck)),
expect: () => [
MatchLoadingState(),
MatchLoadFailedState(deck: hostDeck),
],
);
group('register player and opponent moves', () {
setUp(() {
when(
() => gameResource.playCard(
matchId: 'matchId',
cardId: any(named: 'cardId'),
deckId: any(named: 'deckId'),
),
).thenAnswer((_) async {});
});
test('adds a new state change when the entity changes', () async {
when(
() => matchSolver.isPlayerAllowedToPlay(
any(),
isHost: any(named: 'isHost'),
),
).thenReturn(true);
final bloc = GameBloc(
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
matchSolver: matchSolver,
user: user,
isHost: true,
connectionRepository: connectionRepository,
)..add(MatchRequested(baseState.match.id, hostDeck));
await Future.microtask(() {});
matchStateController.add(
MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.matchId,
hostPlayedCards: baseState.matchState.hostPlayedCards,
guestPlayedCards: const ['card6'],
),
);
await Future<void>.delayed(Duration(milliseconds: 20));
final state = bloc.state;
expect(state, isA<MatchLoadedState>());
final matchLoadedState = state as MatchLoadedState;
expect(
matchLoadedState.rounds,
equals(
[
MatchRound(
playerCardId: null,
opponentCardId: 'card6',
turnTimerStarted: true,
),
],
),
);
});
test('adds a new state change when the score changes', () async {
final bloc = GameBloc(
user: User(id: 'userId'),
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
isHost: true,
connectionRepository: connectionRepository,
)..add(MatchRequested(baseState.match.id, hostDeck));
await Future.microtask(() {});
scoreController.add(
ScoreCard(id: 'scoreCardId', wins: 5),
);
await Future<void>.delayed(Duration(milliseconds: 20));
final state = bloc.state;
expect(state, isA<MatchLoadedState>());
final matchLoadedState = state as MatchLoadedState;
expect(
matchLoadedState.playerScoreCard.wins,
equals(5),
);
});
blocTest<GameBloc, GameState>(
'isPlayerTurn calls match solver correctly',
build: () => GameBloc(
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
matchSolver: matchSolver,
user: user,
isHost: true,
connectionRepository: connectionRepository,
),
setUp: () {
when(
() => matchSolver.isPlayerAllowedToPlay(
baseState.matchState,
isHost: true,
),
).thenReturn(true);
},
seed: () => baseState,
act: (bloc) => bloc.isPlayerAllowedToPlay,
verify: (_) {
verify(
() => matchSolver.isPlayerAllowedToPlay(
baseState.matchState,
isHost: true,
),
).called(1);
},
);
blocTest<GameBloc, GameState>(
'canPlayerPlay calls match solver correctly',
build: () => GameBloc(
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
matchSolver: matchSolver,
user: user,
isHost: true,
connectionRepository: connectionRepository,
),
setUp: () {
when(
() => matchSolver.canPlayCard(
baseState.matchState,
any(),
isHost: true,
),
).thenReturn(true);
},
seed: () => baseState,
act: (bloc) => bloc.canPlayerPlay(''),
verify: (_) {
verify(
() => matchSolver.canPlayCard(
baseState.matchState,
any(),
isHost: true,
),
).called(1);
},
);
group('GameResult', () {
blocTest<GameBloc, GameState>(
'gameResult returns win if host won, and the player is the host',
build: () => GameBloc(
connectionRepository: connectionRepository,
audioController: audioController,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
user: user,
isHost: true,
),
seed: () => baseState.copyWith(
matchState: MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.id,
guestPlayedCards: baseState.matchState.guestPlayedCards,
hostPlayedCards: baseState.matchState.hostPlayedCards,
result: MatchResult.host,
),
),
verify: (bloc) {
expect(
bloc.gameResult(),
equals(GameResult.win),
);
},
);
blocTest<GameBloc, GameState>(
'gameResult returns win if guest won, and the player is the guest',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
user: user,
isHost: false,
),
seed: () => baseState.copyWith(
matchState: MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.id,
guestPlayedCards: baseState.matchState.guestPlayedCards,
hostPlayedCards: baseState.matchState.hostPlayedCards,
result: MatchResult.guest,
),
),
verify: (bloc) {
expect(
bloc.gameResult(),
equals(GameResult.win),
);
},
);
blocTest<GameBloc, GameState>(
'gameResult returns lose if host lost, and the player is the host',
build: () => GameBloc(
connectionRepository: connectionRepository,
audioController: audioController,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
user: user,
isHost: true,
),
seed: () => baseState.copyWith(
matchState: MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.id,
guestPlayedCards: baseState.matchState.guestPlayedCards,
hostPlayedCards: baseState.matchState.hostPlayedCards,
result: MatchResult.guest,
),
),
verify: (bloc) {
expect(
bloc.gameResult(),
equals(GameResult.lose),
);
},
);
blocTest<GameBloc, GameState>(
'gameResult returns lose if guest lost, and the player is the guest',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
user: user,
isHost: false,
),
seed: () => baseState.copyWith(
matchState: MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.id,
guestPlayedCards: baseState.matchState.guestPlayedCards,
hostPlayedCards: baseState.matchState.hostPlayedCards,
result: MatchResult.host,
),
),
verify: (bloc) {
expect(
bloc.gameResult(),
equals(GameResult.lose),
);
},
);
});
group('isWinningCard', () {
blocTest<GameBloc, GameState>(
'returns correctly when host is card is from player',
build: () => GameBloc(
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
audioController: audioController,
user: user,
isHost: true,
connectionRepository: connectionRepository,
),
setUp: () {
when(() => matchSolver.calculateRoundResult(any(), any(), any()))
.thenReturn(MatchResult.host);
},
seed: () => baseState.copyWith(
matchState: MatchState(
id: 'matchStateId',
matchId: 'matchId',
hostPlayedCards: const ['card1'],
guestPlayedCards: const ['card6'],
),
rounds: [
MatchRound(
playerCardId: 'card1',
opponentCardId: 'card6',
showCardsOverlay: true,
),
],
),
verify: (bloc) {
expect(
bloc.isWinningCard(
baseState.match.hostDeck.cards
.firstWhere((card) => card.id == 'card1'),
isPlayer: true,
),
equals(CardOverlayType.win),
);
},
);
blocTest<GameBloc, GameState>(
'returns correctly when is host and card is from opponent',
build: () => GameBloc(
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
user: user,
isHost: true,
connectionRepository: connectionRepository,
),
setUp: () {
when(() => matchSolver.calculateRoundResult(any(), any(), any()))
.thenReturn(MatchResult.host);
},
seed: () => baseState.copyWith(
matchState: MatchState(
id: 'matchStateId',
matchId: 'matchId',
hostPlayedCards: const ['card1'],
guestPlayedCards: const ['card6'],
),
rounds: [
MatchRound(
playerCardId: 'card1',
opponentCardId: 'card6',
showCardsOverlay: true,
),
],
),
verify: (bloc) {
expect(
bloc.isWinningCard(
baseState.match.guestDeck.cards
.firstWhere((card) => card.id == 'card6'),
isPlayer: false,
),
equals(CardOverlayType.lose),
);
},
);
blocTest<GameBloc, GameState>(
'returns correctly when is guest and card is from player',
build: () => GameBloc(
connectionRepository: connectionRepository,
audioController: audioController,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
isHost: false,
user: user,
),
setUp: () {
when(() => matchSolver.calculateRoundResult(any(), any(), any()))
.thenReturn(MatchResult.guest);
},
seed: () => baseState.copyWith(
matchState: MatchState(
id: 'matchStateId',
matchId: 'matchId',
hostPlayedCards: const ['card1'],
guestPlayedCards: const ['card6'],
),
rounds: [
MatchRound(
playerCardId: 'card6',
opponentCardId: 'card1',
showCardsOverlay: true,
),
],
),
verify: (bloc) {
expect(
bloc.isWinningCard(
baseState.match.guestDeck.cards
.firstWhere((card) => card.id == 'card6'),
isPlayer: true,
),
equals(CardOverlayType.win),
);
},
);
blocTest<GameBloc, GameState>(
'returns correctly when is guest and card is from opponent',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
matchSolver: matchSolver,
isHost: false,
user: user,
),
setUp: () {
when(() => matchSolver.calculateRoundResult(any(), any(), any()))
.thenReturn(MatchResult.guest);
},
seed: () => baseState.copyWith(
matchState: MatchState(
id: 'matchStateId',
matchId: 'matchId',
hostPlayedCards: const ['card1'],
guestPlayedCards: const ['card6'],
),
rounds: [
MatchRound(
playerCardId: 'card6',
opponentCardId: 'card1',
showCardsOverlay: true,
),
],
),
verify: (bloc) {
expect(
bloc.isWinningCard(
baseState.match.hostDeck.cards
.firstWhere((card) => card.id == 'card1'),
isPlayer: false,
),
equals(CardOverlayType.lose),
);
},
);
});
blocTest<GameBloc, GameState>(
'plays a player card',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
user: user,
isHost: true,
),
seed: () => baseState,
act: (bloc) => bloc.add(PlayerPlayed('new_card_1')),
expect: () => [
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: baseState.match,
matchState: MatchState(
id: 'matchStateId',
matchId: baseState.match.id,
guestPlayedCards: const [],
hostPlayedCards: const [],
),
rounds: const [],
turnAnimationsFinished: false,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
],
);
blocTest<GameBloc, GameState>(
'plays a player card when being the guest',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
matchSolver: matchSolver,
user: user,
isHost: false,
),
seed: () => baseState,
act: (bloc) => bloc.add(PlayerPlayed('new_card_1')),
expect: () => [
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: baseState.match,
matchState: MatchState(
id: 'matchStateId',
matchId: baseState.match.id,
guestPlayedCards: const [],
hostPlayedCards: const [],
),
rounds: const [],
turnAnimationsFinished: false,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
],
);
blocTest<GameBloc, GameState>(
'Last card is played with no result then calls calculateResult',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
matchSolver: matchSolver,
user: user,
isHost: false,
),
setUp: () {
when(
() => matchSolver.isPlayerAllowedToPlay(
any(),
isHost: any(named: 'isHost'),
),
).thenReturn(true);
when(
() => gameResource.calculateResult(
matchId: any(named: 'matchId'),
),
).thenAnswer((invocation) async {});
},
seed: () => baseState,
act: (bloc) => bloc.add(
MatchStateUpdated(
MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.matchId,
hostPlayedCards: const ['new_card_1', 'new_card_2', 'new_card_3'],
guestPlayedCards: const [
'new_card_4',
'new_card_5',
'new_card_6',
],
),
),
),
verify: (_) {
verify(
() => gameResource.calculateResult(
matchId: any(named: 'matchId'),
),
).called(1);
},
);
blocTest<GameBloc, GameState>(
'Plays playCard sound when card is played by both players',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
user: user,
isHost: true,
),
setUp: () {
when(
() => matchSolver.isPlayerAllowedToPlay(
any(),
isHost: any(named: 'isHost'),
),
).thenReturn(true);
},
seed: () => baseState,
act: (bloc) {
bloc
..add(PlayerPlayed('new_card_1'))
..add(
MatchStateUpdated(
MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.matchId,
hostPlayedCards: const ['new_card_1'],
guestPlayedCards: baseState.matchState.guestPlayedCards,
),
),
)
..add(
MatchStateUpdated(
MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.matchId,
hostPlayedCards: const ['new_card_1'],
guestPlayedCards: const ['new_card_2'],
),
),
);
},
verify: (_) {
verify(() => audioController.playSfx(Assets.sfx.playCard)).called(2);
},
);
blocTest<GameBloc, GameState>(
'plays a player card, receives confirmation and then receives an '
'opponent card',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
user: user,
isHost: true,
),
setUp: () {
when(
() => matchSolver.isPlayerAllowedToPlay(
any(),
isHost: any(named: 'isHost'),
),
).thenReturn(true);
},
seed: () => baseState,
act: (bloc) {
bloc
..add(PlayerPlayed('new_card_1'))
..add(
MatchStateUpdated(
MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.matchId,
hostPlayedCards: const ['new_card_1'],
guestPlayedCards: baseState.matchState.guestPlayedCards,
),
),
)
..add(
MatchStateUpdated(
MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.matchId,
hostPlayedCards: const ['new_card_1'],
guestPlayedCards: const ['new_card_2'],
),
),
);
},
expect: () => [
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: baseState.match,
matchState: MatchState(
id: 'matchStateId',
matchId: baseState.match.id,
guestPlayedCards: const [],
hostPlayedCards: const [],
),
rounds: const [],
turnAnimationsFinished: false,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: baseState.match,
matchState: MatchState(
id: 'matchStateId',
matchId: baseState.match.id,
guestPlayedCards: const [],
hostPlayedCards: const ['new_card_1'],
),
rounds: const [
MatchRound(
opponentCardId: null,
playerCardId: 'new_card_1',
),
],
turnAnimationsFinished: false,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: baseState.match,
matchState: MatchState(
id: 'matchStateId',
matchId: baseState.match.id,
guestPlayedCards: const ['new_card_2'],
hostPlayedCards: const ['new_card_1'],
),
rounds: const [
MatchRound(
opponentCardId: 'new_card_2',
playerCardId: 'new_card_1',
),
],
turnAnimationsFinished: false,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
],
);
blocTest<GameBloc, GameState>(
'plays a player card and opponent card and another opponent one',
build: () => GameBloc(
connectionRepository: connectionRepository,
audioController: audioController,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
user: user,
isHost: true,
),
setUp: () {
when(
() => matchSolver.isPlayerAllowedToPlay(
any(),
isHost: any(named: 'isHost'),
),
).thenReturn(true);
},
seed: () => baseState,
act: (bloc) {
bloc
..add(PlayerPlayed('new_card_1'))
..add(
MatchStateUpdated(
MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.matchId,
hostPlayedCards: const ['new_card_1'],
guestPlayedCards: baseState.matchState.guestPlayedCards,
),
),
)
..add(
MatchStateUpdated(
MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.matchId,
hostPlayedCards: const ['new_card_1'],
guestPlayedCards: const ['new_card_2'],
),
),
)
..add(
MatchStateUpdated(
MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.matchId,
hostPlayedCards: const ['new_card_1'],
guestPlayedCards: const ['new_card_2', 'new_card_3'],
),
),
);
},
expect: () => [
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: baseState.match,
matchState: MatchState(
id: 'matchStateId',
matchId: baseState.match.id,
guestPlayedCards: const [],
hostPlayedCards: const [],
),
rounds: const [],
turnAnimationsFinished: false,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: baseState.match,
matchState: MatchState(
id: 'matchStateId',
matchId: baseState.match.id,
guestPlayedCards: const [],
hostPlayedCards: const ['new_card_1'],
),
rounds: const [
MatchRound(
opponentCardId: null,
playerCardId: 'new_card_1',
),
],
turnAnimationsFinished: false,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: baseState.match,
matchState: MatchState(
id: 'matchStateId',
matchId: baseState.match.id,
guestPlayedCards: const ['new_card_2'],
hostPlayedCards: const ['new_card_1'],
),
rounds: const [
MatchRound(
opponentCardId: 'new_card_2',
playerCardId: 'new_card_1',
),
],
turnAnimationsFinished: false,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: baseState.match,
matchState: MatchState(
id: 'matchStateId',
matchId: baseState.match.id,
guestPlayedCards: const ['new_card_2', 'new_card_3'],
hostPlayedCards: const ['new_card_1'],
),
rounds: const [
MatchRound(
opponentCardId: 'new_card_2',
playerCardId: 'new_card_1',
),
MatchRound(
opponentCardId: 'new_card_3',
playerCardId: null,
),
],
turnAnimationsFinished: false,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
],
);
blocTest<GameBloc, GameState>(
'discards outdated states that may have been received out of order',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
user: user,
isHost: true,
),
seed: () => baseState,
setUp: () {
when(
() => matchSolver.isPlayerAllowedToPlay(
any(),
isHost: any(named: 'isHost'),
),
).thenReturn(true);
},
act: (bloc) {
bloc
..add(
MatchStateUpdated(
MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.matchId,
hostPlayedCards: const ['new_card_1'],
guestPlayedCards: const ['new_card_2', 'new_card_3'],
),
),
)
..add(
MatchStateUpdated(
MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.matchId,
hostPlayedCards: const ['new_card_1'],
guestPlayedCards: const ['new_card_2'],
),
),
);
},
expect: () => [
// We have two states triggered, that happens because of
// the handling of the timers, but note how the last state
// is still correct in matter of cards played.
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: baseState.match,
matchState: MatchState(
id: 'matchStateId',
matchId: baseState.match.id,
hostPlayedCards: const ['new_card_1'],
guestPlayedCards: const ['new_card_2', 'new_card_3'],
),
rounds: const [
MatchRound(
opponentCardId: 'new_card_2',
playerCardId: 'new_card_1',
),
MatchRound(
opponentCardId: 'new_card_3',
playerCardId: null,
),
],
turnAnimationsFinished: true,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: baseState.match,
matchState: MatchState(
id: 'matchStateId',
matchId: baseState.match.id,
hostPlayedCards: const ['new_card_1'],
guestPlayedCards: const ['new_card_2', 'new_card_3'],
),
rounds: const [
MatchRound(
opponentCardId: 'new_card_2',
playerCardId: 'new_card_1',
),
MatchRound(
opponentCardId: 'new_card_3',
playerCardId: null,
turnTimerStarted: true,
),
],
turnAnimationsFinished: true,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
],
);
blocTest<GameBloc, GameState>(
'consider similar states that have different results',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
user: user,
isHost: true,
),
seed: () => baseState,
setUp: () {
when(
() => matchSolver.isPlayerAllowedToPlay(
any(),
isHost: any(named: 'isHost'),
),
).thenReturn(true);
when(
() => gameResource.calculateResult(
matchId: any(named: 'matchId'),
),
).thenAnswer((_) async {});
},
act: (bloc) {
bloc
..add(
MatchStateUpdated(
MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.matchId,
hostPlayedCards: const [
'host_card_1',
'host_card_2',
'host_card_3',
],
guestPlayedCards: const [
'guest_card_1',
'guest_card_2',
'guest_card_3',
],
// result is null here
),
),
)
..add(
MatchStateUpdated(
MatchState(
id: baseState.matchState.id,
matchId: baseState.matchState.matchId,
hostPlayedCards: const [
'host_card_1',
'host_card_2',
'host_card_3',
],
guestPlayedCards: const [
'guest_card_1',
'guest_card_2',
'guest_card_3',
],
result: MatchResult.host,
),
),
);
},
expect: () => [
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: baseState.match,
matchState: MatchState(
id: 'matchStateId',
matchId: baseState.match.id,
hostPlayedCards: const [
'host_card_1',
'host_card_2',
'host_card_3',
],
guestPlayedCards: const [
'guest_card_1',
'guest_card_2',
'guest_card_3',
],
),
rounds: const [
MatchRound(
opponentCardId: 'guest_card_1',
playerCardId: 'host_card_1',
),
MatchRound(
opponentCardId: 'guest_card_2',
playerCardId: 'host_card_2',
),
MatchRound(
opponentCardId: 'guest_card_3',
playerCardId: 'host_card_3',
),
],
turnAnimationsFinished: true,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: baseState.match,
matchState: MatchState(
id: 'matchStateId',
matchId: baseState.match.id,
hostPlayedCards: const [
'host_card_1',
'host_card_2',
'host_card_3',
],
guestPlayedCards: const [
'guest_card_1',
'guest_card_2',
'guest_card_3',
],
result: MatchResult.host,
),
rounds: const [
MatchRound(
opponentCardId: 'guest_card_1',
playerCardId: 'host_card_1',
),
MatchRound(
opponentCardId: 'guest_card_2',
playerCardId: 'host_card_2',
),
MatchRound(
opponentCardId: 'guest_card_3',
playerCardId: 'host_card_3',
),
],
turnAnimationsFinished: true,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
),
],
);
group('- turn countdown', () {
test('starts correctly', () {
fakeAsync((async) {
when(
() => matchSolver.isPlayerAllowedToPlay(
any(),
isHost: any(named: 'isHost'),
),
).thenReturn(true);
final stream =
StreamController<DraftMatch>(onCancel: () async {}).stream;
when(() => matchMakerRepository.watchMatch(any())).thenAnswer(
(_) => stream,
);
final bloc = GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
matchSolver: matchSolver,
user: user,
isHost: true,
)
..add(MatchRequested(match.id, hostDeck))
..add(MatchStateUpdated(baseState.matchState));
async.elapse(Duration(milliseconds: 2500));
expect(
bloc.state,
equals(
MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: match,
matchState: matchState,
rounds: const [
MatchRound(
playerCardId: null,
opponentCardId: null,
turnTimerStarted: true,
),
],
turnAnimationsFinished: true,
turnTimeRemaining: 8,
isClashScene: false,
showCardLanding: false,
),
),
);
bloc.close();
});
});
test('ends and plays card automatically for host', () {
fakeAsync((async) {
when(
() => matchSolver.isPlayerAllowedToPlay(
any(),
isHost: any(named: 'isHost'),
),
).thenReturn(true);
when(() => gameResource.getMatch(any())).thenAnswer((_) async {
return baseState.match;
});
final bloc = GameBloc(
connectionRepository: connectionRepository,
audioController: audioController,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
user: user,
isHost: true,
)
..add(MatchRequested(baseState.match.id, hostDeck))
..add(MatchStateUpdated(baseState.matchState));
async.elapse(Duration(milliseconds: 10500));
verify(
() => gameResource.playCard(
matchId: any(named: 'matchId'),
cardId: any(named: 'cardId'),
deckId: any(named: 'deckId'),
),
).called(1);
bloc.close();
});
});
test('ends and plays card automatically for guest', () {
fakeAsync((async) {
when(
() => matchSolver.isPlayerAllowedToPlay(
any(),
isHost: any(named: 'isHost'),
),
).thenReturn(true);
when(() => gameResource.getMatch(any())).thenAnswer((_) async {
return baseState.match;
});
final bloc = GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
user: user,
isHost: false,
)
..add(MatchRequested(baseState.match.id, hostDeck))
..add(MatchStateUpdated(baseState.matchState));
async.elapse(Duration(milliseconds: 10500));
verify(
() => gameResource.playCard(
matchId: any(named: 'matchId'),
cardId: any(named: 'cardId'),
deckId: any(named: 'deckId'),
),
).called(1);
bloc.close();
});
});
test("ends and doesn't play card automatically if already played", () {
fakeAsync((async) {
when(
() => matchSolver.isPlayerAllowedToPlay(
any(),
isHost: any(named: 'isHost'),
),
).thenReturn(false);
when(() => gameResource.getMatch(any())).thenAnswer((_) async {
return baseState.match;
});
final bloc = GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
user: user,
isHost: false,
)
..add(MatchRequested(baseState.match.id, hostDeck))
..add(MatchStateUpdated(baseState.matchState));
async.elapse(Duration(milliseconds: 10500));
verifyNever(
() => gameResource.playCard(
matchId: any(named: 'matchId'),
cardId: any(named: 'cardId'),
deckId: any(named: 'deckId'),
),
);
bloc.close();
});
});
});
});
blocTest<GameBloc, GameState>(
'playerDeck returns host deck if is host',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
isHost: true,
user: user,
),
seed: () => baseState,
verify: (bloc) {
expect(bloc.playerDeck, equals(hostDeck));
},
);
blocTest<GameBloc, GameState>(
'playerDeck returns guest deck if is guest',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
isHost: false,
user: user,
),
seed: () => baseState,
verify: (bloc) {
expect(bloc.playerDeck, equals(guestDeck));
},
);
blocTest<GameBloc, GameState>(
'playerCards returns host cards if is host',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
isHost: true,
user: user,
),
seed: () => baseState,
verify: (bloc) {
expect(bloc.playerCards, equals(hostCards));
},
);
blocTest<GameBloc, GameState>(
'playerCards returns guest cards if is guest',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
isHost: false,
user: user,
),
seed: () => baseState,
verify: (bloc) {
expect(bloc.playerCards, equals(guestCards));
},
);
blocTest<GameBloc, GameState>(
'opponentCards returns host cards if player is not host',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
matchSolver: matchSolver,
isHost: false,
user: user,
),
seed: () => baseState,
verify: (bloc) {
expect(bloc.opponentCards, equals(hostCards));
},
);
blocTest<GameBloc, GameState>(
'opponentCards returns guest cards if player is host',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
isHost: true,
user: user,
),
seed: () => baseState,
verify: (bloc) {
expect(bloc.opponentCards, equals(guestCards));
},
);
blocTest<GameBloc, GameState>(
'playerCards and opponentCards returns empty if state is not '
'MatchLoadedState',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
isHost: true,
user: user,
),
seed: MatchLoadingState.new,
verify: (bloc) {
expect(bloc.playerCards, isEmpty);
expect(bloc.opponentCards, isEmpty);
},
);
blocTest<GameBloc, GameState>(
'clash scene cards for player and opponent return correctly',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
matchSolver: matchSolver,
isHost: true,
user: user,
),
seed: () => baseState.copyWith(
rounds: [
MatchRound(
playerCardId: hostCards.first.id,
opponentCardId: guestCards.first.id,
),
MatchRound(
playerCardId: null,
opponentCardId: 'WRONG',
),
],
),
verify: (bloc) {
expect(bloc.clashScenePlayerCard, equals(hostCards.first));
expect(bloc.clashSceneOpponentCard, equals(guestCards.first));
},
);
group('MatchLoadedState', () {
group('isCardTurnComplete', () {
final match1 = Match(
id: 'match1',
hostDeck: Deck(id: '', userId: '', cards: const []),
guestDeck: Deck(id: '', userId: '', cards: const []),
);
final matchState1 = MatchState(
id: 'matchState1',
matchId: match1.id,
hostPlayedCards: const [],
guestPlayedCards: const [],
);
final card = Card(
id: '1',
name: '',
description: '',
image: '',
power: 10,
rarity: false,
suit: Suit.air,
);
final baseState = MatchLoadedState(
playerScoreCard: ScoreCard(id: 'scoreCardId'),
match: match1,
matchState: matchState1,
rounds: const [],
turnAnimationsFinished: false,
turnTimeRemaining: 10,
isClashScene: false,
showCardLanding: false,
);
test('returns true if the card is the winning one', () {
final state = baseState.copyWith(
rounds: [
MatchRound(
opponentCardId: card.id,
playerCardId: 'a',
),
],
);
expect(state.isCardTurnComplete(card), isTrue);
});
test('returns false if the turn is not complete', () {
final state = baseState.copyWith(
rounds: [
MatchRound(
opponentCardId: card.id,
playerCardId: null,
),
],
);
expect(state.isCardTurnComplete(card), isFalse);
});
test('can detect the card turn no matter the order', () {
final state = baseState.copyWith(
rounds: [
MatchRound(
opponentCardId: 'a',
playerCardId: card.id,
),
MatchRound(
opponentCardId: 'b',
playerCardId: null,
),
],
);
expect(state.isCardTurnComplete(card), isTrue);
});
});
});
group('MatchRound', () {
test('isComplete', () {
expect(
MatchRound(playerCardId: null, opponentCardId: null).isComplete(),
isFalse,
);
expect(
MatchRound(playerCardId: 'a', opponentCardId: null).isComplete(),
isFalse,
);
expect(
MatchRound(playerCardId: null, opponentCardId: 'a').isComplete(),
isFalse,
);
expect(
MatchRound(playerCardId: 'b', opponentCardId: 'a').isComplete(),
isTrue,
);
});
});
group('manage player presence', () {
blocTest<GameBloc, GameState>(
'notifies when opponent(guest) is absent',
build: () => GameBloc(
connectionRepository: connectionRepository,
audioController: audioController,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
user: user,
isHost: true,
matchSolver: matchSolver,
),
act: (bloc) {
bloc.add(ManagePlayerPresence(match.id, hostDeck));
matchController.add(
DraftMatch(
id: 'matchId',
host: 'hostId',
guest: 'guestId',
hostConnected: true,
),
);
},
expect: () => [OpponentAbsentState(deck: hostDeck)],
verify: (_) {
verify(() => matchMakerRepository.watchMatch(match.id)).called(1);
},
);
blocTest<GameBloc, GameState>(
'notifies when opponent(host) is absent',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
user: user,
isHost: false,
matchSolver: matchSolver,
),
act: (bloc) {
bloc.add(ManagePlayerPresence(match.id, hostDeck));
matchController.add(
DraftMatch(
id: 'matchId',
host: 'hostId',
guest: 'guestId',
guestConnected: true,
),
);
},
expect: () => [OpponentAbsentState(deck: hostDeck)],
verify: (_) {
verify(() => matchMakerRepository.watchMatch(match.id)).called(1);
},
);
blocTest<GameBloc, GameState>(
'does not return a state if opponent is present',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
user: user,
isHost: true,
matchSolver: matchSolver,
),
act: (bloc) {
bloc.add(ManagePlayerPresence(match.id, hostDeck));
matchController.add(
DraftMatch(
id: 'matchId',
host: 'hostId',
guest: 'guestId',
hostConnected: true,
guestConnected: true,
),
);
},
expect: () => <GameState>[],
verify: (_) {
verify(() => matchMakerRepository.watchMatch(match.id)).called(1);
},
);
blocTest<GameBloc, GameState>(
'fails when fetching the match throws an exception',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
user: user,
audioController: audioController,
isHost: true,
matchSolver: matchSolver,
),
setUp: () {
when(() => matchMakerRepository.watchMatch(any())).thenThrow(
Exception('Ops'),
);
},
act: (bloc) {
bloc.add(ManagePlayerPresence(match.id, hostDeck));
matchController.add(
DraftMatch(
id: 'matchId',
host: 'hostId',
guest: 'guestId',
),
);
},
expect: () => [ManagePlayerPresenceFailedState()],
verify: (_) {
verify(() => matchMakerRepository.watchMatch(match.id)).called(1);
},
);
blocTest<GameBloc, GameState>(
'does not return a state if game is over and opponent leaves match',
setUp: () {
when(() => gameResource.getMatchState(any())).thenAnswer(
(_) async => MatchState(
id: 'id',
matchId: 'matchId',
hostPlayedCards: const ['card1', 'card2', 'card3'],
guestPlayedCards: const ['card4', 'card5', 'card6'],
),
);
},
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
audioController: audioController,
user: user,
isHost: true,
matchSolver: matchSolver,
),
act: (bloc) {
bloc.add(ManagePlayerPresence(match.id, hostDeck));
matchController.add(
DraftMatch(
id: 'matchId',
host: 'hostId',
guest: 'guestId',
hostConnected: true,
),
);
},
expect: () => <GameState>[],
verify: (_) {
verify(() => matchMakerRepository.watchMatch(match.id)).called(1);
verify(() => gameResource.getMatchState(match.id)).called(1);
},
);
});
group('LeaderboardEntryRequested', () {
blocTest<GameBloc, GameState>(
'emits LeaderboardEntryState when leaderboard entry is requested',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
audioController: audioController,
matchMakerRepository: matchMakerRepository,
user: user,
isHost: true,
matchSolver: matchSolver,
),
act: (bloc) => bloc.add(LeaderboardEntryRequested()),
seed: () => baseState,
expect: () => <GameState>[
LeaderboardEntryState(baseState.playerScoreCard.id),
],
);
});
group('turnAnimationsFinished', () {
blocTest<GameBloc, GameState>(
'emits state updating turnAnimationsFinished field and '
'adds TurnTimerStarted event',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
user: user,
audioController: audioController,
isHost: true,
matchSolver: matchSolver,
),
seed: () => baseState.copyWith(turnAnimationsFinished: false),
act: (bloc) => bloc.add(TurnAnimationsFinished()),
expect: () => <GameState>[
baseState.copyWith(turnAnimationsFinished: true, isClashScene: false),
],
);
});
group('turnAnimationsFinished', () {
blocTest<GameBloc, GameState>(
'plays clock running when timer reaches 3 seconds',
build: () => GameBloc(
connectionRepository: connectionRepository,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
user: user,
audioController: audioController,
isHost: true,
matchSolver: matchSolver,
),
seed: () => baseState.copyWith(turnTimeRemaining: 4),
act: (bloc) => bloc.add(TurnTimerTicked(_MockTimer())),
verify: (_) {
verify(() => audioController.playSfx(Assets.sfx.clockRunning))
.called(1);
},
);
});
group('ClashSceneStarted', () {
blocTest<GameBloc, GameState>(
'emits state updating showCardsOverlay field and isClashScene',
build: () => GameBloc(
connectionRepository: connectionRepository,
audioController: audioController,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
user: user,
isHost: true,
matchSolver: matchSolver,
),
seed: () => baseState.copyWith(
rounds: [
MatchRound(
playerCardId: hostCards.first.id,
opponentCardId: guestCards.first.id,
)
],
),
act: (bloc) => bloc.add(ClashSceneStarted()),
expect: () => <GameState>[
baseState.copyWith(
rounds: [
MatchRound(
playerCardId: hostCards.first.id,
opponentCardId: guestCards.first.id,
showCardsOverlay: true,
)
],
isClashScene: true,
),
],
);
});
group('ClashSceneCompleted', () {
blocTest<GameBloc, GameState>(
'emits state updating isClashScene field',
build: () => GameBloc(
connectionRepository: connectionRepository,
audioController: audioController,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
user: user,
isHost: true,
matchSolver: matchSolver,
),
seed: () => baseState.copyWith(isClashScene: true),
act: (bloc) => bloc.add(ClashSceneCompleted()),
expect: () => <GameState>[
baseState.copyWith(isClashScene: false),
],
);
});
group('CardLandingStarted', () {
blocTest<GameBloc, GameState>(
'emits state updating showCardLanding field',
build: () => GameBloc(
connectionRepository: connectionRepository,
audioController: audioController,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
user: user,
isHost: true,
matchSolver: matchSolver,
),
seed: () => baseState,
act: (bloc) => bloc.add(CardLandingStarted()),
expect: () => <GameState>[
baseState.copyWith(showCardLanding: true),
],
);
});
group('CardLandingCompleted', () {
blocTest<GameBloc, GameState>(
'emits state updating showCardLanding field',
build: () => GameBloc(
connectionRepository: connectionRepository,
audioController: audioController,
gameResource: gameResource,
matchMakerRepository: matchMakerRepository,
user: user,
isHost: true,
matchSolver: matchSolver,
),
seed: () => baseState.copyWith(showCardLanding: true),
act: (bloc) => bloc.add(CardLandingCompleted()),
expect: () => <GameState>[
baseState.copyWith(showCardLanding: false),
],
);
});
});
}
| io_flip/test/game/bloc/game_bloc_test.dart/0 | {
"file_path": "io_flip/test/game/bloc/game_bloc_test.dart",
"repo_id": "io_flip",
"token_count": 36173
} | 855 |
// ignore_for_file: prefer_const_constructors
import 'package:flutter_test/flutter_test.dart';
import 'package:io_flip/how_to_play/how_to_play.dart';
void main() {
group('HowToPlayEvent', () {
group('NextPageRequested', () {
test('can be instantiated', () {
expect(NextPageRequested(), isNotNull);
});
test('supports equality', () {
expect(NextPageRequested(), equals(NextPageRequested()));
});
});
group('PreviousPageRequested', () {
test('can be instantiated', () {
expect(PreviousPageRequested(), isNotNull);
});
test('supports equality', () {
expect(PreviousPageRequested(), equals(PreviousPageRequested()));
});
});
});
}
| io_flip/test/how_to_play/bloc/how_to_play_event_test.dart/0 | {
"file_path": "io_flip/test/how_to_play/bloc/how_to_play_event_test.dart",
"repo_id": "io_flip",
"token_count": 286
} | 856 |
// ignore_for_file: prefer_const_constructors
import 'dart:async';
import 'dart:math';
import 'package:api_client/api_client.dart';
import 'package:bloc_test/bloc_test.dart';
import 'package:config_repository/config_repository.dart';
import 'package:connection_repository/connection_repository.dart';
import 'package:fake_async/fake_async.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:game_domain/game_domain.dart';
import 'package:io_flip/match_making/match_making.dart';
import 'package:match_maker_repository/match_maker_repository.dart';
import 'package:mocktail/mocktail.dart';
class _MockMatchMakerRepository extends Mock implements MatchMakerRepository {}
class _MockConfigRepository extends Mock implements ConfigRepository {}
class _MockGameResource extends Mock implements GameResource {}
class _MockConnectionRepository extends Mock implements ConnectionRepository {}
class _MockRandom extends Mock implements Random {}
void main() {
group('MatchMakingBloc', () {
late GameResource gameResource;
late MatchMakerRepository matchMakerRepository;
late ConfigRepository configRepository;
late ConnectionRepository connectionRepository;
late Random rng;
late StreamController<DraftMatch> watchController;
const deckId = 'deckId';
const hostDeck = Deck(
id: 'hostDeckId',
userId: 'hostUserId',
cards: [],
);
const guestDeck = Deck(
id: 'guestDeckId',
userId: 'guestUserId',
cards: [],
);
const match = Match(
id: 'matchId',
hostDeck: hostDeck,
guestDeck: guestDeck,
);
setUp(() {
matchMakerRepository = _MockMatchMakerRepository();
configRepository = _MockConfigRepository();
connectionRepository = _MockConnectionRepository();
configRepository = _MockConfigRepository();
watchController = StreamController.broadcast();
rng = _MockRandom();
when(() => matchMakerRepository.watchMatch(any()))
.thenAnswer((_) => watchController.stream);
gameResource = _MockGameResource();
when(() => configRepository.getMatchWaitTimeLimit())
.thenAnswer((_) async => 0);
when(() => configRepository.getPrivateMatchTimeLimit())
.thenAnswer((_) async => 0);
when(() => connectionRepository.messages).thenAnswer(
(_) => Stream.fromIterable([
WebSocketMessage.matchJoined(
matchId: '',
isHost: false,
),
]),
);
when(() => configRepository.getCPUAutoMatchPercentage())
.thenAnswer((_) async => 0);
when(() => rng.nextDouble()).thenReturn(1);
});
test('can be instantiated', () {
expect(
MatchMakingBloc(
matchMakerRepository: _MockMatchMakerRepository(),
configRepository: configRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
),
isNotNull,
);
});
test('has the correct initial state', () {
expect(
MatchMakingBloc(
matchMakerRepository: _MockMatchMakerRepository(),
configRepository: configRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
).state,
equals(MatchMakingState.initial()),
);
});
blocTest<MatchMakingBloc, MatchMakingState>(
'can find a match as a guest',
build: () => MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
configRepository: configRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
hostWaitTime: Duration.zero,
),
setUp: () {
when(() => matchMakerRepository.findMatch(deckId)).thenAnswer(
(_) async => DraftMatch(
id: '',
host: '',
guest: deckId,
),
);
},
act: (bloc) => bloc.add(MatchRequested()),
expect: () => [
MatchMakingState(
status: MatchMakingStatus.processing,
),
MatchMakingState(
status: MatchMakingStatus.completed,
match: DraftMatch(
id: '',
host: '',
guest: deckId,
),
),
],
verify: (_) {
verify(
() => connectionRepository.send(
WebSocketMessage.matchJoined(
matchId: '',
isHost: false,
),
),
).called(1);
},
);
blocTest<MatchMakingBloc, MatchMakingState>(
'emits a failure when an error happens',
build: () => MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
configRepository: configRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
hostWaitTime: Duration.zero,
),
setUp: () {
when(() => matchMakerRepository.findMatch(deckId)).thenThrow(
Exception('Error'),
);
},
act: (bloc) => bloc.add(MatchRequested()),
expect: () => [
MatchMakingState(
status: MatchMakingStatus.processing,
),
MatchMakingState(
status: MatchMakingStatus.failed,
),
],
);
blocTest<MatchMakingBloc, MatchMakingState>(
"creates a match when there isn't one open",
build: () => MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
configRepository: configRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
),
setUp: () {
when(() => matchMakerRepository.findMatch(deckId)).thenAnswer(
(_) async => DraftMatch(
id: '',
host: deckId,
),
);
},
act: (bloc) => bloc.add(MatchRequested()),
expect: () => [
MatchMakingState(
status: MatchMakingStatus.processing,
),
MatchMakingState(
status: MatchMakingStatus.processing,
match: DraftMatch(
id: '',
host: deckId,
),
),
],
verify: (_) {
verify(
() => connectionRepository.send(
WebSocketMessage.matchJoined(
matchId: '',
isHost: true,
),
),
).called(1);
},
);
test('completes the match when is host and a guest joins', () async {
when(() => matchMakerRepository.findMatch(deckId)).thenAnswer(
(_) async => DraftMatch(
id: '',
host: deckId,
),
);
final bloc = MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
configRepository: configRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
)..add(MatchRequested());
expect(
await bloc.stream.take(2).last,
equals(
MatchMakingState(
status: MatchMakingStatus.processing,
match: DraftMatch(
id: '',
host: deckId,
),
),
),
);
watchController.add(
DraftMatch(
id: '',
host: deckId,
guest: '',
),
);
expect(
await bloc.stream.take(1).last,
equals(
MatchMakingState(
status: MatchMakingStatus.completed,
match: DraftMatch(
id: '',
host: deckId,
guest: '',
),
isHost: true,
),
),
);
});
test('completes the match when is host and a guest joins at last moment',
() {
fakeAsync((async) {
when(() => matchMakerRepository.findMatch(deckId)).thenAnswer(
(_) async => DraftMatch(
id: '',
host: deckId,
),
);
when(() => gameResource.getMatch(any())).thenAnswer((_) async => match);
when(() => gameResource.connectToCpuMatch(matchId: ''))
.thenThrow(Exception());
final stream =
StreamController<DraftMatch>(onCancel: () async {}).stream;
when(() => matchMakerRepository.watchMatch(any())).thenAnswer(
(_) => stream,
);
final bloc = MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
configRepository: configRepository,
hostWaitTime: const Duration(milliseconds: 200),
)..add(MatchRequested());
async.elapse(Duration(seconds: 5));
expect(
bloc.state,
equals(
MatchMakingState(
status: MatchMakingStatus.completed,
match: DraftMatch(id: '', host: deckId, guest: 'guestUserId'),
isHost: true,
),
),
);
});
});
test('when match wait time increases wait for another player increases',
() {
fakeAsync((async) {
when(() => configRepository.getMatchWaitTimeLimit())
.thenAnswer((_) async => 120);
when(() => configRepository.getPrivateMatchTimeLimit())
.thenAnswer((_) async => 120);
when(() => matchMakerRepository.findMatch(deckId)).thenAnswer(
(_) async => DraftMatch(
id: '',
host: deckId,
),
);
when(() => gameResource.getMatch(any())).thenAnswer((_) async => match);
when(() => gameResource.connectToCpuMatch(matchId: ''))
.thenThrow(Exception());
final stream =
StreamController<DraftMatch>(onCancel: () async {}).stream;
when(() => matchMakerRepository.watchMatch(any())).thenAnswer(
(_) => stream,
);
final bloc = MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
configRepository: configRepository,
hostWaitTime: const Duration(milliseconds: 200),
)..add(MatchRequested());
async.elapse(Duration(seconds: 5));
expect(
bloc.state,
equals(
MatchMakingState(
status: MatchMakingStatus.processing,
match: DraftMatch(id: '', host: deckId),
),
),
);
});
});
test('emits timeout if getMatch returns null after timeout', () {
fakeAsync((async) {
when(() => matchMakerRepository.findMatch(deckId)).thenAnswer(
(_) async => DraftMatch(
id: '',
host: deckId,
),
);
when(() => gameResource.getMatch(any())).thenAnswer((_) async => null);
when(() => gameResource.connectToCpuMatch(matchId: ''))
.thenThrow(Exception());
final stream =
StreamController<DraftMatch>(onCancel: () async {}).stream;
when(() => matchMakerRepository.watchMatch(any())).thenAnswer(
(_) => stream,
);
final bloc = MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
hostWaitTime: const Duration(milliseconds: 200),
configRepository: configRepository,
)..add(MatchRequested());
async.elapse(Duration(seconds: 5));
expect(
bloc.state,
equals(
MatchMakingState(
status: MatchMakingStatus.timeout,
match: DraftMatch(id: '', host: deckId),
),
),
);
});
});
test(
'directly connects to a CPU match when chances force the player '
'to one', () {
fakeAsync((async) {
when(() => rng.nextDouble()).thenReturn(.8);
when(() => configRepository.getCPUAutoMatchPercentage())
.thenAnswer((_) async => .9);
when(() => matchMakerRepository.findMatch(deckId, forcedCpu: true))
.thenAnswer(
(_) async => DraftMatch(
id: '',
host: deckId,
guest: reservedKey,
),
);
when(() => gameResource.connectToCpuMatch(matchId: ''))
.thenAnswer((_) async {});
final bloc = MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
configRepository: configRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
rng: rng,
hostWaitTime: const Duration(milliseconds: 600),
)..add(MatchRequested());
async.elapse(const Duration(milliseconds: 200));
expect(
bloc.state,
equals(
MatchMakingState(
status: MatchMakingStatus.completed,
match: DraftMatch(id: '', host: deckId, guest: 'CPU_$deckId'),
isHost: true,
),
),
);
});
});
test(
'emits timeout when guest never joins and fails to connect to CPU game',
() {
fakeAsync((async) {
when(() => matchMakerRepository.findMatch(deckId)).thenAnswer(
(_) async => DraftMatch(
id: '',
host: deckId,
),
);
when(() => gameResource.connectToCpuMatch(matchId: ''))
.thenThrow(Exception());
final stream =
StreamController<DraftMatch>(onCancel: () async {}).stream;
when(() => matchMakerRepository.watchMatch(any())).thenAnswer(
(_) => stream,
);
final bloc = MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
configRepository: configRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
hostWaitTime: const Duration(milliseconds: 200),
)..add(MatchRequested());
async.elapse(Duration(seconds: 5));
expect(
bloc.state,
equals(
MatchMakingState(
status: MatchMakingStatus.timeout,
match: DraftMatch(
id: '',
host: deckId,
),
),
),
);
});
});
test('creates CPU match when guest never joins host', () {
fakeAsync((async) {
when(() => matchMakerRepository.findMatch(deckId)).thenAnswer(
(_) async => DraftMatch(
id: '',
host: deckId,
),
);
when(() => gameResource.connectToCpuMatch(matchId: ''))
.thenAnswer((_) async {});
final stream =
StreamController<DraftMatch>(onCancel: () async {}).stream;
when(() => matchMakerRepository.watchMatch(any())).thenAnswer(
(_) => stream,
);
final bloc = MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
configRepository: configRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
hostWaitTime: const Duration(milliseconds: 200),
)..add(MatchRequested());
async.elapse(Duration(seconds: 5));
expect(
bloc.state,
equals(
MatchMakingState(
status: MatchMakingStatus.completed,
match: DraftMatch(id: '', host: deckId, guest: 'CPU_$deckId'),
isHost: true,
),
),
);
});
});
test('creates CPU match when guest never joins a private match', () {
fakeAsync((async) {
when(() => matchMakerRepository.createPrivateMatch(deckId)).thenAnswer(
(_) async => DraftMatch(
id: '',
host: deckId,
),
);
when(() => gameResource.connectToCpuMatch(matchId: ''))
.thenAnswer((_) async {});
final stream =
StreamController<DraftMatch>(onCancel: () async {}).stream;
when(() => matchMakerRepository.watchMatch(any())).thenAnswer(
(_) => stream,
);
final bloc = MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
configRepository: configRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
hostWaitTime: const Duration(milliseconds: 200),
)..add(PrivateMatchRequested());
async.elapse(Duration(seconds: 122));
expect(
bloc.state,
equals(
MatchMakingState(
status: MatchMakingStatus.completed,
match: DraftMatch(id: '', host: deckId, guest: 'CPU_$deckId'),
isHost: true,
),
),
);
});
});
blocTest<MatchMakingBloc, MatchMakingState>(
'creates a private match when requested',
build: () => MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
configRepository: configRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
),
setUp: () {
when(() => matchMakerRepository.createPrivateMatch(deckId)).thenAnswer(
(_) async => DraftMatch(
id: '',
host: deckId,
),
);
},
act: (bloc) => bloc.add(PrivateMatchRequested()),
expect: () => [
MatchMakingState(
status: MatchMakingStatus.processing,
),
MatchMakingState(
status: MatchMakingStatus.processing,
match: DraftMatch(
id: '',
host: deckId,
),
),
],
verify: (_) {
verify(
() => connectionRepository.send(
WebSocketMessage.matchJoined(
matchId: '',
isHost: true,
),
),
).called(1);
},
);
blocTest<MatchMakingBloc, MatchMakingState>(
'emits failed when a private match is requested gives an error',
build: () => MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
configRepository: configRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
),
setUp: () {
when(() => matchMakerRepository.createPrivateMatch(deckId)).thenThrow(
Exception('Ops'),
);
},
act: (bloc) => bloc.add(PrivateMatchRequested()),
expect: () => [
MatchMakingState(
status: MatchMakingStatus.processing,
),
MatchMakingState(
status: MatchMakingStatus.failed,
),
],
);
blocTest<MatchMakingBloc, MatchMakingState>(
'joins a private match',
build: () => MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
configRepository: configRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
),
setUp: () {
when(
() => matchMakerRepository.joinPrivateMatch(
guestId: deckId,
inviteCode: 'invite',
),
).thenAnswer(
(_) async => DraftMatch(
id: '',
guest: deckId,
host: 'hostId',
),
);
},
act: (bloc) => bloc.add(GuestPrivateMatchRequested('invite')),
expect: () => [
MatchMakingState(
status: MatchMakingStatus.processing,
),
MatchMakingState(
status: MatchMakingStatus.completed,
match: DraftMatch(
id: '',
guest: deckId,
host: 'hostId',
),
),
],
verify: (_) {
verify(
() => connectionRepository.send(
WebSocketMessage.matchJoined(
matchId: '',
isHost: false,
),
),
).called(1);
},
);
blocTest<MatchMakingBloc, MatchMakingState>(
'emits failed when joining a private match gives an error',
build: () => MatchMakingBloc(
matchMakerRepository: matchMakerRepository,
configRepository: configRepository,
connectionRepository: connectionRepository,
gameResource: gameResource,
deckId: deckId,
),
setUp: () {
when(
() => matchMakerRepository.joinPrivateMatch(
guestId: deckId,
inviteCode: 'invite',
),
).thenThrow(Exception('Ops'));
},
act: (bloc) => bloc.add(GuestPrivateMatchRequested('invite')),
expect: () => [
MatchMakingState(
status: MatchMakingStatus.processing,
),
MatchMakingState(
status: MatchMakingStatus.failed,
),
],
);
});
}
| io_flip/test/match_making/bloc/match_making_bloc_test.dart/0 | {
"file_path": "io_flip/test/match_making/bloc/match_making_bloc_test.dart",
"repo_id": "io_flip",
"token_count": 9896
} | 857 |
// ignore_for_file: prefer_const_constructors
import 'package:flutter_test/flutter_test.dart';
import 'package:io_flip/scripts/cubit/scripts_cubit.dart';
void main() {
group('ScriptsState', () {
test('can be instantiated', () {
expect(
ScriptsState(
status: ScriptsStateStatus.loading,
current: 'script',
),
isNotNull,
);
});
test('supports equality', () {
expect(
ScriptsState(
status: ScriptsStateStatus.loading,
current: 'script',
),
equals(
ScriptsState(
status: ScriptsStateStatus.loading,
current: 'script',
),
),
);
expect(
ScriptsState(
status: ScriptsStateStatus.loading,
current: 'script',
),
isNot(
equals(
ScriptsState(
status: ScriptsStateStatus.failed,
current: 'script',
),
),
),
);
expect(
ScriptsState(
status: ScriptsStateStatus.loading,
current: 'script',
),
isNot(
equals(
ScriptsState(
status: ScriptsStateStatus.loading,
current: 'script 2',
),
),
),
);
});
test('copyWith returns a new instance with the new value', () {
expect(
ScriptsState(
status: ScriptsStateStatus.loading,
current: 'script',
).copyWith(status: ScriptsStateStatus.loaded),
equals(
ScriptsState(
status: ScriptsStateStatus.loaded,
current: 'script',
),
),
);
expect(
ScriptsState(
status: ScriptsStateStatus.loading,
current: 'script',
).copyWith(current: 'script 2'),
equals(
ScriptsState(
status: ScriptsStateStatus.loading,
current: 'script 2',
),
),
);
});
});
}
| io_flip/test/scripts/cubit/scripts_state_test.dart/0 | {
"file_path": "io_flip/test/scripts/cubit/scripts_state_test.dart",
"repo_id": "io_flip",
"token_count": 1067
} | 858 |
import 'package:flutter_test/flutter_test.dart';
import 'package:io_flip/utils/utils.dart';
import 'package:mocktail/mocktail.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart';
class _MockUrlLauncher extends Mock
with MockPlatformInterfaceMixin
implements UrlLauncherPlatform {}
class _FakeLaunchOptions extends Fake implements LaunchOptions {}
void main() {
group('openLink', () {
late UrlLauncherPlatform urlLauncher;
setUp(() {
urlLauncher = _MockUrlLauncher();
UrlLauncherPlatform.instance = urlLauncher;
});
setUpAll(() {
registerFallbackValue(_FakeLaunchOptions());
});
group('openLink', () {
test('launches the link', () async {
when(
() => urlLauncher.canLaunch(any()),
).thenAnswer((_) async => true);
when(
() => urlLauncher.launchUrl(any(), any()),
).thenAnswer((_) async => true);
await openLink('uri');
verify(
() => urlLauncher.launchUrl(any(), any()),
).called(1);
});
test('executes the onError callback when it cannot launch', () async {
var wasCalled = false;
when(
() => urlLauncher.canLaunch(any()),
).thenAnswer((_) async => false);
when(
() => urlLauncher.launchUrl(any(), any()),
).thenAnswer((_) async => true);
await openLink(
'url',
onError: () {
wasCalled = true;
},
);
await expectLater(wasCalled, isTrue);
});
});
});
}
| io_flip/test/utils/external_links_test.dart/0 | {
"file_path": "io_flip/test/utils/external_links_test.dart",
"repo_id": "io_flip",
"token_count": 700
} | 859 |
<img alt="Flutter News Toolkit Logo" height="75" src="./docs/static/img/header_light.svg#gh-light-mode-only"/>
<img alt="Flutter News Toolkit Logo" height="75" src="./docs/static/img/header_dark.svg#gh-dark-mode-only"/>
<br/>
Flutter and the [Google News Initiative](https://newsinitiative.withgoogle.com/) have co-sponsored the development of a news application template. The goal of this project is to help news publishers build mobile applications easily in order to make reliable information accessible to all.
This template aims to **significantly reduce the development time for typical news applications** by giving developers a head start on core components and features.
The Flutter News Toolkit:
- Contains common news app UI workflows and core features built with Flutter and Firebase
- Implements best practices for news apps based on [Google News Initiative research](https://newsinitiative.withgoogle.com/info/assets/static/docs/nci/nci-playbook-en.pdf)
- Allows publishers to monetize immediately with ads and subscription services
Common services such as authentication, notifications, analytics, and ads have been implemented using [Firebase](https://firebase.flutter.dev/docs/overview/) and [Google Mobile Ads](https://pub.dev/packages/google_mobile_ads). Developers are free to substitute these services and can find publicly available packages on [pub.dev](https://pub.dev).
If you're just getting started with Flutter, we recommend first developing familiarity with the framework by reviewing the [onboarding guides](https://docs.flutter.dev/get-started/install), [tutorials](https://docs.flutter.dev/reference/tutorials), and [codelabs](https://docs.flutter.dev/codelabs) before using this template.
## Get Started
To get started, see the official documentation at https://flutter.github.io/news_toolkit.
| news_toolkit/README.md/0 | {
"file_path": "news_toolkit/README.md",
"repo_id": "news_toolkit",
"token_count": 468
} | 860 |
---
sidebar_position: 7
description: Learn how to configure push notifications in your Flutter news application.
---
# Push notifications
## Firebase Cloud Messaging (FCM)
This template comes with [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) pre-configured. If you prefer to [use OneSignal](https://flutter.github.io/news_toolkit/project_configuration/notifications/#onesignal) instead, use the instructions in the last section of this page.
Out of the box, the application subscribes to topics corresponding to supported news categories, such as `health`, `science`, `sports`, `food`, and so on.
### Triggering a notification 📬
Trigger a notification using the [Firebase Cloud Messaging REST API](https://firebase.google.com/docs/reference/fcm/rest):
- First, generate a (required) access token in the [Google OAuth 2.0 Playground](https://developers.google.com/oauthplayground/).
- Select the `https://www.googleapis.com/auth/firebase.messaging` scope under **Firebase Cloud Messaging API v1** and click **Authorize APIs**.
- Then, sign in with the Google Account that has access to the respective Firebase project and click **Exchange authorization code for tokens**.
- Use the following `cURL` syntax to send a message to a topic:
```
curl -X POST -H "Authorization: Bearer <ACCESS_TOKEN>" -H "Content-Type: application/json" -d '{
"message": {
"topic" : "<TOPIC-NAME>",
"notification": {
"body": "This is a Firebase Cloud Messaging Topic Test Message!",
"title": "Test Notification"
}
}
}' https://fcm.googleapis.com/v1/projects/<PROJECT-ID>/messages:send HTTP/1.1
```
:::note
> In the previous example, replace `<ACCESS_TOKEN>` with the access token generated from the Google OAuth 2.0 Playground, `<TOPIC-NAME>` with the desired topic name, and `<PROJECT-ID>` with the corresponding Firebase project ID.
:::
:::note
Ensure that you're running the application on a physical device in order to receive FCM messages.
:::
## OneSignal
Follow OneSignal's guide for [setting up the OneSignal Flutter SDK](https://documentation.onesignal.com/docs/flutter-sdk-setup). Make sure to:
- Ensure all requirements for integration listed in the OneSignal documentation are met.
- Add the OneSignal Flutter SDK dependency.
- Add an iOS service extension in Xcode.
- Enable `push capability` in Xcode.
- Setup OneSignal for Android in the codebase.
- Initialize OneSignal in the notifications client package.
- Replace FCM references in the codebase with the corresponding OneSignal infrastructure:
- In `lib/main/bootstap/bootstrap.dart` replace `FirebaseMessaging` with `OneSignal` and the `FireBaseMessaging.instance` with a `OneSignal.shared` instance.
- In the `main.dart` file for each of your flavors, assign `notificationsClient` to an instance of `OneSignalNotificationsClient`.
- Run the app and send test notifications through OneSignal.
- _Note: iOS push notifications only work if tested on a physical device_.
| news_toolkit/docs/docs/flutter_development/push_notifications.md/0 | {
"file_path": "news_toolkit/docs/docs/flutter_development/push_notifications.md",
"repo_id": "news_toolkit",
"token_count": 865
} | 861 |
{
"label": "Server Development",
"position": 5,
"link": {
"title": "Server Development",
"type": "generated-index",
"description": "How to start development on your news API server."
}
}
| news_toolkit/docs/docs/server_development/_category_.json/0 | {
"file_path": "news_toolkit/docs/docs/server_development/_category_.json",
"repo_id": "news_toolkit",
"token_count": 70
} | 862 |
# Contributing to Flutter News Example
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
The following is a set of guidelines for contributing to Flutter News Example.
These are mostly guidelines, not rules. Use your best judgment,
and feel free to propose changes to this document in a pull request.
## Commits
We're using [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/), so use following prefixes for your commits:
- **feat**: A new feature
- **fix**: A bug fix
- **chore**: A change that is related to dependencies, imports, format changes - not worth any other prefix
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to our CI configuration files and scripts
- **docs**: Documentation only changes
- **perf**: A code change that improves performance
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- **test**: Adding missing tests or correcting existing tests
## Proposing a Change
If you intend to add a feature, or make any non-trivial changes
to the implementation, we recommend filing an issue.
This lets us reach an agreement on your proposal before you put significant
effort into it.
If you’re only fixing a bug, it’s fine to submit a pull request right away
but we still recommend to file an issue detailing what you’re fixing.
This is helpful in case we don’t accept that specific fix but want to keep
track of the issue.
## Creating a Pull Request
Before creating a pull request please:
1. Fork the repository and create your branch from `main`.
1. Install all dependencies (`flutter packages get` or `pub get`).
1. Squash your commits and ensure you have a meaningful commit message.
1. If you’ve fixed a bug or added code that should be tested, add tests!
Pull Requests without 100% test coverage will not be approved.
1. Ensure the test suite passes (see `tool/coverage.sh`)
1. If you've changed the public API, make sure to update/add documentation.
1. Format your code (`flutter format --set-exit-if-changed lib test`).
1. Analyze your code (`flutter analyze lib test`).
1. Create the Pull Request and fill the description.
1. Verify that all status checks are passing.
While the prerequisites above must be satisfied prior to having your
pull request reviewed, the reviewer(s) may ask you to complete additional
design work, tests, or other changes before your pull request can be ultimately
accepted.
| news_toolkit/flutter_news_example/CONTRIBUTING.md/0 | {
"file_path": "news_toolkit/flutter_news_example/CONTRIBUTING.md",
"repo_id": "news_toolkit",
"token_count": 658
} | 863 |
# Flutter News Example API ☁️
## Getting Started 🚀
The Flutter News Example API is written in [Dart](https://dart.dev) and uses [Dart Frog](https://verygoodopensource.github.io/dart_frog).
### Running Server Locally ☁️💻
To run the server locally, run the following command from the current directory:
```sh
dart_frog dev
```
This will start the server on [localhost:8080](http://localhost:8080).
### Running in Docker 🐳
To run the server in Docker, make sure you have [Docker installed](https://docs.docker.com/get-docker/).
First, create a production build via:
```sh
dart_frog build
```
Next, switch directories into the generated `build` directory.
```sh
cd build
```
Then you can create an image:
```sh
docker build -q .
```
Once you have created an image, you can run the image via:
```sh
docker run -d -p 8080:8080 --rm <IMAGE>
```
To kill the container:
```sh
docker kill <CONTAINER>
```
If you wish to delete an image you can run:
```sh
docker rmi <IMAGE>
```
## API Documentation 📚
The service API documentation can be found in `docs/api.apib`. The documentation uses the [API Blueprint](https://github.com/apiaryio/api-blueprint) specification and can be previewed using the [Apiary Client](https://github.com/apiaryio/apiary-client).
### Running the Documentation Locally 📚💻
To run the interactive API documentation locally make sure you have the [Apiary Client](https://github.com/apiaryio/apiary-client) installed:
```sh
$ gem install apiaryio
```
Then use the `preview` command to run the documentation:
```sh
$ apiary preview --path docs/api.apib --watch
```
The interactive documentation will be available at [localhost:8080](http://localhost:8080).
Refer to the [Apiary Client Documentation](https://help.apiary.io/tools/apiary-cli) for more information.
### Contributing to the API Documentation 🖊️📚
Refer to [APIBlueprint.org](https://apiblueprint.org/) for documentation and tutorials on using the API Blueprint Specification.
Refer to the [API Blueprint Specification](https://github.com/apiaryio/api-blueprint/blob/master/API%20Blueprint%20Specification.md) for more information.
It is recommended to install the [API Elements VSCode Extension](https://marketplace.visualstudio.com/items?itemName=vncz.vscode-apielements) to provide syntax highlighting and show errors/warnings when using invalid syntax.
| news_toolkit/flutter_news_example/api/README.md/0 | {
"file_path": "news_toolkit/flutter_news_example/api/README.md",
"repo_id": "news_toolkit",
"token_count": 721
} | 864 |
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'subscription.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
Subscription _$SubscriptionFromJson(Map<String, dynamic> json) => Subscription(
id: json['id'] as String,
name: $enumDecode(_$SubscriptionPlanEnumMap, json['name']),
cost: SubscriptionCost.fromJson(json['cost'] as Map<String, dynamic>),
benefits:
(json['benefits'] as List<dynamic>).map((e) => e as String).toList(),
);
Map<String, dynamic> _$SubscriptionToJson(Subscription instance) =>
<String, dynamic>{
'id': instance.id,
'name': _$SubscriptionPlanEnumMap[instance.name]!,
'cost': instance.cost.toJson(),
'benefits': instance.benefits,
};
const _$SubscriptionPlanEnumMap = {
SubscriptionPlan.none: 'none',
SubscriptionPlan.basic: 'basic',
SubscriptionPlan.plus: 'plus',
SubscriptionPlan.premium: 'premium',
};
SubscriptionCost _$SubscriptionCostFromJson(Map<String, dynamic> json) =>
SubscriptionCost(
monthly: json['monthly'] as int,
annual: json['annual'] as int,
);
Map<String, dynamic> _$SubscriptionCostToJson(SubscriptionCost instance) =>
<String, dynamic>{
'monthly': instance.monthly,
'annual': instance.annual,
};
| news_toolkit/flutter_news_example/api/lib/src/data/models/subscription.g.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/lib/src/data/models/subscription.g.dart",
"repo_id": "news_toolkit",
"token_count": 489
} | 865 |
export 'article_response/article_response.dart';
export 'categories_response/categories_response.dart';
export 'current_user_response/current_user_response.dart';
export 'feed_response/feed_response.dart';
export 'popular_search_response/popular_search_response.dart';
export 'related_articles_response/related_articles_response.dart';
export 'relevant_search_response/relevant_search_response.dart';
export 'subscriptions_response/subscriptions_response.dart';
| news_toolkit/flutter_news_example/api/lib/src/models/models.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/lib/src/models/models.dart",
"repo_id": "news_toolkit",
"token_count": 134
} | 866 |
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:news_blocks/news_blocks.dart';
part 'banner_ad_block.g.dart';
/// The size of a [BannerAdBlock].
enum BannerAdSize {
/// The normal size of a banner ad.
normal,
/// The large size of a banner ad.
large,
/// The extra large size of a banner ad.
extraLarge,
/// The anchored adaptive size of a banner ad.
anchoredAdaptive
}
/// {@template banner_ad_block}
/// A block which represents a banner ad.
/// https://www.figma.com/file/RajSN6YbRqTuqvdKYtij3b/Google-News-Template-App-v3?node-id=35%3A5151
/// {@endtemplate}
@JsonSerializable()
class BannerAdBlock with EquatableMixin implements NewsBlock {
/// {@macro banner_ad_block}
const BannerAdBlock({
required this.size,
this.type = BannerAdBlock.identifier,
});
/// Converts a `Map<String, dynamic>` into a [BannerAdBlock] instance.
factory BannerAdBlock.fromJson(Map<String, dynamic> json) =>
_$BannerAdBlockFromJson(json);
/// The banner ad block type identifier.
static const identifier = '__banner_ad__';
/// The size of this banner ad.
final BannerAdSize size;
@override
final String type;
@override
Map<String, dynamic> toJson() => _$BannerAdBlockToJson(this);
@override
List<Object> get props => [size, type];
}
| news_toolkit/flutter_news_example/api/packages/news_blocks/lib/src/banner_ad_block.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/packages/news_blocks/lib/src/banner_ad_block.dart",
"repo_id": "news_toolkit",
"token_count": 463
} | 867 |
import 'package:equatable/equatable.dart';
import 'package:news_blocks/news_blocks.dart';
/// {@template post_block}
/// An abstract block which represents a post block.
/// {@endtemplate}
abstract class PostBlock with EquatableMixin implements NewsBlock {
/// {@macro post_block}
const PostBlock({
required this.id,
required this.category,
required this.author,
required this.publishedAt,
required this.title,
required this.type,
this.imageUrl,
this.description,
this.action,
this.isPremium = false,
this.isContentOverlaid = false,
});
/// The medium post block type identifier.
static const identifier = '__post_medium__';
/// The identifier of this post.
final String id;
/// The category of this post.
final PostCategory category;
/// The author of this post.
final String author;
/// The date when this post was published.
final DateTime publishedAt;
/// The image URL of this post.
final String? imageUrl;
/// The title of this post.
final String title;
/// The optional description of this post.
final String? description;
/// An optional action which occurs upon interaction.
@BlockActionConverter()
final BlockAction? action;
/// Whether this post requires a premium subscription to access.
///
/// Defaults to false.
final bool isPremium;
/// Whether the content of this post is overlaid on the image.
///
/// Defaults to false.
final bool isContentOverlaid;
@override
final String type;
@override
List<Object?> get props => [
id,
category,
author,
publishedAt,
imageUrl,
title,
description,
action,
isPremium,
isContentOverlaid,
type,
];
}
/// The extension on [PostBlock] that provides information about actions.
extension PostBlockActions on PostBlock {
/// Whether the action of this post is navigation.
bool get hasNavigationAction =>
action?.actionType == BlockActionType.navigation;
}
| news_toolkit/flutter_news_example/api/packages/news_blocks/lib/src/post_block.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/packages/news_blocks/lib/src/post_block.dart",
"repo_id": "news_toolkit",
"token_count": 654
} | 868 |
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:news_blocks/news_blocks.dart';
part 'slideshow_block.g.dart';
/// {@template slideshow_block}
/// A block which represents a slideshow.
/// {@endtemplate}
@JsonSerializable()
class SlideshowBlock with EquatableMixin implements NewsBlock {
/// {@macro slideshow_block}
const SlideshowBlock({
required this.title,
required this.slides,
this.type = SlideshowBlock.identifier,
});
/// Converts a `Map<String, dynamic>` into a [SlideshowBlock] instance.
factory SlideshowBlock.fromJson(Map<String, dynamic> json) =>
_$SlideshowBlockFromJson(json);
/// The title of this slideshow.
final String title;
/// List of slides to be displayed.
final List<SlideBlock> slides;
/// The slideshow block type identifier.
static const identifier = '__slideshow__';
@override
Map<String, dynamic> toJson() => _$SlideshowBlockToJson(this);
@override
List<Object> get props => [type, title, slides];
@override
final String type;
}
| news_toolkit/flutter_news_example/api/packages/news_blocks/lib/src/slideshow_block.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/packages/news_blocks/lib/src/slideshow_block.dart",
"repo_id": "news_toolkit",
"token_count": 344
} | 869 |
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:news_blocks/news_blocks.dart';
part 'unknown_block.g.dart';
/// {@template unknown_block}
/// A block which represents an unknown type.
/// {@endtemplate}
@JsonSerializable()
class UnknownBlock with EquatableMixin implements NewsBlock {
/// {@macro unknown_block}
const UnknownBlock({this.type = UnknownBlock.identifier});
/// Converts a `Map<String, dynamic>` into a [UnknownBlock] instance.
factory UnknownBlock.fromJson(Map<String, dynamic> json) =>
_$UnknownBlockFromJson(json);
/// The unknown block type identifier.
static const identifier = '__unknown__';
@override
final String type;
@override
Map<String, dynamic> toJson() => _$UnknownBlockToJson(this);
@override
List<Object> get props => [type];
}
| news_toolkit/flutter_news_example/api/packages/news_blocks/lib/src/unknown_block.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/packages/news_blocks/lib/src/unknown_block.dart",
"repo_id": "news_toolkit",
"token_count": 270
} | 870 |
// ignore_for_file: prefer_const_constructors
import 'package:news_blocks/news_blocks.dart';
import 'package:test/test.dart';
void main() {
group('NewsBlocksConverter', () {
test('can (de)serialize List<NewsBlock>', () {
final converter = NewsBlocksConverter();
final newsBlocks = <NewsBlock>[
SectionHeaderBlock(title: 'title'),
DividerHorizontalBlock(),
SpacerBlock(spacing: Spacing.medium),
PostSmallBlock(
id: 'id',
category: PostCategory.health,
author: 'author',
publishedAt: DateTime(2022, 3, 11),
imageUrl: 'imageUrl',
title: 'title',
description: 'description',
),
];
expect(
converter.fromJson(converter.toJson(newsBlocks)),
equals(newsBlocks),
);
});
});
}
| news_toolkit/flutter_news_example/api/packages/news_blocks/test/src/news_blocks_converter_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/packages/news_blocks/test/src/news_blocks_converter_test.dart",
"repo_id": "news_toolkit",
"token_count": 369
} | 871 |
// ignore_for_file: prefer_const_constructors
import 'package:news_blocks/news_blocks.dart';
import 'package:test/test.dart';
void main() {
group('TextParagraphBlock', () {
test('can be (de)serialized', () {
final block = TextParagraphBlock(text: 'Paragraph text');
expect(TextParagraphBlock.fromJson(block.toJson()), equals(block));
});
});
}
| news_toolkit/flutter_news_example/api/packages/news_blocks/test/src/text_paragraph_block_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/packages/news_blocks/test/src/text_paragraph_block_test.dart",
"repo_id": "news_toolkit",
"token_count": 135
} | 872 |
import 'dart:io';
import 'package:dart_frog/dart_frog.dart';
import 'package:flutter_news_example_api/api.dart';
Future<Response> onRequest(RequestContext context) async {
if (context.request.method != HttpMethod.get) {
return Response(statusCode: HttpStatus.methodNotAllowed);
}
final reqUser = context.read<RequestUser>();
if (reqUser.isAnonymous) return Response(statusCode: HttpStatus.badRequest);
final user = await context.read<NewsDataSource>().getUser(userId: reqUser.id);
if (user == null) return Response(statusCode: HttpStatus.notFound);
final response = CurrentUserResponse(user: user);
return Response.json(body: response);
}
| news_toolkit/flutter_news_example/api/routes/api/v1/users/me.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/routes/api/v1/users/me.dart",
"repo_id": "news_toolkit",
"token_count": 210
} | 873 |
// ignore_for_file: prefer_const_constructors
import 'package:flutter_news_example_api/api.dart';
import 'package:news_blocks/news_blocks.dart';
import 'package:test/test.dart';
void main() {
group('RelatedArticles', () {
test('can be (de)serialized', () {
final blockA = SectionHeaderBlock(title: 'sectionA');
final blockB = SectionHeaderBlock(title: 'sectionB');
final relatedArticles = RelatedArticles(
blocks: [blockA, blockB],
totalBlocks: 2,
);
expect(
RelatedArticles.fromJson(relatedArticles.toJson()),
equals(relatedArticles),
);
});
});
}
| news_toolkit/flutter_news_example/api/test/src/data/models/related_articles_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/api/test/src/data/models/related_articles_test.dart",
"repo_id": "news_toolkit",
"token_count": 250
} | 874 |
#import "GeneratedPluginRegistrant.h"
| news_toolkit/flutter_news_example/ios/Runner/Runner-Bridging-Header.h/0 | {
"file_path": "news_toolkit/flutter_news_example/ios/Runner/Runner-Bridging-Header.h",
"repo_id": "news_toolkit",
"token_count": 13
} | 875 |
import 'dart:async';
import 'package:bloc/bloc.dart';
import 'package:equatable/equatable.dart';
import 'package:in_app_purchase_repository/in_app_purchase_repository.dart';
import 'package:notifications_repository/notifications_repository.dart';
import 'package:user_repository/user_repository.dart';
part 'app_event.dart';
part 'app_state.dart';
class AppBloc extends Bloc<AppEvent, AppState> {
AppBloc({
required UserRepository userRepository,
required NotificationsRepository notificationsRepository,
required User user,
}) : _userRepository = userRepository,
_notificationsRepository = notificationsRepository,
super(
user == User.anonymous
? const AppState.unauthenticated()
: AppState.authenticated(user),
) {
on<AppUserChanged>(_onUserChanged);
on<AppOnboardingCompleted>(_onOnboardingCompleted);
on<AppLogoutRequested>(_onLogoutRequested);
on<AppOpened>(_onAppOpened);
_userSubscription = _userRepository.user.listen(_userChanged);
}
/// The number of app opens after which the login overlay is shown
/// for an unauthenticated user.
static const _appOpenedCountForLoginOverlay = 5;
final UserRepository _userRepository;
final NotificationsRepository _notificationsRepository;
late StreamSubscription<User> _userSubscription;
void _userChanged(User user) => add(AppUserChanged(user));
void _onUserChanged(AppUserChanged event, Emitter<AppState> emit) {
final user = event.user;
switch (state.status) {
case AppStatus.onboardingRequired:
case AppStatus.authenticated:
case AppStatus.unauthenticated:
return user != User.anonymous && user.isNewUser
? emit(AppState.onboardingRequired(user))
: user == User.anonymous
? emit(const AppState.unauthenticated())
: emit(AppState.authenticated(user));
}
}
void _onOnboardingCompleted(
AppOnboardingCompleted event,
Emitter<AppState> emit,
) {
if (state.status == AppStatus.onboardingRequired) {
return state.user == User.anonymous
? emit(const AppState.unauthenticated())
: emit(AppState.authenticated(state.user));
}
}
void _onLogoutRequested(AppLogoutRequested event, Emitter<AppState> emit) {
// We are disabling notifications when a user logs out because
// the user should not receive any notifications when logged out.
unawaited(_notificationsRepository.toggleNotifications(enable: false));
unawaited(_userRepository.logOut());
}
Future<void> _onAppOpened(AppOpened event, Emitter<AppState> emit) async {
if (state.user.isAnonymous) {
final appOpenedCount = await _userRepository.fetchAppOpenedCount();
if (appOpenedCount == _appOpenedCountForLoginOverlay - 1) {
emit(state.copyWith(showLoginOverlay: true));
}
if (appOpenedCount < _appOpenedCountForLoginOverlay + 1) {
await _userRepository.incrementAppOpenedCount();
}
}
}
@override
Future<void> close() {
_userSubscription.cancel();
return super.close();
}
}
| news_toolkit/flutter_news_example/lib/app/bloc/app_bloc.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/lib/app/bloc/app_bloc.dart",
"repo_id": "news_toolkit",
"token_count": 1139
} | 876 |
import 'package:flutter/material.dart' hide Image, Spacer;
import 'package:flutter_news_example/article/article.dart';
import 'package:flutter_news_example/l10n/l10n.dart';
import 'package:flutter_news_example/newsletter/newsletter.dart';
import 'package:flutter_news_example/slideshow/slideshow.dart';
import 'package:news_blocks/news_blocks.dart';
import 'package:news_blocks_ui/news_blocks_ui.dart';
class ArticleContentItem extends StatelessWidget {
const ArticleContentItem({
required this.block,
this.onSharePressed,
super.key,
});
/// The associated [NewsBlock] instance.
final NewsBlock block;
/// An optional callback which is invoked when the share button is pressed.
final VoidCallback? onSharePressed;
@override
Widget build(BuildContext context) {
final newsBlock = block;
if (newsBlock is DividerHorizontalBlock) {
return DividerHorizontal(block: newsBlock);
} else if (newsBlock is SpacerBlock) {
return Spacer(block: newsBlock);
} else if (newsBlock is ImageBlock) {
return Image(block: newsBlock);
} else if (newsBlock is VideoBlock) {
return Video(block: newsBlock);
} else if (newsBlock is TextCaptionBlock) {
final articleThemeColors =
Theme.of(context).extension<ArticleThemeColors>()!;
return TextCaption(
block: newsBlock,
colorValues: {
TextCaptionColor.normal: articleThemeColors.captionNormal,
TextCaptionColor.light: articleThemeColors.captionLight,
},
);
} else if (newsBlock is TextHeadlineBlock) {
return TextHeadline(block: newsBlock);
} else if (newsBlock is TextLeadParagraphBlock) {
return TextLeadParagraph(block: newsBlock);
} else if (newsBlock is TextParagraphBlock) {
return TextParagraph(block: newsBlock);
} else if (newsBlock is ArticleIntroductionBlock) {
return ArticleIntroduction(
block: newsBlock,
premiumText: context.l10n.newsBlockPremiumText,
);
} else if (newsBlock is VideoIntroductionBlock) {
return VideoIntroduction(block: newsBlock);
} else if (newsBlock is BannerAdBlock) {
return BannerAd(
block: newsBlock,
adFailedToLoadTitle: context.l10n.adLoadFailure,
);
} else if (newsBlock is NewsletterBlock) {
return const Newsletter();
} else if (newsBlock is HtmlBlock) {
return Html(block: newsBlock);
} else if (newsBlock is TrendingStoryBlock) {
return TrendingStory(
block: newsBlock,
title: context.l10n.trendingStoryTitle,
);
} else if (newsBlock is SlideshowIntroductionBlock) {
return SlideshowIntroduction(
block: newsBlock,
slideshowText: context.l10n.slideshow,
onPressed: (action) => _onContentItemAction(context, action),
);
} else {
// Render an empty widget for the unsupported block type.
return const SizedBox();
}
}
/// Handles actions triggered by tapping on article content items.
Future<void> _onContentItemAction(
BuildContext context,
BlockAction action,
) async {
if (action is NavigateToSlideshowAction) {
await Navigator.of(context).push<void>(
SlideshowPage.route(
slideshow: action.slideshow,
articleId: action.articleId,
),
);
}
}
}
| news_toolkit/flutter_news_example/lib/article/widgets/article_content_item.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/lib/article/widgets/article_content_item.dart",
"repo_id": "news_toolkit",
"token_count": 1232
} | 877 |
export 'bloc/feed_bloc.dart';
export 'view/view.dart';
export 'widgets/widgets.dart';
| news_toolkit/flutter_news_example/lib/feed/feed.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/lib/feed/feed.dart",
"repo_id": "news_toolkit",
"token_count": 36
} | 878 |
part of 'login_bloc.dart';
abstract class LoginEvent extends Equatable {
const LoginEvent();
}
class LoginEmailChanged extends LoginEvent {
const LoginEmailChanged(this.email);
final String email;
@override
List<Object> get props => [email];
}
class SendEmailLinkSubmitted extends LoginEvent with AnalyticsEventMixin {
@override
AnalyticsEvent get event => const AnalyticsEvent('SendEmailLinkSubmitted');
}
class LoginGoogleSubmitted extends LoginEvent with AnalyticsEventMixin {
@override
AnalyticsEvent get event => const AnalyticsEvent('LoginGoogleSubmitted');
}
class LoginAppleSubmitted extends LoginEvent with AnalyticsEventMixin {
@override
AnalyticsEvent get event => const AnalyticsEvent('LoginAppleSubmitted');
}
class LoginTwitterSubmitted extends LoginEvent with AnalyticsEventMixin {
@override
AnalyticsEvent get event => const AnalyticsEvent('LoginTwitterSubmitted');
}
class LoginFacebookSubmitted extends LoginEvent with AnalyticsEventMixin {
@override
AnalyticsEvent get event => const AnalyticsEvent('LoginFacebookSubmitted');
}
| news_toolkit/flutter_news_example/lib/login/bloc/login_event.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/lib/login/bloc/login_event.dart",
"repo_id": "news_toolkit",
"token_count": 274
} | 879 |
import 'dart:developer';
import 'package:analytics_repository/analytics_repository.dart';
import 'package:bloc/bloc.dart';
class AppBlocObserver extends BlocObserver {
AppBlocObserver({
required AnalyticsRepository analyticsRepository,
}) : _analyticsRepository = analyticsRepository;
final AnalyticsRepository _analyticsRepository;
@override
void onTransition(
Bloc<dynamic, dynamic> bloc,
Transition<dynamic, dynamic> transition,
) {
super.onTransition(bloc, transition);
log('onTransition ${bloc.runtimeType}: $transition');
}
@override
void onError(BlocBase<dynamic> bloc, Object error, StackTrace stackTrace) {
super.onError(bloc, error, stackTrace);
log('onError ${bloc.runtimeType}', error: error, stackTrace: stackTrace);
}
@override
void onChange(BlocBase<dynamic> bloc, Change<dynamic> change) {
super.onChange(bloc, change);
final dynamic state = change.nextState;
if (state is AnalyticsEventMixin) _analyticsRepository.track(state.event);
}
@override
void onEvent(Bloc<dynamic, dynamic> bloc, Object? event) {
super.onEvent(bloc, event);
if (event is AnalyticsEventMixin) _analyticsRepository.track(event.event);
}
}
| news_toolkit/flutter_news_example/lib/main/bootstrap/app_bloc_observer.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/lib/main/bootstrap/app_bloc_observer.dart",
"repo_id": "news_toolkit",
"token_count": 420
} | 880 |
part of 'newsletter_bloc.dart';
enum NewsletterStatus {
initial,
loading,
success,
failure,
}
class NewsletterState extends Equatable {
const NewsletterState({
this.status = NewsletterStatus.initial,
this.isValid = false,
this.email = const Email.pure(),
});
final NewsletterStatus status;
final bool isValid;
final Email email;
@override
List<Object> get props => [status, email, isValid];
NewsletterState copyWith({
NewsletterStatus? status,
Email? email,
bool? isValid,
}) =>
NewsletterState(
status: status ?? this.status,
email: email ?? this.email,
isValid: isValid ?? this.isValid,
);
}
| news_toolkit/flutter_news_example/lib/newsletter/bloc/newsletter_state.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/lib/newsletter/bloc/newsletter_state.dart",
"repo_id": "news_toolkit",
"token_count": 240
} | 881 |
import 'package:app_ui/app_ui.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_news_example/app/app.dart';
import 'package:flutter_news_example/l10n/l10n.dart';
import 'package:flutter_news_example/onboarding/onboarding.dart';
class OnboardingView extends StatefulWidget {
const OnboardingView({super.key});
@override
State<OnboardingView> createState() => _OnboardingViewState();
}
class _OnboardingViewState extends State<OnboardingView> {
final _controller = PageController();
static const _onboardingItemSwitchDuration = Duration(milliseconds: 500);
static const _onboardingPageTwo = 1;
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
return BlocListener<OnboardingBloc, OnboardingState>(
listener: (context, state) {
if ((state is EnablingAdTrackingSucceeded ||
state is EnablingAdTrackingFailed) &&
_controller.page != _onboardingPageTwo) {
_controller.animateToPage(
_onboardingPageTwo,
duration: _onboardingItemSwitchDuration,
curve: Curves.easeInOut,
);
} else if (state is EnablingNotificationsSucceeded) {
context.read<AppBloc>().add(const AppOnboardingCompleted());
}
},
child: CustomScrollView(
slivers: [
SliverToBoxAdapter(
child: Column(
key: const Key('onboarding_scrollableColumn'),
mainAxisSize: MainAxisSize.min,
children: [
const _OnboardingTitle(),
const _OnboardingSubtitle(),
SizedBox(
height: MediaQuery.of(context).size.height * .59,
child: PageView(
key: const Key('onboarding_pageView'),
controller: _controller,
physics: const NeverScrollableScrollPhysics(),
children: [
OnboardingViewItem(
key: const Key('onboarding_pageOne'),
pageNumberTitle: l10n.onboardingItemFirstNumberTitle,
title: l10n.onboardingItemFirstTitle,
subtitle: l10n.onboardingItemFirstSubtitleTitle,
primaryButton: AppButton.darkAqua(
key:
const Key('onboardingItem_primaryButton_pageOne'),
onPressed: () => context
.read<OnboardingBloc>()
.add(const EnableAdTrackingRequested()),
child: Text(l10n.onboardingItemFirstButtonTitle),
),
secondaryButton: AppButton.smallTransparent(
key: const Key(
'onboardingItem_secondaryButton_pageOne',
),
onPressed: () => _controller.animateToPage(
_onboardingPageTwo,
duration: _onboardingItemSwitchDuration,
curve: Curves.easeInOut,
),
child: Text(
context.l10n.onboardingItemSecondaryButtonTitle,
),
),
),
OnboardingViewItem(
key: const Key('onboarding_pageTwo'),
pageNumberTitle: l10n.onboardingItemSecondNumberTitle,
title: l10n.onboardingItemSecondTitle,
subtitle: l10n.onboardingItemSecondSubtitleTitle,
primaryButton: AppButton.darkAqua(
key:
const Key('onboardingItem_primaryButton_pageTwo'),
onPressed: () => context
.read<OnboardingBloc>()
.add(const EnableNotificationsRequested()),
child: Text(l10n.onboardingItemSecondButtonTitle),
),
secondaryButton: AppButton.smallTransparent(
key: const Key(
'onboardingItem_secondaryButton_pageTwo',
),
onPressed: () => context
.read<AppBloc>()
.add(const AppOnboardingCompleted()),
child: Text(
context.l10n.onboardingItemSecondaryButtonTitle,
),
),
),
],
),
),
],
),
),
],
),
);
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
}
class _OnboardingTitle extends StatelessWidget {
const _OnboardingTitle();
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Padding(
key: const Key('onboardingView_onboardingTitle'),
padding: const EdgeInsets.only(
top: AppSpacing.xxxlg + AppSpacing.sm,
bottom: AppSpacing.xxs,
),
child: Text(
context.l10n.onboardingWelcomeTitle,
style: theme.textTheme.displayLarge?.apply(
color: AppColors.white,
),
textAlign: TextAlign.center,
),
);
}
}
class _OnboardingSubtitle extends StatelessWidget {
const _OnboardingSubtitle();
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Padding(
key: const Key('onboardingView_onboardingSubtitle'),
padding: const EdgeInsets.only(
top: AppSpacing.xlg,
),
child: Text(
context.l10n.onboardingSubtitle,
style: theme.textTheme.titleMedium?.apply(
color: AppColors.white,
),
textAlign: TextAlign.center,
),
);
}
}
| news_toolkit/flutter_news_example/lib/onboarding/view/onboarding_view.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/lib/onboarding/view/onboarding_view.dart",
"repo_id": "news_toolkit",
"token_count": 3261
} | 882 |
import 'package:app_ui/app_ui.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_news_example/app/app.dart';
import 'package:flutter_news_example/article/article.dart';
import 'package:flutter_news_example/l10n/l10n.dart';
import 'package:news_blocks/news_blocks.dart';
import 'package:news_blocks_ui/news_blocks_ui.dart';
class SlideshowView extends StatelessWidget {
const SlideshowView({required this.block, super.key});
final SlideshowBlock block;
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
final isSubscriber =
context.select<AppBloc, bool>((bloc) => bloc.state.isUserSubscribed);
final uri = context.select((ArticleBloc bloc) => bloc.state.uri);
return Scaffold(
appBar: AppBar(
leading: const AppBackButton.light(),
actions: [
Row(
children: [
if (uri != null && uri.toString().isNotEmpty)
Padding(
key: const Key('slideshowPage_shareButton'),
padding: const EdgeInsets.only(right: AppSpacing.lg),
child: ShareButton(
shareText: context.l10n.shareText,
color: AppColors.white,
onPressed: () {
context.read<ArticleBloc>().add(ShareRequested(uri: uri));
},
),
),
if (!isSubscriber) const ArticleSubscribeButton()
],
)
],
),
backgroundColor: AppColors.darkBackground,
body: Slideshow(
block: block,
categoryTitle: l10n.slideshow.toUpperCase(),
navigationLabel: l10n.slideshow_of_title,
),
);
}
}
| news_toolkit/flutter_news_example/lib/slideshow/view/slideshow_view.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/lib/slideshow/view/slideshow_view.dart",
"repo_id": "news_toolkit",
"token_count": 844
} | 883 |
part of 'widgets/terms_of_service_body.dart';
const String termsOfServiceMockText =
'Curabitur vel volutpat eros, in interdum eros.Pellentesque lorem magna, '
'facilisis vel diam nec, sagittis fermentum purus. '
'Maecenas placerat urna ullamcorper ultrices elementum. '
'Quisque maximus lectus ac posuere posuere. Fusce eu molestie libero. '
'Nulla fringilla enim et elit facilisis blandit. '
'\n\nEtiam tincidunt porta vulputate. '
'Maecenas congue convallis odio sit amet pharetra. '
'\nPhasellus sagittis dapibus erat non sagittis. '
'Praesent imperdiet lectus urna, a sagittis sapien pulvinar vel. '
'Orci varius natoque penatibus et magnis dis parturient montes, '
'nascetur ridiculus mus. Proin eget neque turpis. '
'Quisque a lectus feugiat, sollicitudin massa ac, ultricies tellus. '
'Proin rutrum neque nec vehicula ultrices. Suspendisse venenatis odio mi. '
'Sed dictum congue nisi id finibus. '
'\n\nMorbi malesuada lorem est '
'Phasellus eget mi risus. Nulla facilisi . '
'Aliquam fermentum malesuada metus, nec pretium odio efficitur in. '
'In condimentum semper ipsum quis cursus. '
'Aenean in ex at leo porta ultrices. '
'Curabitur vel volutpat eros, in interdum eros. '
'\n\nPellentesque lorem magna, facilisis vel diam nec, '
'sagittis fermentum purus. '
'Maecenas placerat urna ullamcorper ultrices elementum. '
'Quisque maximus lectus ac posuere posuere. '
'Fusce eu molestie libero. Nulla fringilla enim et elit facilisis blandit. '
'Etiam tincidunt porta vulputate. '
'Maecenas congue convallis odio sit amet pharetra. '
'Phasellus sagittis dapibus erat non sagittis. '
'Praesent imperdiet lectus urna, a sagittis sapien pulvinar vel. '
'Orci varius natoque penatibus et magnis dis parturient montes, '
'nascetur ridiculus mus. Proin eget neque turpis. '
'Quisque a lectus feugiat, sollicitudin massa ac, ultricies tellus. '
'Proin rutrum neque nec vehicula ultrices. '
'Suspendisse venenatis odio mi. Sed dictum congue nisi id finibus. '
'Morbi malesuada lorem est, id efficitur mauris ultrices sit amet. '
'Phasellus eget mi risus. Nulla facilisi. '
'Aliquam fermentum malesuada metus, nec pretium odio efficitur in. '
'In condimentum semper ipsum quis cursus. '
'Aenean in ex at leo porta ultrices. ';
| news_toolkit/flutter_news_example/lib/terms_of_service/terms_of_service_mock_text.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/lib/terms_of_service/terms_of_service_mock_text.dart",
"repo_id": "news_toolkit",
"token_count": 985
} | 884 |
import 'package:app_ui/app_ui.dart' show AppSpacing, Assets, showAppModal;
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_news_example/app/app.dart';
import 'package:flutter_news_example/l10n/l10n.dart';
import 'package:flutter_news_example/login/login.dart';
import 'package:flutter_news_example/user_profile/user_profile.dart';
/// A user profile button which displays a [LoginButton]
/// for the unauthenticated user or an [OpenProfileButton]
/// for the authenticated user.
class UserProfileButton extends StatelessWidget {
const UserProfileButton({super.key});
@override
Widget build(BuildContext context) {
final isAnonymous = context.select<AppBloc, bool>(
(bloc) => bloc.state.user.isAnonymous,
);
return isAnonymous ? const LoginButton() : const OpenProfileButton();
}
}
@visibleForTesting
class LoginButton extends StatelessWidget {
const LoginButton({super.key});
@override
Widget build(BuildContext context) {
return IconButton(
icon: Assets.icons.logInIcon.svg(),
iconSize: 24,
padding: const EdgeInsets.symmetric(
horizontal: AppSpacing.lg,
vertical: AppSpacing.sm,
),
onPressed: () => showAppModal<void>(
context: context,
builder: (context) => const LoginModal(),
routeSettings: const RouteSettings(name: LoginModal.name),
),
tooltip: context.l10n.loginTooltip,
);
}
}
@visibleForTesting
class OpenProfileButton extends StatelessWidget {
const OpenProfileButton({super.key});
@override
Widget build(BuildContext context) {
return IconButton(
icon: Assets.icons.profileIcon.svg(),
iconSize: 24,
padding: const EdgeInsets.symmetric(
horizontal: AppSpacing.lg,
vertical: AppSpacing.sm,
),
onPressed: () => Navigator.of(context).push(UserProfilePage.route()),
tooltip: context.l10n.openProfileTooltip,
);
}
}
| news_toolkit/flutter_news_example/lib/user_profile/widgets/user_profile_button.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/lib/user_profile/widgets/user_profile_button.dart",
"repo_id": "news_toolkit",
"token_count": 722
} | 885 |
name: analytics_repository
description: Package which manages the analytics domain.
publish_to: none
environment:
sdk: ">=3.0.0 <4.0.0"
dependencies:
equatable: ^2.0.0
firebase_analytics: ^10.0.3
flutter:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
mocktail: ^1.0.2
very_good_analysis: ^5.1.0
| news_toolkit/flutter_news_example/packages/analytics_repository/pubspec.yaml/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/analytics_repository/pubspec.yaml",
"repo_id": "news_toolkit",
"token_count": 141
} | 886 |
export 'app_back_button_page.dart';
export 'app_button_page.dart';
export 'app_logo_page.dart';
export 'app_switch_page.dart';
export 'app_text_field_page.dart';
export 'show_app_modal_page.dart';
export 'widgets_page.dart';
| news_toolkit/flutter_news_example/packages/app_ui/gallery/lib/widgets/widgets.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/app_ui/gallery/lib/widgets/widgets.dart",
"repo_id": "news_toolkit",
"token_count": 91
} | 887 |
/// GENERATED CODE - DO NOT MODIFY BY HAND
/// *****************************************************
/// FlutterGen
/// *****************************************************
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use
class FontFamily {
FontFamily._();
/// Font family: Montserrat
static const String montserrat = 'Montserrat';
/// Font family: NotoSansDisplay
static const String notoSansDisplay = 'NotoSansDisplay';
/// Font family: NotoSerif
static const String notoSerif = 'NotoSerif';
}
| news_toolkit/flutter_news_example/packages/app_ui/lib/src/generated/fonts.gen.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/app_ui/lib/src/generated/fonts.gen.dart",
"repo_id": "news_toolkit",
"token_count": 175
} | 888 |
name: app_ui
description: App UI Component Library
publish_to: none
environment:
sdk: ">=3.0.0 <4.0.0"
dependencies:
flutter:
sdk: flutter
flutter_svg: ^2.0.5
intl: ^0.19.0
mockingjay: ^0.4.0
dev_dependencies:
build_runner: ^2.0.3
flutter_gen_runner: ^5.2.0
flutter_test:
sdk: flutter
very_good_analysis: ^5.1.0
flutter:
uses-material-design: true
assets:
- assets/icons/
- assets/images/
fonts:
- family: NotoSerif
fonts:
- asset: assets/fonts/NotoSerif-Bold.ttf
weight: 700
- asset: assets/fonts/NotoSerif-SemiBold.ttf
weight: 600
- asset: assets/fonts/NotoSerif-Medium.ttf
weight: 500
- asset: assets/fonts/NotoSerif-Regular.ttf
weight: 400
- family: NotoSansDisplay
fonts:
- asset: assets/fonts/NotoSansDisplay-Regular.ttf
weight: 400
- asset: assets/fonts/NotoSansDisplay-SemiBold.ttf
weight: 600
- family: Montserrat
fonts:
- asset: assets/fonts/Montserrat-Medium.ttf
weight: 500
flutter_gen:
assets:
enabled: true
outputs:
package_parameter_enabled: true
output: lib/src/generated/
line_length: 80
integrations:
flutter_svg: true
| news_toolkit/flutter_news_example/packages/app_ui/pubspec.yaml/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/app_ui/pubspec.yaml",
"repo_id": "news_toolkit",
"token_count": 604
} | 889 |
include: package:very_good_analysis/analysis_options.5.1.0.yaml
| news_toolkit/flutter_news_example/packages/article_repository/analysis_options.yaml/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/article_repository/analysis_options.yaml",
"repo_id": "news_toolkit",
"token_count": 23
} | 890 |
// ignore_for_file: prefer_const_constructors
import 'package:authentication_client/authentication_client.dart';
import 'package:test/test.dart';
void main() {
group('AuthenticationUser', () {
test('supports value equality', () {
final userA = AuthenticationUser(id: 'A');
final secondUserA = AuthenticationUser(id: 'A');
final userB = AuthenticationUser(id: 'B');
expect(userA, equals(secondUserA));
expect(userA, isNot(equals(userB)));
});
test('isAnonymous returns true for anonymous user', () {
expect(AuthenticationUser.anonymous.isAnonymous, isTrue);
});
});
}
| news_toolkit/flutter_news_example/packages/authentication_client/authentication_client/test/src/models/authentication_user_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/authentication_client/authentication_client/test/src/models/authentication_user_test.dart",
"repo_id": "news_toolkit",
"token_count": 219
} | 891 |
export 'src/deep_link_client.dart';
| news_toolkit/flutter_news_example/packages/deep_link_client/lib/deep_link_client.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/deep_link_client/lib/deep_link_client.dart",
"repo_id": "news_toolkit",
"token_count": 14
} | 892 |
export 'package:formz/formz.dart';
export 'src/email.dart';
| news_toolkit/flutter_news_example/packages/form_inputs/lib/form_inputs.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/form_inputs/lib/form_inputs.dart",
"repo_id": "news_toolkit",
"token_count": 25
} | 893 |
import 'package:app_ui/app_ui.dart';
import 'package:flutter/material.dart';
import 'package:news_blocks/news_blocks.dart';
import 'package:news_blocks_ui/news_blocks_ui.dart';
import 'package:news_blocks_ui/src/sliver_grid_custom_delegate.dart';
/// {@template post_grid}
/// A reusable post grid view.
/// {@endtemplate}
class PostGrid extends StatelessWidget {
/// {@macro post_grid}
const PostGrid({
required this.gridGroupBlock,
required this.premiumText,
this.isLocked = false,
this.onPressed,
super.key,
});
/// The associated [PostGridGroupBlock] instance.
final PostGridGroupBlock gridGroupBlock;
/// Text displayed when post is premium content.
final String premiumText;
/// Whether this post is a locked post.
final bool isLocked;
/// An optional callback which is invoked when the action is triggered.
/// A [Uri] from the associated [BlockAction] is provided to the callback.
final BlockActionCallback? onPressed;
@override
Widget build(BuildContext context) {
if (gridGroupBlock.tiles.isEmpty) {
return const SliverToBoxAdapter(child: SizedBox());
}
final deviceWidth = MediaQuery.of(context).size.width;
return SliverPadding(
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.lg),
sliver: SliverGrid(
gridDelegate: CustomMaxCrossAxisDelegate(
maxCrossAxisExtent: deviceWidth / 2 - (AppSpacing.md / 2),
mainAxisSpacing: AppSpacing.md,
crossAxisSpacing: AppSpacing.md,
childAspectRatio: 3 / 2,
),
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) {
final block = gridGroupBlock.tiles[index];
if (index == 0) {
return PostLarge(
block: block.toPostLargeBlock(),
premiumText: premiumText,
isLocked: isLocked,
onPressed: onPressed,
);
}
return PostMedium(
block: block.toPostMediumBlock(),
onPressed: onPressed,
);
},
childCount: gridGroupBlock.tiles.length,
),
),
);
}
}
| news_toolkit/flutter_news_example/packages/news_blocks_ui/lib/src/post_grid.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/news_blocks_ui/lib/src/post_grid.dart",
"repo_id": "news_toolkit",
"token_count": 909
} | 894 |
import 'package:app_ui/app_ui.dart';
import 'package:flutter/material.dart';
import 'package:news_blocks/news_blocks.dart';
/// {@template text_lead_paragraph}
/// A reusable text lead paragraph news block widget.
/// {@endtemplate}
class TextLeadParagraph extends StatelessWidget {
/// {@macro text_lead_paragraph}
const TextLeadParagraph({required this.block, super.key});
/// The associated [TextLeadParagraphBlock] instance.
final TextLeadParagraphBlock block;
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.lg),
child: Text(
block.text,
style: Theme.of(context).textTheme.titleLarge,
),
);
}
}
| news_toolkit/flutter_news_example/packages/news_blocks_ui/lib/src/text_lead_paragraph.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/news_blocks_ui/lib/src/text_lead_paragraph.dart",
"repo_id": "news_toolkit",
"token_count": 252
} | 895 |
import 'package:app_ui/app_ui.dart';
import 'package:flutter/material.dart';
/// {@template progress_indicator}
/// A reusable progress indicator of news blocks.
/// {@endtemplate}
class ProgressIndicator extends StatelessWidget {
/// {@macro progress_indicator}
const ProgressIndicator({
super.key,
this.progress,
this.color = AppColors.gainsboro,
});
/// The current progress of this indicator (between 0 and 1).
final double? progress;
/// The color of this indicator.
///
/// Defaults to [AppColors.gainsboro].
final Color color;
@override
Widget build(BuildContext context) {
return ColoredBox(
color: color,
child: Center(
child: CircularProgressIndicator(value: progress),
),
);
}
}
| news_toolkit/flutter_news_example/packages/news_blocks_ui/lib/src/widgets/progress_indicator.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/news_blocks_ui/lib/src/widgets/progress_indicator.dart",
"repo_id": "news_toolkit",
"token_count": 258
} | 896 |
// ignore_for_file: prefer_const_constructors
import 'package:app_ui/app_ui.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart' as flutter_html;
import 'package:flutter_test/flutter_test.dart';
import 'package:mocktail/mocktail.dart';
import 'package:news_blocks/news_blocks.dart';
import 'package:news_blocks_ui/news_blocks_ui.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart';
import '../helpers/helpers.dart';
class _MockUrlLauncher extends Mock
with MockPlatformInterfaceMixin
implements UrlLauncherPlatform {}
class _FakeLaunchOptions extends Fake implements LaunchOptions {}
void main() {
group('Html', () {
late UrlLauncherPlatform urlLauncher;
setUpAll(() {
registerFallbackValue(_FakeLaunchOptions());
});
setUp(() {
urlLauncher = _MockUrlLauncher();
UrlLauncherPlatform.instance = urlLauncher;
});
testWidgets('renders HTML text correctly', (tester) async {
const block = HtmlBlock(content: '<p>Hello</p>');
await tester.pumpApp(Html(block: block));
expect(
find.byWidgetPredicate(
(widget) =>
widget is flutter_html.Html && widget.data == block.content,
),
findsOneWidget,
);
});
group('hyperlinks', () {
testWidgets('does not launch the url when it is empty', (tester) async {
const block = HtmlBlock(
content: '<a href="#">flutter.dev</a>',
);
await tester.pumpApp(Html(block: block));
await tester.tap(
find.textContaining('flutter.dev', findRichText: true),
);
verifyNever(() => urlLauncher.launchUrl(any(), any()));
});
testWidgets('does not launch the url when it is invalid', (tester) async {
const block = HtmlBlock(
content: '<a href="::Not valid URI::">flutter.dev</a>',
);
await tester.pumpApp(Html(block: block));
await tester.tap(
find.textContaining('flutter.dev', findRichText: true),
);
verifyNever(() => urlLauncher.launchUrl(any(), any()));
});
testWidgets('launches the url when it is a valid url', (tester) async {
const block = HtmlBlock(
content: '<a href="https://flutter.dev">flutter.dev</a>',
);
await tester.pumpApp(Html(block: block));
await tester.tap(
find.textContaining('flutter.dev', findRichText: true),
);
verify(
() => urlLauncher.launchUrl('https://flutter.dev', any()),
).called(1);
});
});
group('styles', () {
testWidgets('<p> tags correctly', (tester) async {
const block = HtmlBlock(content: '<p>Test</p>');
final theme = AppTheme().themeData;
await tester.pumpApp(
MaterialApp(
theme: theme,
home: Html(block: block),
),
);
expect(
find.byWidgetPredicate(
(widget) =>
widget is flutter_html.Html &&
widget.style['p']!.generateTextStyle() ==
flutter_html.Style.fromTextStyle(theme.textTheme.bodyLarge!)
.generateTextStyle(),
),
findsOneWidget,
);
});
testWidgets('<h1> tags correctly', (tester) async {
const block = HtmlBlock(content: '<h1>Test</h1>');
final theme = AppTheme().themeData;
await tester.pumpApp(
MaterialApp(
theme: theme,
home: Html(block: block),
),
);
expect(
find.byWidgetPredicate(
(widget) =>
widget is flutter_html.Html &&
widget.style['h1']!.generateTextStyle() ==
flutter_html.Style.fromTextStyle(
theme.textTheme.displayLarge!,
).generateTextStyle(),
),
findsOneWidget,
);
});
testWidgets('<h2> tags correctly', (tester) async {
const block = HtmlBlock(content: '<h2>Test</h2>');
final theme = AppTheme().themeData;
await tester.pumpApp(
MaterialApp(
theme: theme,
home: Html(block: block),
),
);
expect(
find.byWidgetPredicate(
(widget) =>
widget is flutter_html.Html &&
widget.style['h2']!.generateTextStyle() ==
flutter_html.Style.fromTextStyle(
theme.textTheme.displayMedium!,
).generateTextStyle(),
),
findsOneWidget,
);
});
testWidgets('<h3> tags correctly', (tester) async {
const block = HtmlBlock(content: '<h3>Test</h3>');
final theme = AppTheme().themeData;
await tester.pumpApp(
MaterialApp(
theme: theme,
home: Html(block: block),
),
);
expect(
find.byWidgetPredicate(
(widget) =>
widget is flutter_html.Html &&
widget.style['h3']!.generateTextStyle() ==
flutter_html.Style.fromTextStyle(
theme.textTheme.displaySmall!,
).generateTextStyle(),
),
findsOneWidget,
);
});
testWidgets('<h4> tags correctly', (tester) async {
const block = HtmlBlock(content: '<h4>Test</h4>');
final theme = AppTheme().themeData;
await tester.pumpApp(
MaterialApp(
theme: theme,
home: Html(block: block),
),
);
expect(
find.byWidgetPredicate(
(widget) =>
widget is flutter_html.Html &&
widget.style['h4']!.generateTextStyle() ==
flutter_html.Style.fromTextStyle(
theme.textTheme.headlineMedium!,
).generateTextStyle(),
),
findsOneWidget,
);
});
testWidgets('<h5> tags correctly', (tester) async {
const block = HtmlBlock(content: '<h5>Test</h5>');
final theme = AppTheme().themeData;
await tester.pumpApp(
MaterialApp(
theme: theme,
home: Html(block: block),
),
);
expect(
find.byWidgetPredicate(
(widget) =>
widget is flutter_html.Html &&
widget.style['h5']!.generateTextStyle() ==
flutter_html.Style.fromTextStyle(
theme.textTheme.headlineSmall!,
).generateTextStyle(),
),
findsOneWidget,
);
});
testWidgets('<h6> tags correctly', (tester) async {
const block = HtmlBlock(content: '<h6>Test</h6>');
final theme = AppTheme().themeData;
await tester.pumpApp(
MaterialApp(
theme: theme,
home: Html(block: block),
),
);
expect(
find.byWidgetPredicate(
(widget) =>
widget is flutter_html.Html &&
widget.style['h6']!.generateTextStyle() ==
flutter_html.Style.fromTextStyle(
theme.textTheme.titleLarge!,
).generateTextStyle(),
),
findsOneWidget,
);
});
});
});
}
| news_toolkit/flutter_news_example/packages/news_blocks_ui/test/src/html_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/news_blocks_ui/test/src/html_test.dart",
"repo_id": "news_toolkit",
"token_count": 3795
} | 897 |
// ignore_for_file: prefer_const_constructors
import 'package:flutter_test/flutter_test.dart';
import 'package:news_blocks/news_blocks.dart';
import 'package:news_blocks_ui/news_blocks_ui.dart';
import 'package:news_blocks_ui/src/widgets/widgets.dart';
import 'package:video_player_platform_interface/video_player_platform_interface.dart';
import '../helpers/helpers.dart';
void main() {
group('Video', () {
setUp(
() {
final fakeVideoPlayerPlatform = FakeVideoPlayerPlatform();
VideoPlayerPlatform.instance = fakeVideoPlayerPlatform;
},
);
testWidgets('renders InlineVideo with correct video', (tester) async {
const block = VideoBlock(videoUrl: 'videoUrl');
await tester.pumpApp(
Video(block: block),
);
expect(
find.byWidgetPredicate(
(widget) =>
widget is InlineVideo && widget.videoUrl == block.videoUrl,
),
findsOneWidget,
);
});
testWidgets('renders ProgressIndicator when loading', (tester) async {
const block = VideoBlock(videoUrl: 'videoUrl');
await tester.pumpWidget(
Video(block: block),
);
expect(
find.byType(ProgressIndicator, skipOffstage: false),
findsOneWidget,
);
});
});
}
| news_toolkit/flutter_news_example/packages/news_blocks_ui/test/src/video_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/news_blocks_ui/test/src/video_test.dart",
"repo_id": "news_toolkit",
"token_count": 523
} | 898 |
name: firebase_notifications_client
description: A Firebase Cloud Messaging notifications client.
version: 1.0.0+1
publish_to: none
environment:
sdk: ">=3.0.0 <4.0.0"
dependencies:
firebase_messaging: ^14.0.3
flutter:
sdk: flutter
notifications_client:
path: ../notifications_client
dev_dependencies:
flutter_test:
sdk: flutter
mocktail: ^1.0.2
very_good_analysis: ^5.1.0
| news_toolkit/flutter_news_example/packages/notifications_client/firebase_notifications_client/pubspec.yaml/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/notifications_client/firebase_notifications_client/pubspec.yaml",
"repo_id": "news_toolkit",
"token_count": 162
} | 899 |
# share_launcher
[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link]
[![License: MIT][license_badge]][license_link]
A package to open an external share overlay.
[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg
[license_link]: https://opensource.org/licenses/MIT
[very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg
[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis
| news_toolkit/flutter_news_example/packages/share_launcher/README.md/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/share_launcher/README.md",
"repo_id": "news_toolkit",
"token_count": 170
} | 900 |
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:storage/storage.dart';
/// {@template secure_storage}
/// A Secure Storage client which implements the base [Storage] interface.
/// [SecureStorage] uses `FlutterSecureStorage` internally.
///
/// ```dart
/// // Create a `SecureStorage` instance.
/// final storage = const SecureStorage();
///
/// // Write a key/value pair.
/// await storage.write(key: 'my_key', value: 'my_value');
///
/// // Read value for key.
/// final value = await storage.read(key: 'my_key'); // 'my_value'
/// ```
/// {@endtemplate}
class SecureStorage implements Storage {
/// {@macro secure_storage}
const SecureStorage([FlutterSecureStorage? secureStorage])
: _secureStorage = secureStorage ?? const FlutterSecureStorage();
final FlutterSecureStorage _secureStorage;
@override
Future<String?> read({required String key}) async {
try {
return await _secureStorage.read(key: key);
} on Exception catch (error, stackTrace) {
Error.throwWithStackTrace(StorageException(error), stackTrace);
}
}
@override
Future<void> write({required String key, required String value}) async {
try {
await _secureStorage.write(key: key, value: value);
} on Exception catch (error, stackTrace) {
Error.throwWithStackTrace(StorageException(error), stackTrace);
}
}
@override
Future<void> delete({required String key}) async {
try {
await _secureStorage.delete(key: key);
} on Exception catch (error, stackTrace) {
Error.throwWithStackTrace(StorageException(error), stackTrace);
}
}
@override
Future<void> clear() async {
try {
await _secureStorage.deleteAll();
} on Exception catch (error, stackTrace) {
Error.throwWithStackTrace(StorageException(error), stackTrace);
}
}
}
| news_toolkit/flutter_news_example/packages/storage/secure_storage/lib/src/secure_storage.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/storage/secure_storage/lib/src/secure_storage.dart",
"repo_id": "news_toolkit",
"token_count": 603
} | 901 |
name: user_repository
description: Dart package which manages the user domain.
publish_to: none
environment:
sdk: ">=3.0.0 <4.0.0"
dependencies:
authentication_client:
path: ../authentication_client/authentication_client
deep_link_client:
path: ../deep_link_client
equatable: ^2.0.3
flutter_news_example_api:
path: ../../api
package_info_client:
path: ../package_info_client
rxdart: ^0.27.5
storage:
path: ../storage/storage
dev_dependencies:
mocktail: ^1.0.2
test: ^1.21.4
very_good_analysis: ^5.1.0
| news_toolkit/flutter_news_example/packages/user_repository/pubspec.yaml/0 | {
"file_path": "news_toolkit/flutter_news_example/packages/user_repository/pubspec.yaml",
"repo_id": "news_toolkit",
"token_count": 221
} | 902 |
import 'package:flutter/material.dart';
import 'package:flutter_news_example/app/app.dart';
import 'package:flutter_news_example/home/home.dart';
import 'package:flutter_news_example/onboarding/onboarding.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
group('onGenerateAppViewPages', () {
test('returns [OnboardingPage] when onboardingRequired', () {
expect(
onGenerateAppViewPages(AppStatus.onboardingRequired, []),
[
isA<MaterialPage<void>>().having(
(p) => p.child,
'child',
isA<OnboardingPage>(),
)
],
);
});
test('returns [HomePage] when authenticated', () {
expect(
onGenerateAppViewPages(AppStatus.authenticated, []),
[
isA<MaterialPage<void>>().having(
(p) => p.child,
'child',
isA<HomePage>(),
)
],
);
});
test('returns [HomePage] when unauthenticated', () {
expect(
onGenerateAppViewPages(AppStatus.unauthenticated, []),
[
isA<MaterialPage<void>>().having(
(p) => p.child,
'child',
isA<HomePage>(),
)
],
);
});
});
}
| news_toolkit/flutter_news_example/test/app/routes/routes_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/test/app/routes/routes_test.dart",
"repo_id": "news_toolkit",
"token_count": 614
} | 903 |
// ignore_for_file: prefer_const_constructors
import 'package:flutter_news_example/categories/categories.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:news_repository/news_repository.dart';
void main() {
group('CategoriesState', () {
test('initial has correct status', () {
expect(
CategoriesState.initial().status,
equals(CategoriesStatus.initial),
);
});
test('supports value comparisons', () {
expect(
CategoriesState.initial(),
equals(CategoriesState.initial()),
);
});
group('copyWith', () {
test(
'returns same object '
'when no properties are passed', () {
expect(
CategoriesState.initial().copyWith(),
equals(CategoriesState.initial()),
);
});
test(
'returns object with updated status '
'when status is passed', () {
expect(
CategoriesState.initial().copyWith(
status: CategoriesStatus.loading,
),
equals(
CategoriesState(
status: CategoriesStatus.loading,
),
),
);
});
test(
'returns object with updated categories '
'when categories is passed', () {
final categories = [Category.top, Category.health];
expect(
CategoriesState(status: CategoriesStatus.populated)
.copyWith(categories: categories),
equals(
CategoriesState(
status: CategoriesStatus.populated,
categories: categories,
),
),
);
});
test(
'returns object with updated selectedCategory '
'when selectedCategory is passed', () {
const selectedCategory = Category.top;
expect(
CategoriesState(status: CategoriesStatus.populated)
.copyWith(selectedCategory: selectedCategory),
equals(
CategoriesState(
status: CategoriesStatus.populated,
selectedCategory: selectedCategory,
),
),
);
});
});
});
}
| news_toolkit/flutter_news_example/test/categories/bloc/categories_state_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/test/categories/bloc/categories_state_test.dart",
"repo_id": "news_toolkit",
"token_count": 985
} | 904 |
// ignore_for_file: prefer_const_constructors, avoid_redundant_argument_values
// ignore_for_file: prefer_const_literals_to_create_immutables
import 'dart:async';
import 'package:app_ui/app_ui.dart';
import 'package:bloc_test/bloc_test.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_news_example/app/app.dart';
import 'package:flutter_news_example/categories/categories.dart';
import 'package:flutter_news_example/feed/feed.dart';
import 'package:flutter_news_example/home/home.dart';
import 'package:flutter_news_example/login/login.dart';
import 'package:flutter_news_example/navigation/navigation.dart';
import 'package:flutter_news_example/search/search.dart';
import 'package:flutter_news_example/user_profile/user_profile.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mocktail/mocktail.dart';
import 'package:news_blocks/news_blocks.dart';
import 'package:news_repository/news_repository.dart';
import '../../helpers/helpers.dart';
class MockHomeCubit extends MockCubit<HomeState> implements HomeCubit {}
class MockCategoriesBloc extends MockBloc<CategoriesEvent, CategoriesState>
implements CategoriesBloc {}
class MockFeedBloc extends MockBloc<FeedEvent, FeedState> implements FeedBloc {}
class MockNewsRepository extends Mock implements NewsRepository {}
class MockAppBloc extends Mock implements AppBloc {}
void main() {
initMockHydratedStorage();
late NewsRepository newsRepository;
late HomeCubit cubit;
late CategoriesBloc categoriesBloc;
late FeedBloc feedBloc;
late AppBloc appBloc;
const categories = [Category.top, Category.technology];
final feed = <Category, List<NewsBlock>>{
Category.top: [
SectionHeaderBlock(title: 'Top'),
DividerHorizontalBlock(),
SpacerBlock(spacing: Spacing.medium),
],
Category.technology: [
SectionHeaderBlock(title: 'Technology'),
DividerHorizontalBlock(),
SpacerBlock(spacing: Spacing.medium),
],
};
setUp(() {
newsRepository = MockNewsRepository();
categoriesBloc = MockCategoriesBloc();
feedBloc = MockFeedBloc();
cubit = MockHomeCubit();
appBloc = MockAppBloc();
when(() => appBloc.state).thenReturn(
AppState(
showLoginOverlay: false,
status: AppStatus.unauthenticated,
),
);
when(() => categoriesBloc.state).thenReturn(
CategoriesState(
categories: categories,
status: CategoriesStatus.populated,
),
);
when(() => feedBloc.state).thenReturn(
FeedState(
feed: feed,
status: FeedStatus.populated,
),
);
when(newsRepository.getCategories).thenAnswer(
(_) async => CategoriesResponse(
categories: [Category.top],
),
);
when(() => cubit.state).thenReturn(HomeState.topStories);
});
group('HomeView', () {
testWidgets('renders AppBar with AppLogo', (tester) async {
when(() => cubit.state).thenReturn(HomeState.topStories);
await pumpHomeView(
tester: tester,
cubit: cubit,
categoriesBloc: categoriesBloc,
feedBloc: feedBloc,
newsRepository: newsRepository,
);
expect(
find.byWidgetPredicate(
(widget) => widget is AppBar && widget.title is AppLogo,
),
findsOneWidget,
);
});
testWidgets('renders UserProfileButton', (tester) async {
when(() => cubit.state).thenReturn(HomeState.topStories);
await pumpHomeView(
tester: tester,
cubit: cubit,
categoriesBloc: categoriesBloc,
feedBloc: feedBloc,
newsRepository: newsRepository,
);
expect(find.byType(UserProfileButton), findsOneWidget);
});
testWidgets(
'renders NavDrawer '
'when menu icon is tapped', (tester) async {
when(() => cubit.state).thenReturn(HomeState.topStories);
await pumpHomeView(
tester: tester,
cubit: cubit,
categoriesBloc: categoriesBloc,
feedBloc: feedBloc,
newsRepository: newsRepository,
);
expect(find.byType(NavDrawer), findsNothing);
await tester.tap(find.byIcon(Icons.menu));
await tester.pump();
expect(find.byType(NavDrawer), findsOneWidget);
});
testWidgets('renders FeedView', (tester) async {
await pumpHomeView(
tester: tester,
cubit: cubit,
categoriesBloc: categoriesBloc,
feedBloc: feedBloc,
newsRepository: newsRepository,
);
expect(find.byType(FeedView), findsOneWidget);
});
testWidgets('shows LoginOverlay when showLoginOverlay is true',
(tester) async {
whenListen(
appBloc,
Stream.fromIterable([
AppState(status: AppStatus.unauthenticated, showLoginOverlay: false),
AppState(status: AppStatus.unauthenticated, showLoginOverlay: true),
]),
);
await pumpHomeView(
tester: tester,
cubit: cubit,
categoriesBloc: categoriesBloc,
feedBloc: feedBloc,
newsRepository: newsRepository,
appBloc: appBloc,
);
expect(find.byType(LoginModal), findsOneWidget);
});
});
group('BottomNavigationBar', () {
testWidgets(
'has selected index to 0 by default.',
(tester) async {
when(() => cubit.state).thenReturn(HomeState.topStories);
await pumpHomeView(
tester: tester,
cubit: cubit,
categoriesBloc: categoriesBloc,
feedBloc: feedBloc,
newsRepository: newsRepository,
);
expect(find.byType(FeedView), findsOneWidget);
},
);
testWidgets(
'set tab to selected index 0 when top stories is tapped.',
(tester) async {
await pumpHomeView(
tester: tester,
cubit: cubit,
categoriesBloc: categoriesBloc,
feedBloc: feedBloc,
newsRepository: newsRepository,
);
await tester.ensureVisible(find.byType(BottomNavBar));
await tester.tap(find.byIcon(Icons.home_outlined));
verify(() => cubit.setTab(0)).called(1);
},
);
testWidgets(
'set tab to selected index 1 when search is tapped.',
(tester) async {
await pumpHomeView(
tester: tester,
cubit: cubit,
categoriesBloc: categoriesBloc,
feedBloc: feedBloc,
newsRepository: newsRepository,
);
await tester.ensureVisible(find.byType(BottomNavBar));
await tester.tap(find.byKey(Key('bottomNavBar_search')));
verify(() => cubit.setTab(1)).called(1);
},
);
testWidgets(
'unfocuses keyboard when tab is changed.',
(tester) async {
final controller = StreamController<HomeState>();
whenListen(
cubit,
controller.stream,
initialState: HomeState.topStories,
);
await pumpHomeView(
tester: tester,
cubit: cubit,
categoriesBloc: categoriesBloc,
feedBloc: feedBloc,
newsRepository: newsRepository,
);
await tester.ensureVisible(find.byType(BottomNavBar));
await tester.tap(find.byKey(Key('bottomNavBar_search')));
verify(() => cubit.setTab(1)).called(1);
controller.add(HomeState.search);
await tester.pump(kThemeAnimationDuration);
await tester.showKeyboard(find.byType(SearchTextField));
final initialFocus = tester.binding.focusManager.primaryFocus;
controller.add(HomeState.topStories);
await tester.pump();
expect(
tester.binding.focusManager.primaryFocus,
isNot(equals(initialFocus)),
);
},
);
});
}
Future<void> pumpHomeView({
required WidgetTester tester,
required HomeCubit cubit,
required CategoriesBloc categoriesBloc,
required FeedBloc feedBloc,
required NewsRepository newsRepository,
AppBloc? appBloc,
}) async {
await tester.pumpApp(
MultiBlocProvider(
providers: [
BlocProvider.value(
value: categoriesBloc,
),
BlocProvider.value(
value: feedBloc,
),
BlocProvider.value(
value: cubit,
),
],
child: HomeView(),
),
newsRepository: newsRepository,
appBloc: appBloc,
);
}
| news_toolkit/flutter_news_example/test/home/view/home_view_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/test/home/view/home_view_test.dart",
"repo_id": "news_toolkit",
"token_count": 3577
} | 905 |
// ignore_for_file: prefer_const_constructors
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_news_example/navigation/navigation.dart';
import 'package:flutter_test/flutter_test.dart';
import '../../helpers/helpers.dart';
void main() {
group('BottomNavBar', () {
testWidgets(
'renders with currentIndex to 0 by default.',
(tester) async {
await tester.pumpApp(
BottomNavBar(
currentIndex: 0,
onTap: (selectedIndex) {},
),
);
expect(find.byType(BottomNavBar), findsOneWidget);
},
);
});
testWidgets('calls onTap when navigation bar item is tapped', (tester) async {
final completer = Completer<void>();
await tester.pumpApp(
Scaffold(
body: Container(),
bottomNavigationBar: BottomNavBar(
currentIndex: 0,
onTap: (value) => completer.complete(),
),
),
);
await tester.ensureVisible(find.byType(BottomNavigationBar));
await tester.tap(find.byIcon(Icons.home_outlined));
expect(completer.isCompleted, isTrue);
});
testWidgets(
'renders BottomNavigationBar with currentIndex',
(tester) async {
const currentIndex = 1;
await tester.pumpApp(
BottomNavBar(
currentIndex: currentIndex,
onTap: (selectedIndex) {},
),
);
final bottomNavBar = tester.widget<BottomNavBar>(
find.byType(BottomNavBar),
);
expect(bottomNavBar.currentIndex, equals(currentIndex));
},
);
}
| news_toolkit/flutter_news_example/test/navigation/view/bottom_nav_bar_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/test/navigation/view/bottom_nav_bar_test.dart",
"repo_id": "news_toolkit",
"token_count": 681
} | 906 |
// ignore_for_file: prefer_const_constructors
import 'package:flutter_news_example/onboarding/onboarding.dart';
import 'package:test/test.dart';
void main() {
group('OnboardingState', () {
group('OnboardingInitial', () {
test('supports value comparisons', () {
final state1 = OnboardingInitial();
final state2 = OnboardingInitial();
expect(state1, equals(state2));
});
});
group('OnboardingInitial', () {
test('supports value comparisons', () {
final state1 = OnboardingInitial();
final state2 = OnboardingInitial();
expect(state1, equals(state2));
});
});
group('EnablingNotifications', () {
test('supports value comparisons', () {
final state1 = EnablingNotifications();
final state2 = EnablingNotifications();
expect(state1, equals(state2));
});
});
group('EnablingNotificationsSucceeded', () {
test('supports value comparisons', () {
final state1 = EnablingNotificationsSucceeded();
final state2 = EnablingNotificationsSucceeded();
expect(state1, equals(state2));
});
});
group('EnablingNotificationsFailed', () {
test('supports value comparisons', () {
final state1 = EnablingNotificationsFailed();
final state2 = EnablingNotificationsFailed();
expect(state1, equals(state2));
});
});
});
}
| news_toolkit/flutter_news_example/test/onboarding/bloc/onboarding_state_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/test/onboarding/bloc/onboarding_state_test.dart",
"repo_id": "news_toolkit",
"token_count": 541
} | 907 |
// ignore_for_file: prefer_const_constructors
import 'package:bloc_test/bloc_test.dart';
import 'package:flutter/material.dart';
import 'package:flutter_news_example/app/app.dart';
import 'package:flutter_news_example/subscriptions/subscriptions.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockingjay/mockingjay.dart';
import '../../helpers/helpers.dart';
class MockAppBloc extends MockBloc<AppEvent, AppState> implements AppBloc {}
void main() {
group('ManageSubscriptionPage', () {
test('has a route', () {
expect(ManageSubscriptionPage.route(), isA<MaterialPageRoute<void>>());
});
testWidgets('renders ManageSubscriptionView', (tester) async {
await tester.pumpApp(ManageSubscriptionPage());
expect(find.byType(ManageSubscriptionView), findsOneWidget);
});
});
group('ManageSubscriptionView', () {
final appBloc = MockAppBloc();
testWidgets(
'navigates back '
'when subscriptions ListTile tapped', (tester) async {
final navigator = MockNavigator();
when(navigator.maybePop).thenAnswer((_) async => true);
await tester.pumpApp(
ManageSubscriptionPage(),
appBloc: appBloc,
navigator: navigator,
);
await tester.tap(find.byKey(Key('manageSubscription_subscriptions')));
await tester.pumpAndSettle();
verify(navigator.maybePop).called(1);
});
});
}
| news_toolkit/flutter_news_example/test/subscriptions/view/manage_subscription_page_test.dart/0 | {
"file_path": "news_toolkit/flutter_news_example/test/subscriptions/view/manage_subscription_page_test.dart",
"repo_id": "news_toolkit",
"token_count": 541
} | 908 |
org.gradle.jvmargs=-Xmx2G
android.useAndroidX=true
android.enableJetifier=true
| packages/.ci/legacy_project/all_packages/android/gradle.properties/0 | {
"file_path": "packages/.ci/legacy_project/all_packages/android/gradle.properties",
"repo_id": "packages",
"token_count": 30
} | 909 |
#!/bin/bash
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
# Pathify the dependencies on changed packages (excluding major version
# changes, which won't affect clients).
.ci/scripts/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates
# This uses --run-on-dirty-packages rather than --packages-for-branch
# since only the packages changed by 'make-deps-path-based' need to be
# re-checked.
dart ./script/tool/bin/flutter_plugin_tools.dart dart-test --run-on-dirty-packages \
--log-timing --exclude=script/configs/dart_unit_tests_exceptions.yaml \
"$@" $PACKAGE_SHARDING
# Restore the tree to a clean state, to avoid accidental issues if
# other script steps are added to the enclosing task.
git checkout .
| packages/.ci/scripts/dart_unit_tests_pathified.sh/0 | {
"file_path": "packages/.ci/scripts/dart_unit_tests_pathified.sh",
"repo_id": "packages",
"token_count": 265
} | 910 |
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: download Dart and Android deps
script: .ci/scripts/tool_runner.sh
infra_step: true
args: ["fetch-deps", "--android", "--supporting-target-platforms-only", "--exclude=script/configs/exclude_integration_android_legacy_emulator.yaml"]
# Only these two tests are run because they are the only ones that use the
# emulator. Other tests would just duplicate android_platform_test.yaml tests.
- name: native integration tests
script: .ci/scripts/tool_runner.sh
args: ["native-test", "--android", "--no-unit", "--exclude=script/configs/exclude_integration_android_legacy_emulator.yaml"]
- name: drive examples
script: .ci/scripts/tool_runner.sh
args: ["drive-examples", "--android", "--exclude=script/configs/exclude_integration_android_legacy_emulator.yaml,script/configs/exclude_integration_android.yaml,script/configs/exclude_integration_android_emulator.yaml"]
| packages/.ci/targets/android_legacy_emulator_tests.yaml/0 | {
"file_path": "packages/.ci/targets/android_legacy_emulator_tests.yaml",
"repo_id": "packages",
"token_count": 355
} | 911 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.