text
stringlengths 6
13.6M
| id
stringlengths 13
176
| metadata
dict | __index_level_0__
int64 0
1.69k
|
---|---|---|---|
{
"datePickerHourSemanticsLabelOne": "$hour นาฬิกา",
"datePickerHourSemanticsLabelOther": "$hour นาฬิกา",
"datePickerMinuteSemanticsLabelOne": "1 นาที",
"datePickerMinuteSemanticsLabelOther": "$minute นาที",
"datePickerDateOrder": "dmy",
"datePickerDateTimeOrder": "date_time_dayPeriod",
"anteMeridiemAbbreviation": "AM",
"postMeridiemAbbreviation": "PM",
"todayLabel": "วันนี้",
"alertDialogLabel": "การแจ้งเตือน",
"timerPickerHourLabelOne": "ชั่วโมง",
"timerPickerHourLabelOther": "ชั่วโมง",
"timerPickerMinuteLabelOne": "นาที",
"timerPickerMinuteLabelOther": "นาที",
"timerPickerSecondLabelOne": "วินาที",
"timerPickerSecondLabelOther": "วินาที",
"cutButtonLabel": "ตัด",
"copyButtonLabel": "คัดลอก",
"pasteButtonLabel": "วาง",
"selectAllButtonLabel": "เลือกทั้งหมด",
"tabSemanticsLabel": "แท็บที่ $tabIndex จาก $tabCount",
"modalBarrierDismissLabel": "ปิด",
"searchTextFieldPlaceholderLabel": "ค้นหา",
"noSpellCheckReplacementsLabel": "ไม่พบรายการแทนที่",
"menuDismissLabel": "ปิดเมนู",
"lookUpButtonLabel": "ค้นหา",
"searchWebButtonLabel": "ค้นหาบนอินเทอร์เน็ต",
"shareButtonLabel": "แชร์...",
"clearButtonLabel": "Clear"
}
| flutter/packages/flutter_localizations/lib/src/l10n/cupertino_th.arb/0 | {
"file_path": "flutter/packages/flutter_localizations/lib/src/l10n/cupertino_th.arb",
"repo_id": "flutter",
"token_count": 696
} | 771 |
{
"scriptCategory": "English-like",
"timeOfDayFormat": "H:mm",
"openAppDrawerTooltip": "የዳሰሳ ምናሌን ክፈት",
"backButtonTooltip": "ተመለስ",
"closeButtonTooltip": "ዝጋ",
"deleteButtonTooltip": "ሰርዝ",
"nextMonthTooltip": "ቀጣይ ወር",
"previousMonthTooltip": "ቀዳሚ ወር",
"nextPageTooltip": "ቀጣይ ገፅ",
"firstPageTooltip": "የመጀመሪያው ገፅ",
"lastPageTooltip": "የመጨረሻው ገፅ",
"previousPageTooltip": "ቀዳሚ ገፅ",
"showMenuTooltip": "ምናሌን አሳይ",
"aboutListTileTitle": "ስለ $applicationName",
"licensesPageTitle": "ፈቃዶች",
"pageRowsInfoTitle": "$firstRow–$lastRow ከ$rowCount ውስጥ",
"pageRowsInfoTitleApproximate": "$firstRow–$lastRow ከ$rowCount ያህል ውስጥ",
"rowsPerPageTitle": "ረድፎች በገጽ፦",
"tabLabel": "ትር $tabIndex ከ$tabCount",
"selectedRowCountTitleOne": "1 ንጥል ተመርጧል",
"selectedRowCountTitleOther": "$selectedRowCount ንጥሎች ተመርጠዋል",
"cancelButtonLabel": "ይቅር",
"closeButtonLabel": "ዝጋ",
"continueButtonLabel": "ቀጥል",
"copyButtonLabel": "ቅዳ",
"cutButtonLabel": "ቁረጥ",
"scanTextButtonLabel": "ጽሁፍን ቃኝ",
"okButtonLabel": "እሺ",
"pasteButtonLabel": "ለጥፍ",
"selectAllButtonLabel": "ሁሉንም ምረጥ",
"viewLicensesButtonLabel": "ፈቃዶችን ይመልከቱ",
"anteMeridiemAbbreviation": "ጥዋት",
"postMeridiemAbbreviation": "ከሰዓት",
"timePickerHourModeAnnouncement": "ሰዓታትን ምረጥ",
"timePickerMinuteModeAnnouncement": "ደቂቃዎችን ይምረጡ",
"modalBarrierDismissLabel": "አሰናብት",
"signedInLabel": "በመለያ ገብቷል",
"hideAccountsLabel": "መለያዎችን ደብቅ",
"showAccountsLabel": "መለያዎችን አሳይ",
"drawerLabel": "የዳሰሳ ምናሌ",
"popupMenuLabel": "የብቅ-ባይ ምናሌ",
"dialogLabel": "መገናኛ",
"alertDialogLabel": "ማንቂያ",
"searchFieldLabel": "ይፈልጉ",
"reorderItemToStart": "ወደ መጀመሪያ ውሰድ",
"reorderItemToEnd": "ወደ መጨረሻ ውሰድ",
"reorderItemUp": "ወደ ላይ ውሰድ",
"reorderItemDown": "ወደ ታች ውሰድ",
"reorderItemLeft": "ወደ ግራ ውሰድ",
"reorderItemRight": "ወደ ቀኝ ውሰድ",
"expandedIconTapHint": "ሰብስብ",
"collapsedIconTapHint": "ዘርጋ",
"remainingTextFieldCharacterCountOne": "1 ቁምፊ ይቀራል",
"remainingTextFieldCharacterCountOther": "$remainingCount ቁምፊዎች ይቀራሉ",
"refreshIndicatorSemanticLabel": "አድስ",
"moreButtonTooltip": "ተጨማሪ",
"dateSeparator": "/",
"dateHelpText": "ወወ/ቀቀ/ዓዓዓዓ",
"selectYearSemanticsLabel": "ዓመት ይምረጡ",
"unspecifiedDate": "ቀን",
"unspecifiedDateRange": "የቀኖች ርዝመት",
"dateInputLabel": "ቀን ያስገቡ",
"dateRangeStartLabel": "የመጀመሪያ ቀን",
"dateRangeEndLabel": "የመጨረሻ ቀን",
"dateRangeStartDateSemanticLabel": "የመጀመሪያ ቀን $fullDate",
"dateRangeEndDateSemanticLabel": "የማብቂያ ቀን $fullDate",
"invalidDateFormatLabel": "ልክ ያልሆነ ቅርጸት።",
"invalidDateRangeLabel": "ልክ ያልኾነ ክልል።",
"dateOutOfRangeLabel": "ከክልል ውጭ።",
"saveButtonLabel": "አስቀምጥ",
"datePickerHelpText": "ቀን ይምረጡ",
"dateRangePickerHelpText": "ክልል ይምረጡ",
"calendarModeButtonLabel": "ወደ የቀን መቁጠሪያ ቀይር",
"inputDateModeButtonLabel": "ወደ ግቤት ቀይር",
"timePickerDialHelpText": "ጊዜ ይምረጡ",
"timePickerInputHelpText": "ሰዓት ያስገቡ",
"timePickerHourLabel": "ሰዓት",
"timePickerMinuteLabel": "ደቂቃ",
"invalidTimeLabel": "የሚሠራ ሰዓት ያስገቡ",
"dialModeButtonLabel": "ወደ መደወያ መራጭ ሁነታ ቀይር",
"inputTimeModeButtonLabel": "ወደ ጽሁፍ ግቤት ሁነታ ቀይር",
"licensesPackageDetailTextZero": "No licenses",
"licensesPackageDetailTextOne": "1 ፈቃድ",
"licensesPackageDetailTextOther": "$licenseCount ፈቃዶች",
"keyboardKeyAlt": "Alt",
"keyboardKeyAltGraph": "AltGr",
"keyboardKeyBackspace": "የኋሊት መደምሰሻ",
"keyboardKeyCapsLock": "Caps Lock",
"keyboardKeyChannelDown": "ጣቢያ ወደ ታች",
"keyboardKeyChannelUp": "ጣቢያ ወደ ላይ",
"keyboardKeyControl": "Ctrl",
"keyboardKeyDelete": "Del",
"keyboardKeyEject": "አስወጣ",
"keyboardKeyEnd": "ጨርስ",
"keyboardKeyEscape": "Esc",
"keyboardKeyFn": "Fn",
"keyboardKeyHome": "መነሻ",
"keyboardKeyInsert": "አስገባ",
"keyboardKeyMeta": "ሜታ",
"keyboardKeyNumLock": "Num Lock",
"keyboardKeyNumpad1": "Num 1",
"keyboardKeyNumpad2": "Num 2",
"keyboardKeyNumpad3": "Num 3",
"keyboardKeyNumpad4": "Num 4",
"keyboardKeyNumpad5": "Num 5",
"keyboardKeyNumpad6": "Num 6",
"keyboardKeyNumpad7": "Num 7",
"keyboardKeyNumpad8": "Num 8",
"keyboardKeyNumpad9": "Num 9",
"keyboardKeyNumpad0": "Num 0",
"keyboardKeyNumpadAdd": "Num +",
"keyboardKeyNumpadComma": "Num ,",
"keyboardKeyNumpadDecimal": "Num .",
"keyboardKeyNumpadDivide": "+NUM",
"keyboardKeyNumpadEnter": "Num Enter",
"keyboardKeyNumpadEqual": "Num =",
"keyboardKeyNumpadMultiply": "Num *",
"keyboardKeyNumpadParenLeft": "Num (",
"keyboardKeyNumpadParenRight": "Num )",
"keyboardKeyNumpadSubtract": "Num -",
"keyboardKeyPageDown": "PgDown",
"keyboardKeyPageUp": "PgUp",
"keyboardKeyPower": "ኃይል",
"keyboardKeyPowerOff": "ኃይል አጥፋ",
"keyboardKeyPrintScreen": "Print Screen",
"keyboardKeyScrollLock": "Scroll Lock",
"keyboardKeySelect": "ምረጥ",
"keyboardKeySpace": "ክፍተት",
"keyboardKeyMetaMacOs": "ትዕዛዝ",
"keyboardKeyMetaWindows": "Win",
"menuBarMenuLabel": "የምናሌ አሞሌ ምናሌ",
"currentDateLabel": "ዛሬ",
"scrimLabel": "ገዳቢ",
"bottomSheetLabel": "የግርጌ ሉህ",
"scrimOnTapHint": "$modalRouteContentNameን ዝጋ",
"keyboardKeyShift": "ቀያይር",
"expansionTileExpandedHint": "ለመሰብሰብ ሁለቴ መታ ያድርጉ",
"expansionTileCollapsedHint": "ለመዘርጋት ድርብ ሁለቴ መታ ያድርጉ",
"expansionTileExpandedTapHint": "ሰብስብ",
"expansionTileCollapsedTapHint": "ለተጨማሪ ዝርዝሮች ይዘርጉ",
"expandedHint": "ተሰብስቧል",
"collapsedHint": "ተዘርግቷል",
"menuDismissLabel": "ምናሌን አሰናብት",
"lookUpButtonLabel": "ይመልከቱ",
"searchWebButtonLabel": "ድርን ፈልግ",
"shareButtonLabel": "አጋራ...",
"clearButtonTooltip": "Clear text",
"selectedDateLabel": "Selected"
}
| flutter/packages/flutter_localizations/lib/src/l10n/material_am.arb/0 | {
"file_path": "flutter/packages/flutter_localizations/lib/src/l10n/material_am.arb",
"repo_id": "flutter",
"token_count": 3806
} | 772 |
{
"searchWebButtonLabel": "Search Web",
"shareButtonLabel": "Share...",
"scanTextButtonLabel": "Scan text",
"lookUpButtonLabel": "Look up",
"menuDismissLabel": "Dismiss menu",
"expansionTileExpandedHint": "double-tap to collapse",
"expansionTileCollapsedHint": "double-tap to expand",
"expansionTileExpandedTapHint": "Collapse",
"expansionTileCollapsedTapHint": "Expand for more details",
"expandedHint": "Collapsed",
"collapsedHint": "Expanded",
"scrimLabel": "Scrim",
"bottomSheetLabel": "Bottom sheet",
"scrimOnTapHint": "Close $modalRouteContentName",
"currentDateLabel": "Today",
"keyboardKeyShift": "Shift",
"menuBarMenuLabel": "Menu bar menu",
"keyboardKeyNumpad8": "Num 8",
"keyboardKeyCapsLock": "Caps lock",
"keyboardKeyAltGraph": "AltGr",
"keyboardKeyNumpad4": "Num 4",
"keyboardKeyNumpad5": "Num 5",
"keyboardKeyNumpad6": "Num 6",
"keyboardKeyNumpad7": "Num 7",
"keyboardKeyNumpad2": "Num 2",
"keyboardKeyNumpad0": "Num 0",
"keyboardKeyNumpadAdd": "Num +",
"keyboardKeyNumpadComma": "Num ,",
"keyboardKeyNumpadDecimal": "Num .",
"keyboardKeyNumpadDivide": "Num /",
"keyboardKeyNumpadEqual": "Num =",
"keyboardKeyNumpadMultiply": "Num *",
"keyboardKeyNumpadParenLeft": "Num (",
"keyboardKeyInsert": "Insert",
"keyboardKeyHome": "Home",
"keyboardKeyEject": "Eject",
"keyboardKeyNumpadParenRight": "Num )",
"keyboardKeyFn": "Fn",
"keyboardKeyEscape": "Esc",
"keyboardKeyEnd": "End",
"keyboardKeyDelete": "Del",
"keyboardKeyControl": "Ctrl",
"keyboardKeyChannelUp": "Channel up",
"keyboardKeyNumpadSubtract": "Num -",
"keyboardKeyChannelDown": "Channel down",
"keyboardKeyBackspace": "Backspace",
"keyboardKeySelect": "Select",
"keyboardKeyAlt": "Alt",
"keyboardKeyMeta": "Meta",
"keyboardKeyMetaMacOs": "Command",
"keyboardKeyMetaWindows": "Win",
"keyboardKeyNumLock": "Num lock",
"keyboardKeyNumpad1": "Num 1",
"keyboardKeyPageDown": "PgDown",
"keyboardKeySpace": "Space",
"keyboardKeyNumpad3": "Num 3",
"keyboardKeyScrollLock": "Scroll lock",
"keyboardKeyNumpad9": "Num 9",
"keyboardKeyPrintScreen": "Print screen",
"keyboardKeyPowerOff": "Power off",
"keyboardKeyPower": "Power",
"keyboardKeyPageUp": "PgUp",
"keyboardKeyNumpadEnter": "Num enter",
"inputTimeModeButtonLabel": "Switch to text input mode",
"timePickerDialHelpText": "Select time",
"timePickerHourLabel": "Hour",
"timePickerMinuteLabel": "Minute",
"invalidTimeLabel": "Enter a valid time",
"dialModeButtonLabel": "Switch to dial picker mode",
"timePickerInputHelpText": "Enter time",
"dateSeparator": "/",
"dateInputLabel": "Enter date",
"calendarModeButtonLabel": "Switch to calendar",
"dateRangePickerHelpText": "Select range",
"datePickerHelpText": "Select date",
"saveButtonLabel": "Save",
"dateOutOfRangeLabel": "Out of range.",
"invalidDateRangeLabel": "Invalid range.",
"invalidDateFormatLabel": "Invalid format.",
"dateRangeEndDateSemanticLabel": "End date $fullDate",
"dateRangeStartDateSemanticLabel": "Start date $fullDate",
"dateRangeEndLabel": "End date",
"dateRangeStartLabel": "Start date",
"inputDateModeButtonLabel": "Switch to input",
"unspecifiedDateRange": "Date range",
"unspecifiedDate": "Date",
"selectYearSemanticsLabel": "Select year",
"dateHelpText": "dd/mm/yyyy",
"moreButtonTooltip": "More",
"tabLabel": "Tab $tabIndex of $tabCount",
"showAccountsLabel": "Show accounts",
"hideAccountsLabel": "Hide accounts",
"signedInLabel": "Signed in",
"timePickerMinuteModeAnnouncement": "Select minutes",
"timePickerHourModeAnnouncement": "Select hours",
"scriptCategory": "English-like",
"timeOfDayFormat": "h:mm a",
"openAppDrawerTooltip": "Open navigation menu",
"backButtonTooltip": "Back",
"closeButtonTooltip": "Close",
"deleteButtonTooltip": "Delete",
"nextMonthTooltip": "Next month",
"previousMonthTooltip": "Previous month",
"nextPageTooltip": "Next page",
"previousPageTooltip": "Previous page",
"firstPageTooltip": "First page",
"lastPageTooltip": "Last page",
"showMenuTooltip": "Show menu",
"aboutListTileTitle": "About $applicationName",
"licensesPageTitle": "Licences",
"licensesPackageDetailTextZero": "No licences",
"licensesPackageDetailTextOne": "1 licence",
"licensesPackageDetailTextOther": "$licenseCount licences",
"pageRowsInfoTitle": "$firstRow–$lastRow of $rowCount",
"pageRowsInfoTitleApproximate": "$firstRow–$lastRow of about $rowCount",
"rowsPerPageTitle": "Rows per page:",
"selectedRowCountTitleOne": "1 item selected",
"selectedRowCountTitleOther": "$selectedRowCount items selected",
"cancelButtonLabel": "Cancel",
"closeButtonLabel": "Close",
"continueButtonLabel": "Continue",
"copyButtonLabel": "Copy",
"cutButtonLabel": "Cut",
"okButtonLabel": "OK",
"pasteButtonLabel": "Paste",
"selectAllButtonLabel": "Select all",
"viewLicensesButtonLabel": "View licences",
"anteMeridiemAbbreviation": "AM",
"postMeridiemAbbreviation": "PM",
"modalBarrierDismissLabel": "Dismiss",
"drawerLabel": "Navigation menu",
"popupMenuLabel": "Pop-up menu",
"dialogLabel": "Dialogue",
"alertDialogLabel": "Alert",
"searchFieldLabel": "Search",
"reorderItemToStart": "Move to the start",
"reorderItemToEnd": "Move to the end",
"reorderItemUp": "Move up",
"reorderItemDown": "Move down",
"reorderItemLeft": "Move to the left",
"reorderItemRight": "Move to the right",
"expandedIconTapHint": "Collapse",
"collapsedIconTapHint": "Expand",
"remainingTextFieldCharacterCountZero": "No characters remaining",
"remainingTextFieldCharacterCountOne": "1 character remaining",
"remainingTextFieldCharacterCountOther": "$remainingCount characters remaining",
"refreshIndicatorSemanticLabel": "Refresh"
}
| flutter/packages/flutter_localizations/lib/src/l10n/material_en_AU.arb/0 | {
"file_path": "flutter/packages/flutter_localizations/lib/src/l10n/material_en_AU.arb",
"repo_id": "flutter",
"token_count": 1995
} | 773 |
{
"scriptCategory": "English-like",
"timeOfDayFormat": "HH.mm",
"openAppDrawerTooltip": "Avaa navigointivalikko",
"backButtonTooltip": "Takaisin",
"closeButtonTooltip": "Sulje",
"deleteButtonTooltip": "Poista",
"nextMonthTooltip": "Seuraava kuukausi",
"previousMonthTooltip": "Edellinen kuukausi",
"nextPageTooltip": "Seuraava sivu",
"previousPageTooltip": "Edellinen sivu",
"firstPageTooltip": "Ensimmäinen sivu",
"lastPageTooltip": "Viimeinen sivu",
"showMenuTooltip": "Näytä valikko",
"aboutListTileTitle": "Tietoja: $applicationName",
"licensesPageTitle": "Lisenssit",
"pageRowsInfoTitle": "$firstRow–$lastRow/$rowCount",
"pageRowsInfoTitleApproximate": "$firstRow–$lastRow/~$rowCount",
"rowsPerPageTitle": "Riviä/sivu:",
"tabLabel": "Välilehti $tabIndex kautta $tabCount",
"selectedRowCountTitleOne": "1 kohde valittu",
"selectedRowCountTitleOther": "$selectedRowCount kohdetta valittu",
"cancelButtonLabel": "Peru",
"closeButtonLabel": "Sulje",
"continueButtonLabel": "Jatka",
"copyButtonLabel": "Kopioi",
"cutButtonLabel": "Leikkaa",
"scanTextButtonLabel": "Skannaa tekstiä",
"okButtonLabel": "OK",
"pasteButtonLabel": "Liitä",
"selectAllButtonLabel": "Valitse kaikki",
"viewLicensesButtonLabel": "Näytä käyttöoikeudet",
"anteMeridiemAbbreviation": "ap",
"postMeridiemAbbreviation": "ip",
"timePickerHourModeAnnouncement": "Valitse tunnit",
"timePickerMinuteModeAnnouncement": "Valitse minuutit",
"modalBarrierDismissLabel": "Ohita",
"signedInLabel": "Kirjautunut sisään",
"hideAccountsLabel": "Piilota tilit",
"showAccountsLabel": "Näytä tilit",
"drawerLabel": "Navigointivalikko",
"popupMenuLabel": "Ponnahdusvalikko",
"dialogLabel": "Valintaikkuna",
"alertDialogLabel": "Ilmoitus",
"searchFieldLabel": "Haku",
"reorderItemToStart": "Siirrä alkuun",
"reorderItemToEnd": "Siirrä loppuun",
"reorderItemUp": "Siirrä ylös",
"reorderItemDown": "Siirrä alas",
"reorderItemLeft": "Siirrä vasemmalle",
"reorderItemRight": "Siirrä oikealle",
"expandedIconTapHint": "Tiivistä",
"collapsedIconTapHint": "Laajenna",
"remainingTextFieldCharacterCountOne": "1 merkki jäljellä",
"remainingTextFieldCharacterCountOther": "$remainingCount merkkiä jäljellä",
"refreshIndicatorSemanticLabel": "Päivitys",
"moreButtonTooltip": "Lisää",
"dateSeparator": "/",
"dateHelpText": "pp/kk/vvvv",
"selectYearSemanticsLabel": "Valitse vuosi",
"unspecifiedDate": "Päivämäärä",
"unspecifiedDateRange": "Ajanjakso",
"dateInputLabel": "Lisää päivämäärä",
"dateRangeStartLabel": "Alkamispäivä",
"dateRangeEndLabel": "Päättymispäivä",
"dateRangeStartDateSemanticLabel": "Alkamispäivä $fullDate",
"dateRangeEndDateSemanticLabel": "Päättymispäivä $fullDate",
"invalidDateFormatLabel": "Virheellinen muoto",
"invalidDateRangeLabel": "Virheellinen päivämääräväli",
"dateOutOfRangeLabel": "Päivämäärä ei kelpaa",
"saveButtonLabel": "Tallenna",
"datePickerHelpText": "Valitse päivämäärä",
"dateRangePickerHelpText": "Valitse jakso",
"calendarModeButtonLabel": "Vaihda kalenteriin",
"inputDateModeButtonLabel": "Vaihda tekstinsyöttöön",
"timePickerDialHelpText": "Valitse aika",
"timePickerInputHelpText": "Lisää aika",
"timePickerHourLabel": "Tunti",
"timePickerMinuteLabel": "Minuutti",
"invalidTimeLabel": "Lisää kelvollinen aika",
"dialModeButtonLabel": "Valitse kellotauluvalitsin",
"inputTimeModeButtonLabel": "Valitse syöttötavaksi teksti",
"licensesPackageDetailTextZero": "No licenses",
"licensesPackageDetailTextOne": "1 lisenssi",
"licensesPackageDetailTextOther": "$licenseCount lisenssiä",
"keyboardKeyAlt": "Alt",
"keyboardKeyAltGraph": "AltGr",
"keyboardKeyBackspace": "Askelpalautin",
"keyboardKeyCapsLock": "Caps Lock",
"keyboardKeyChannelDown": "Edellinen kanava",
"keyboardKeyChannelUp": "Seuraava kanava",
"keyboardKeyControl": "Ctrl",
"keyboardKeyDelete": "Del",
"keyboardKeyEject": "Poista",
"keyboardKeyEnd": "Lopeta",
"keyboardKeyEscape": "Esc",
"keyboardKeyFn": "Fn",
"keyboardKeyHome": "Etusivu",
"keyboardKeyInsert": "Lisää",
"keyboardKeyMeta": "Meta",
"keyboardKeyNumLock": "Num Lock",
"keyboardKeyNumpad1": "Num 1",
"keyboardKeyNumpad2": "Num 2",
"keyboardKeyNumpad3": "Num 3",
"keyboardKeyNumpad4": "Num 4",
"keyboardKeyNumpad5": "Num 5",
"keyboardKeyNumpad6": "Num 6",
"keyboardKeyNumpad7": "Num 7",
"keyboardKeyNumpad8": "Num 8",
"keyboardKeyNumpad9": "Num 9",
"keyboardKeyNumpad0": "Num 0",
"keyboardKeyNumpadAdd": "Num +",
"keyboardKeyNumpadComma": "Num ,",
"keyboardKeyNumpadDecimal": "Num .",
"keyboardKeyNumpadDivide": "Num /",
"keyboardKeyNumpadEnter": "Num Enter",
"keyboardKeyNumpadEqual": "Num =",
"keyboardKeyNumpadMultiply": "Num *",
"keyboardKeyNumpadParenLeft": "Num (",
"keyboardKeyNumpadParenRight": "Num )",
"keyboardKeyNumpadSubtract": "Num -",
"keyboardKeyPageDown": "PgDown",
"keyboardKeyPageUp": "PgUp",
"keyboardKeyPower": "Virta",
"keyboardKeyPowerOff": "Virta pois",
"keyboardKeyPrintScreen": "Print Screen",
"keyboardKeyScrollLock": "Scroll Lock",
"keyboardKeySelect": "Valitse",
"keyboardKeySpace": "Välilyönti",
"keyboardKeyMetaMacOs": "Komento",
"keyboardKeyMetaWindows": "Win",
"menuBarMenuLabel": "Valikkopalkki",
"currentDateLabel": "Tänään",
"scrimLabel": "Sermi",
"bottomSheetLabel": "Alapaneeli",
"scrimOnTapHint": "Sulje $modalRouteContentName",
"keyboardKeyShift": "Vaihto",
"expansionTileExpandedHint": "tiivistä kaksoisnapauttamalla",
"expansionTileCollapsedHint": "laajenna kaksoisnapauttamalla",
"expansionTileExpandedTapHint": "Tiivistä",
"expansionTileCollapsedTapHint": "Katso lisätietoja laajentamalla",
"expandedHint": "Tiivistetty",
"collapsedHint": "Laajennettu",
"menuDismissLabel": "Hylkää valikko",
"lookUpButtonLabel": "Hae",
"searchWebButtonLabel": "Hae verkosta",
"shareButtonLabel": "Jaa…",
"clearButtonTooltip": "Clear text",
"selectedDateLabel": "Selected"
}
| flutter/packages/flutter_localizations/lib/src/l10n/material_fi.arb/0 | {
"file_path": "flutter/packages/flutter_localizations/lib/src/l10n/material_fi.arb",
"repo_id": "flutter",
"token_count": 2422
} | 774 |
{
"scriptCategory": "English-like",
"timeOfDayFormat": "H:mm",
"openAppDrawerTooltip": "სანავიგაციო მენიუს გახსნა",
"backButtonTooltip": "უკან",
"closeButtonTooltip": "დახურვა",
"deleteButtonTooltip": "წაშლა",
"nextMonthTooltip": "შემდეგი თვე",
"previousMonthTooltip": "წინა თვე",
"nextPageTooltip": "შემდეგი გვერდი",
"previousPageTooltip": "წინა გვერდი",
"firstPageTooltip": "პირველი გვერდი",
"lastPageTooltip": "ბოლო გვერდი",
"showMenuTooltip": "მენიუს ჩვენება",
"aboutListTileTitle": "$applicationName-ის შესახებ",
"licensesPageTitle": "ლიცენზიები",
"pageRowsInfoTitle": "$firstRow-$lastRow / $rowCount-დან",
"pageRowsInfoTitleApproximate": "$firstRow-$lastRow / დაახლოებით $rowCount-დან",
"rowsPerPageTitle": "მწკრივი გვერდზე:",
"tabLabel": "ჩანართი $tabIndex / $tabCount-დან",
"selectedRowCountTitleOne": "არჩეულია 1 ერთეული",
"selectedRowCountTitleOther": "არჩეულია $selectedRowCount ერთეული",
"cancelButtonLabel": "გაუქმება",
"closeButtonLabel": "დახურვა",
"continueButtonLabel": "გაგრძელება",
"copyButtonLabel": "კოპირება",
"cutButtonLabel": "ამოჭრა",
"scanTextButtonLabel": "ტექსტის სკანირება",
"okButtonLabel": "კარგი",
"pasteButtonLabel": "ჩასმა",
"selectAllButtonLabel": "ყველას არჩევა",
"viewLicensesButtonLabel": "ლიცენზიების ნახვა",
"anteMeridiemAbbreviation": "AM",
"postMeridiemAbbreviation": "PM",
"timePickerHourModeAnnouncement": "აირჩიეთ საათები",
"timePickerMinuteModeAnnouncement": "აირჩიეთ წუთები",
"modalBarrierDismissLabel": "დახურვა",
"signedInLabel": "შესული",
"hideAccountsLabel": "ანგარიშების დამალვა",
"showAccountsLabel": "ანგარიშების ჩვენება",
"drawerLabel": "ნავიგაციის მენიუ",
"popupMenuLabel": "ამომხტარი მენიუ",
"dialogLabel": "დიალოგი",
"alertDialogLabel": "გაფრთხილება",
"searchFieldLabel": "ძიება",
"reorderItemToStart": "დასაწყისში გადატანა",
"reorderItemToEnd": "ბოლოში გადატანა",
"reorderItemUp": "ზემოთ გადატანა",
"reorderItemDown": "ქვემოთ გადატანა",
"reorderItemLeft": "მარცხნივ გადატანა",
"reorderItemRight": "მარჯვნივ გადატანა",
"expandedIconTapHint": "ჩაკეცვა",
"collapsedIconTapHint": "გაშლა",
"remainingTextFieldCharacterCountOne": "დარჩა 1 სიმბოლო",
"remainingTextFieldCharacterCountOther": "დარჩა $remainingCount სიმბოლო",
"refreshIndicatorSemanticLabel": "განახლება",
"moreButtonTooltip": "მეტი",
"dateSeparator": ".",
"dateHelpText": "დდ.თთ.წწწწ",
"selectYearSemanticsLabel": "აირჩიეთ წელი",
"unspecifiedDate": "თარიღი",
"unspecifiedDateRange": "თარიღების დიაპაზონი",
"dateInputLabel": "შეიყვანეთ თარიღი",
"dateRangeStartLabel": "დაწყების თარიღი",
"dateRangeEndLabel": "დასრულების თარიღი",
"dateRangeStartDateSemanticLabel": "დაწყების თარიღია $fullDate",
"dateRangeEndDateSemanticLabel": "დასრულების თარიღია $fullDate",
"invalidDateFormatLabel": "ფორმატი არასწორია.",
"invalidDateRangeLabel": "დიაპაზონი არასწორია.",
"dateOutOfRangeLabel": "დიაპაზონს მიღმაა.",
"saveButtonLabel": "შენახვა",
"datePickerHelpText": "თარიღის არჩევა",
"dateRangePickerHelpText": "დიაპაზონის არჩევა",
"calendarModeButtonLabel": "კალენდარზე გადართვა",
"inputDateModeButtonLabel": "შეყვანაზე გადართვა",
"timePickerDialHelpText": "დროის არჩევა",
"timePickerInputHelpText": "დროის შეყვანა",
"timePickerHourLabel": "საათი",
"timePickerMinuteLabel": "წუთი",
"invalidTimeLabel": "შეიყვანეთ სწორი დრო",
"dialModeButtonLabel": "ციფერბლატის რეჟიმზე გადართვა",
"inputTimeModeButtonLabel": "ტექსტის შეყვანის რეჟიმზე გადართვა",
"licensesPackageDetailTextZero": "No licenses",
"licensesPackageDetailTextOne": "1 ლიცენზია",
"licensesPackageDetailTextOther": "$licenseCount ლიცენზია",
"keyboardKeyAlt": "Alt",
"keyboardKeyAltGraph": "AltGr",
"keyboardKeyBackspace": "Backspace",
"keyboardKeyCapsLock": "Caps Lock",
"keyboardKeyChannelDown": "Channel Down",
"keyboardKeyChannelUp": "Channel Up",
"keyboardKeyControl": "Ctrl",
"keyboardKeyDelete": "Del",
"keyboardKeyEject": "Eject",
"keyboardKeyEnd": "End",
"keyboardKeyEscape": "Esc",
"keyboardKeyFn": "Fn",
"keyboardKeyHome": "Home",
"keyboardKeyInsert": "Insert",
"keyboardKeyMeta": "Meta",
"keyboardKeyNumLock": "Num Lock",
"keyboardKeyNumpad1": "Num 1",
"keyboardKeyNumpad2": "Num 2",
"keyboardKeyNumpad3": "Num 3",
"keyboardKeyNumpad4": "Num 4",
"keyboardKeyNumpad5": "Num 5",
"keyboardKeyNumpad6": "Num 6",
"keyboardKeyNumpad7": "Num 7",
"keyboardKeyNumpad8": "Num 8",
"keyboardKeyNumpad9": "Num 9",
"keyboardKeyNumpad0": "Num 0",
"keyboardKeyNumpadAdd": "Num +",
"keyboardKeyNumpadComma": "Num ,",
"keyboardKeyNumpadDecimal": "Num .",
"keyboardKeyNumpadDivide": "Num /",
"keyboardKeyNumpadEnter": "Num Enter",
"keyboardKeyNumpadEqual": "Num =",
"keyboardKeyNumpadMultiply": "Num *",
"keyboardKeyNumpadParenLeft": "Num (",
"keyboardKeyNumpadParenRight": "Num )",
"keyboardKeyNumpadSubtract": "Num -",
"keyboardKeyPageDown": "PgDown",
"keyboardKeyPageUp": "PgUp",
"keyboardKeyPower": "ჩართვა",
"keyboardKeyPowerOff": "გამორთვა",
"keyboardKeyPrintScreen": "Print Screen",
"keyboardKeyScrollLock": "Scroll Lock",
"keyboardKeySelect": "Select",
"keyboardKeySpace": "Space",
"keyboardKeyMetaMacOs": "Command",
"keyboardKeyMetaWindows": "Win",
"menuBarMenuLabel": "მენიუს ზოლის მენიუ",
"currentDateLabel": "დღეს",
"scrimLabel": "სკრიმი",
"bottomSheetLabel": "ქვედა ფურცელი",
"scrimOnTapHint": "$modalRouteContentName-ის დახურვა",
"keyboardKeyShift": "ცვლა",
"expansionTileExpandedHint": "ორმაგად შეეხეთ ჩასაკეცად",
"expansionTileCollapsedHint": "გასაფართოებლად ორჯერ შეეხეთ",
"expansionTileExpandedTapHint": "ჩაკეცვა",
"expansionTileCollapsedTapHint": "მეტი დეტალებისთვის გააფართოეთ",
"expandedHint": "ჩაკეცილია",
"collapsedHint": "გაფართოებულია",
"menuDismissLabel": "მენიუს უარყოფა",
"lookUpButtonLabel": "აიხედეთ ზემოთ",
"searchWebButtonLabel": "ვებში ძიება",
"shareButtonLabel": "გაზიარება...",
"clearButtonTooltip": "Clear text",
"selectedDateLabel": "Selected"
}
| flutter/packages/flutter_localizations/lib/src/l10n/material_ka.arb/0 | {
"file_path": "flutter/packages/flutter_localizations/lib/src/l10n/material_ka.arb",
"repo_id": "flutter",
"token_count": 5211
} | 775 |
{
"scriptCategory": "tall",
"timeOfDayFormat": "H:mm",
"openAppDrawerTooltip": "नेभिगेसन मेनु खोल्नुहोस्",
"backButtonTooltip": "पछाडि जानुहोस्",
"closeButtonTooltip": "बन्द गर्नुहोस्",
"deleteButtonTooltip": "मेट्नुहोस्",
"nextMonthTooltip": "अर्को महिना",
"previousMonthTooltip": "अघिल्लो महिना",
"nextPageTooltip": "अर्को पेज",
"previousPageTooltip": "अघिल्लो पृष्ठ",
"firstPageTooltip": "प्रथम पेज",
"lastPageTooltip": "अन्तिम पेज",
"showMenuTooltip": "मेनु देखाउनुहोस्",
"aboutListTileTitle": "$applicationName बारे",
"licensesPageTitle": "इजाजतपत्रहरू",
"pageRowsInfoTitle": "$rowCount मध्ये $firstRow–$lastRow",
"pageRowsInfoTitleApproximate": "लगभग $rowCount को $firstRow–$lastRow",
"rowsPerPageTitle": "प्रत्येक पृष्ठमा रहेका पङ्क्तिहरूको सङ्ख्या:",
"tabLabel": "$tabCount मध्ये $tabIndex ट्याब",
"selectedRowCountTitleOne": "१ वस्तु चयन गरियो",
"selectedRowCountTitleOther": "$selectedRowCount वस्तुहरू चयन गरिए",
"cancelButtonLabel": "रद्द गर्नुहोस्",
"closeButtonLabel": "बन्द गर्नुहोस्",
"continueButtonLabel": "जारी राख्नुहोस्",
"copyButtonLabel": "प्रतिलिपि गर्नुहोस्",
"cutButtonLabel": "काट्नुहोस्",
"scanTextButtonLabel": "टेक्स्ट स्क्यान गर्नुहोस्",
"okButtonLabel": "ठिक छ",
"pasteButtonLabel": "टाँस्नुहोस्",
"selectAllButtonLabel": "सबै बटनहरू चयन गर्नुहोस्",
"viewLicensesButtonLabel": "लाइसेन्सहरू हेर्नुहोस्",
"anteMeridiemAbbreviation": "पूर्वाह्न",
"postMeridiemAbbreviation": "अपराह्न",
"timePickerHourModeAnnouncement": "घन्टा चयन गर्नुहोस्",
"timePickerMinuteModeAnnouncement": "मिनेट चयन गर्नुहोस्",
"modalBarrierDismissLabel": "खारेज गर्नुहोस्",
"signedInLabel": "साइन इन गरियो",
"hideAccountsLabel": "खाताहरू लुकाउनुहोस्",
"showAccountsLabel": "खाताहरू देखाउनुहोस्",
"drawerLabel": "नेभिगेसन मेनु",
"popupMenuLabel": "पपअप मेनु",
"dialogLabel": "संवाद",
"alertDialogLabel": "अलर्ट",
"searchFieldLabel": "खोज्नुहोस्",
"reorderItemToStart": "सुरुमा सार्नुहोस्",
"reorderItemToEnd": "अन्त्यमा जानुहोस्",
"reorderItemUp": "माथि सार्नुहोस्",
"reorderItemDown": "तल सार्नुहोस्",
"reorderItemLeft": "बायाँ सार्नुहोस्",
"reorderItemRight": "दायाँ सार्नुहोस्",
"expandedIconTapHint": "संक्षिप्त गर्नुहोस्",
"collapsedIconTapHint": "विस्तार गर्नुहोस्",
"remainingTextFieldCharacterCountOne": "१ वर्ण बाँकी",
"remainingTextFieldCharacterCountOther": "$remainingCount वर्णहरू बाँकी",
"refreshIndicatorSemanticLabel": "पुनः ताजा गर्नुहोस्",
"moreButtonTooltip": "थप",
"dateSeparator": ".",
"dateHelpText": "yyyy/mm/dd",
"selectYearSemanticsLabel": "वर्ष छान्नुहोस्",
"unspecifiedDate": "मिति",
"unspecifiedDateRange": "मितिको दायरा",
"dateInputLabel": "मिति प्रविष्टि गर्नुहोस्",
"dateRangeStartLabel": "सुरु हुने मिति",
"dateRangeEndLabel": "समाप्त हुने मिति",
"dateRangeStartDateSemanticLabel": "सुरु हुने मिति $fullDate",
"dateRangeEndDateSemanticLabel": "समाप्त हुने मिति $fullDate",
"invalidDateFormatLabel": "अवैध ढाँचा।",
"invalidDateRangeLabel": "अवैध दायरा।",
"dateOutOfRangeLabel": "दायराभन्दा बाहिर",
"saveButtonLabel": "सेभ गर्नुहोस्",
"datePickerHelpText": "मिति चयन गर्नुहोस्",
"dateRangePickerHelpText": "मितिको दायरा चयन गर्नुहोस्",
"calendarModeButtonLabel": "पात्रो मोड प्रयोग गर्नुहोस्",
"inputDateModeButtonLabel": "इनपुट मोड प्रयोग गर्नुहोस्",
"timePickerDialHelpText": "समय चयन गर्नुहोस्",
"timePickerInputHelpText": "समय हाल्नुहोस्",
"timePickerHourLabel": "घन्टा",
"timePickerMinuteLabel": "मिनेट",
"invalidTimeLabel": "वैध समय प्रविष्टि गर्नुहोस्",
"dialModeButtonLabel": "डायल चयनकर्ता मोड प्रयोग गर्नुहोस्",
"inputTimeModeButtonLabel": "पाठ इनपुट मोड प्रयोग गर्नुहोस्",
"licensesPackageDetailTextZero": "No licenses",
"licensesPackageDetailTextOne": "एउटा इजाजतपत्र",
"licensesPackageDetailTextOther": "$licenseCount वटा इजाजतपत्र",
"keyboardKeyAlt": "Alt",
"keyboardKeyAltGraph": "AltGr",
"keyboardKeyBackspace": "Backspace",
"keyboardKeyCapsLock": "Caps Lock",
"keyboardKeyChannelDown": "Channel Down",
"keyboardKeyChannelUp": "Channel Up",
"keyboardKeyControl": "Ctrl",
"keyboardKeyDelete": "Del",
"keyboardKeyEject": "Eject",
"keyboardKeyEnd": "End",
"keyboardKeyEscape": "Esc",
"keyboardKeyFn": "Fn",
"keyboardKeyHome": "Home",
"keyboardKeyInsert": "Insert",
"keyboardKeyMeta": "Meta",
"keyboardKeyNumLock": "Num Lock",
"keyboardKeyNumpad1": "Num 1",
"keyboardKeyNumpad2": "Num 2",
"keyboardKeyNumpad3": "Num 3",
"keyboardKeyNumpad4": "Num 4",
"keyboardKeyNumpad5": "Num 5",
"keyboardKeyNumpad6": "Num 6",
"keyboardKeyNumpad7": "Num 7",
"keyboardKeyNumpad8": "Num 8",
"keyboardKeyNumpad9": "Num 9",
"keyboardKeyNumpad0": "Num 0",
"keyboardKeyNumpadAdd": "Num +",
"keyboardKeyNumpadComma": "Num ,",
"keyboardKeyNumpadDecimal": "Num .",
"keyboardKeyNumpadDivide": "Num /",
"keyboardKeyNumpadEnter": "Num Enter",
"keyboardKeyNumpadEqual": "Num =",
"keyboardKeyNumpadMultiply": "Num *",
"keyboardKeyNumpadParenLeft": "Num (",
"keyboardKeyNumpadParenRight": "Num )",
"keyboardKeyNumpadSubtract": "Num -",
"keyboardKeyPageDown": "PgDown",
"keyboardKeyPageUp": "PgUp",
"keyboardKeyPower": "Power",
"keyboardKeyPowerOff": "Power Off",
"keyboardKeyPrintScreen": "Print Screen",
"keyboardKeyScrollLock": "Scroll Lock",
"keyboardKeySelect": "Select",
"keyboardKeySpace": "Space",
"keyboardKeyMetaMacOs": "Command",
"keyboardKeyMetaWindows": "Win",
"menuBarMenuLabel": "\"मेनु बार\" मेनु",
"currentDateLabel": "आज",
"scrimLabel": "स्क्रिम",
"bottomSheetLabel": "पुछारको पाना",
"scrimOnTapHint": "$modalRouteContentName बन्द गर्नुहोस्",
"keyboardKeyShift": "Shift",
"expansionTileExpandedHint": "कोल्याप्स गर्न डबल ट्याप गर्नुहोस्",
"expansionTileCollapsedHint": "एक्स्पान्ड गर्न डबल ट्याप गर्नुहोस्",
"expansionTileExpandedTapHint": "कोल्याप्स गर्नुहोस्",
"expansionTileCollapsedTapHint": "थप विवरण हेर्न एक्स्पान्ड गर्नुहोस्",
"expandedHint": "कोल्याप्स गरियो",
"collapsedHint": "एक्स्पान्ड गरियो",
"menuDismissLabel": "मेनु खारेज गर्नुहोस्",
"lookUpButtonLabel": "माथितिर हेर्नुहोस्",
"searchWebButtonLabel": "वेबमा खोज्नुहोस्",
"shareButtonLabel": "सेयर गर्नुहोस्...",
"clearButtonTooltip": "Clear text",
"selectedDateLabel": "Selected"
}
| flutter/packages/flutter_localizations/lib/src/l10n/material_ne.arb/0 | {
"file_path": "flutter/packages/flutter_localizations/lib/src/l10n/material_ne.arb",
"repo_id": "flutter",
"token_count": 4353
} | 776 |
{
"lookUpButtonLabel": "Pogled nagore",
"searchWebButtonLabel": "Pretraži veb",
"shareButtonLabel": "Deli…",
"scanTextButtonLabel": "Skeniraj tekst",
"menuDismissLabel": "Odbacite meni",
"expansionTileExpandedHint": "dvaput dodirnite da biste skupili",
"expansionTileCollapsedHint": "dvaput dodirnite da biste proširili",
"expansionTileExpandedTapHint": "Skupite",
"expansionTileCollapsedTapHint": "Proširite za još detalja",
"expandedHint": "Skupljeno je",
"collapsedHint": "Prošireno je",
"scrimLabel": "Skrim",
"bottomSheetLabel": "Donja tabela",
"scrimOnTapHint": "Zatvori: $modalRouteContentName",
"currentDateLabel": "Danas",
"keyboardKeyShift": "Shift",
"menuBarMenuLabel": "Meni traka menija",
"keyboardKeyNumpad7": "Num 7",
"keyboardKeyAltGraph": "AltGr",
"keyboardKeyInsert": "Insert",
"keyboardKeyNumpad4": "Num 4",
"keyboardKeyNumpad5": "Num 5",
"keyboardKeyNumpad6": "Num 6",
"keyboardKeyNumpad2": "Num 2",
"keyboardKeyNumpad8": "Num 8",
"keyboardKeyHome": "Home",
"keyboardKeyNumpad0": "Num 0",
"keyboardKeyNumpadAdd": "Num +",
"keyboardKeyNumpadComma": "Num ,",
"keyboardKeyNumpadDecimal": "Num .",
"keyboardKeyNumpadDivide": "Num /",
"keyboardKeyEscape": "Esc",
"keyboardKeyNumpadEqual": "Num =",
"keyboardKeyNumpadMultiply": "Num *",
"keyboardKeyNumpadParenLeft": "Num (",
"keyboardKeyEject": "Eject",
"keyboardKeyFn": "Fn",
"keyboardKeyNumpadParenRight": "Num )",
"keyboardKeyEnd": "End",
"keyboardKeyDelete": "Del",
"keyboardKeyControl": "Ctrl",
"keyboardKeyChannelUp": "Sledeći kanal",
"keyboardKeyChannelDown": "Prethodni kanal",
"keyboardKeyCapsLock": "Caps Lock",
"keyboardKeyNumpadSubtract": "Num -",
"keyboardKeyBackspace": "Backspace",
"keyboardKeyAlt": "Alt",
"keyboardKeySelect": "Select",
"keyboardKeyMeta": "Meta",
"keyboardKeyMetaMacOs": "Command",
"keyboardKeyMetaWindows": "Win",
"keyboardKeyNumLock": "Num Lock",
"keyboardKeyNumpad1": "Num 1",
"keyboardKeyPageDown": "PgDown",
"keyboardKeySpace": "Taster za razmak",
"keyboardKeyNumpad3": "Num 3",
"keyboardKeyScrollLock": "Scroll Lock",
"keyboardKeyNumpad9": "Num 9",
"keyboardKeyPrintScreen": "Print Screen",
"keyboardKeyPowerOff": "Dugme za isključivanje",
"keyboardKeyPower": "Dugme za uključivanje",
"keyboardKeyPageUp": "PgUp",
"keyboardKeyNumpadEnter": "Num Enter",
"invalidTimeLabel": "Unesite važeće vreme",
"licensesPackageDetailTextOne": "1 licenca",
"licensesPackageDetailTextOther": "$licenseCount licenci",
"timePickerDialHelpText": "Izaberite vreme",
"timePickerInputHelpText": "Unesite vreme",
"timePickerHourLabel": "Sat",
"timePickerMinuteLabel": "Minut",
"licensesPackageDetailTextFew": "$licenseCount licence",
"dialModeButtonLabel": "Pređite na režim birača brojčanika",
"inputTimeModeButtonLabel": "Pređite na režim unosa teksta",
"dateSeparator": ".",
"dateInputLabel": "Unesite datum",
"calendarModeButtonLabel": "Pređite na kalendar",
"dateRangePickerHelpText": "Izaberite period",
"datePickerHelpText": "Izaberite datum",
"saveButtonLabel": "Sačuvaj",
"dateOutOfRangeLabel": "Izvan perioda.",
"invalidDateRangeLabel": "Period je nevažeći.",
"invalidDateFormatLabel": "Format je nevažeći.",
"dateRangeEndDateSemanticLabel": "Datum završetka: $fullDate",
"dateRangeStartDateSemanticLabel": "Datum početka: $fullDate",
"dateRangeEndLabel": "Datum završetka",
"dateRangeStartLabel": "Datum početka",
"inputDateModeButtonLabel": "Pređite na unos",
"unspecifiedDateRange": "Period",
"unspecifiedDate": "Datum",
"selectYearSemanticsLabel": "Izaberite godinu",
"dateHelpText": "dd.mm.gggg.",
"moreButtonTooltip": "Još",
"remainingTextFieldCharacterCountFew": "Preostala su $remainingCount znaka",
"scriptCategory": "English-like",
"timeOfDayFormat": "HH:mm",
"selectedRowCountTitleFew": "Izabrane su $selectedRowCount stavke",
"openAppDrawerTooltip": "Otvorite meni za navigaciju",
"backButtonTooltip": "Nazad",
"closeButtonTooltip": "Zatvorite",
"deleteButtonTooltip": "Izbrišite",
"nextMonthTooltip": "Sledeći mesec",
"previousMonthTooltip": "Prethodni mesec",
"nextPageTooltip": "Sledeća stranica",
"previousPageTooltip": "Prethodna stranica",
"firstPageTooltip": "Prva stranica",
"lastPageTooltip": "Poslednja stranica",
"showMenuTooltip": "Prikaži meni",
"aboutListTileTitle": "O aplikaciji $applicationName",
"licensesPageTitle": "Licence",
"pageRowsInfoTitle": "$firstRow – $lastRow od $rowCount",
"pageRowsInfoTitleApproximate": "$firstRow – $lastRow od približno $rowCount",
"rowsPerPageTitle": "Redova na stranici:",
"tabLabel": "$tabIndex. kartica od $tabCount",
"selectedRowCountTitleOne": "Izabrana je 1 stavka",
"selectedRowCountTitleOther": "Izabrano je $selectedRowCount stavki",
"cancelButtonLabel": "Otkaži",
"closeButtonLabel": "Zatvori",
"continueButtonLabel": "Nastavi",
"copyButtonLabel": "Kopiraj",
"cutButtonLabel": "Iseci",
"okButtonLabel": "Potvrdi",
"pasteButtonLabel": "Nalepi",
"selectAllButtonLabel": "Izaberi sve",
"viewLicensesButtonLabel": "Prikaži licence",
"anteMeridiemAbbreviation": "pre podne",
"postMeridiemAbbreviation": "po podne",
"timePickerHourModeAnnouncement": "Izaberite sate",
"timePickerMinuteModeAnnouncement": "Izaberite minute",
"modalBarrierDismissLabel": "Odbaci",
"signedInLabel": "Prijavljeni ste",
"hideAccountsLabel": "Sakrij naloge",
"showAccountsLabel": "Prikaži naloge",
"drawerLabel": "Meni za navigaciju",
"popupMenuLabel": "Iskačući meni",
"dialogLabel": "Dijalog",
"alertDialogLabel": "Obaveštenje",
"searchFieldLabel": "Pretražite",
"reorderItemToStart": "Pomerite na početak",
"reorderItemToEnd": "Pomerite na kraj",
"reorderItemUp": "Pomerite nagore",
"reorderItemDown": "Pomerite nadole",
"reorderItemLeft": "Pomerite ulevo",
"reorderItemRight": "Pomerite udesno",
"expandedIconTapHint": "Skupi",
"collapsedIconTapHint": "Proširi",
"remainingTextFieldCharacterCountOne": "Preostao je 1 znak",
"remainingTextFieldCharacterCountOther": "Preostalo je $remainingCount znakova",
"refreshIndicatorSemanticLabel": "Osveži"
}
| flutter/packages/flutter_localizations/lib/src/l10n/material_sr_Latn.arb/0 | {
"file_path": "flutter/packages/flutter_localizations/lib/src/l10n/material_sr_Latn.arb",
"repo_id": "flutter",
"token_count": 2423
} | 777 |
{
"reorderItemToStart": "Skuif na die begin",
"reorderItemToEnd": "Skuif na die einde",
"reorderItemUp": "Skuif op",
"reorderItemDown": "Skuif af",
"reorderItemLeft": "Skuif na links",
"reorderItemRight": "Skuif na regs"
}
| flutter/packages/flutter_localizations/lib/src/l10n/widgets_af.arb/0 | {
"file_path": "flutter/packages/flutter_localizations/lib/src/l10n/widgets_af.arb",
"repo_id": "flutter",
"token_count": 99
} | 778 |
{
"reorderItemToStart": "Move to the start",
"@reorderItemToStart": {
"description": "The audio announcement to move an item in a Reorderable List to the start of the list."
},
"reorderItemToEnd": "Move to the end",
"@reorderItemToEnd": {
"description": "The audio announcement to move an item in a Reorderable List to the end of the list."
},
"reorderItemUp": "Move up",
"@reorderItemUp": {
"description": "The audio announcement to move an item in a Reorderable List up in the list when it is oriented vertically."
},
"reorderItemDown": "Move down",
"@reorderItemDown": {
"description": "The audio announcement to move an item in a Reorderable List down in the list when it is oriented vertically."
},
"reorderItemLeft": "Move left",
"@reorderItemLeft": {
"description": "The audio announcement to move an item in a Reorderable List left in the list when it is oriented horizontally."
},
"reorderItemRight": "Move right",
"@reorderItemRight": {
"description": "The audio announcement to move an item in a Reorderable List right in the list when it is oriented horizontally."
}
}
| flutter/packages/flutter_localizations/lib/src/l10n/widgets_en.arb/0 | {
"file_path": "flutter/packages/flutter_localizations/lib/src/l10n/widgets_en.arb",
"repo_id": "flutter",
"token_count": 336
} | 779 |
{
"reorderItemToStart": "انتقال به ابتدا",
"reorderItemToEnd": "انتقال به انتها",
"reorderItemUp": "انتقال به بالا",
"reorderItemDown": "انتقال به پایین",
"reorderItemLeft": "انتقال به راست",
"reorderItemRight": "انتقال به چپ"
}
| flutter/packages/flutter_localizations/lib/src/l10n/widgets_fa.arb/0 | {
"file_path": "flutter/packages/flutter_localizations/lib/src/l10n/widgets_fa.arb",
"repo_id": "flutter",
"token_count": 154
} | 780 |
{
"reorderItemToStart": "先頭に移動",
"reorderItemToEnd": "最後に移動",
"reorderItemUp": "上に移動",
"reorderItemDown": "下に移動",
"reorderItemLeft": "左に移動",
"reorderItemRight": "右に移動"
}
| flutter/packages/flutter_localizations/lib/src/l10n/widgets_ja.arb/0 | {
"file_path": "flutter/packages/flutter_localizations/lib/src/l10n/widgets_ja.arb",
"repo_id": "flutter",
"token_count": 118
} | 781 |
{
"reorderItemToStart": "Flytt til starten",
"reorderItemToEnd": "Flytt til slutten",
"reorderItemUp": "Flytt opp",
"reorderItemDown": "Flytt ned",
"reorderItemLeft": "Flytt til venstre",
"reorderItemRight": "Flytt til høyre"
}
| flutter/packages/flutter_localizations/lib/src/l10n/widgets_nb.arb/0 | {
"file_path": "flutter/packages/flutter_localizations/lib/src/l10n/widgets_nb.arb",
"repo_id": "flutter",
"token_count": 94
} | 782 |
{
"reorderItemToStart": "Померите на почетак",
"reorderItemToEnd": "Померите на крај",
"reorderItemUp": "Померите нагоре",
"reorderItemDown": "Померите надоле",
"reorderItemLeft": "Померите улево",
"reorderItemRight": "Померите удесно"
}
| flutter/packages/flutter_localizations/lib/src/l10n/widgets_sr.arb/0 | {
"file_path": "flutter/packages/flutter_localizations/lib/src/l10n/widgets_sr.arb",
"repo_id": "flutter",
"token_count": 169
} | 783 |
{
"reorderItemToStart": "Yisa ekuqaleni",
"reorderItemToEnd": "Yisa ekugcineni",
"reorderItemUp": "Iya phezulu",
"reorderItemDown": "Iya phansi",
"reorderItemLeft": "Hambisa kwesokunxele",
"reorderItemRight": "Yisa kwesokudla"
}
| flutter/packages/flutter_localizations/lib/src/l10n/widgets_zu.arb/0 | {
"file_path": "flutter/packages/flutter_localizations/lib/src/l10n/widgets_zu.arb",
"repo_id": "flutter",
"token_count": 109
} | 784 |
// Copyright 2014 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.
import 'package:flutter/widgets.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
for (final String language in kWidgetsSupportedLanguages) {
testWidgets('translations exist for $language', (WidgetTester tester) async {
final Locale locale = Locale(language);
expect(GlobalWidgetsLocalizations.delegate.isSupported(locale), isTrue);
final WidgetsLocalizations localizations = await GlobalWidgetsLocalizations.delegate.load(locale);
expect(localizations.reorderItemDown, isNotNull);
expect(localizations.reorderItemLeft, isNotNull);
expect(localizations.reorderItemRight, isNotNull);
expect(localizations.reorderItemToEnd, isNotNull);
expect(localizations.reorderItemToStart, isNotNull);
expect(localizations.reorderItemUp, isNotNull);
});
}
}
| flutter/packages/flutter_localizations/test/widgets/translations_test.dart/0 | {
"file_path": "flutter/packages/flutter_localizations/test/widgets/translations_test.dart",
"repo_id": "flutter",
"token_count": 346
} | 785 |
// Copyright 2014 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.
import 'dart:convert';
import 'dart:html' as html;
import 'dart:typed_data';
import 'package:matcher/expect.dart' show fail;
import 'goldens.dart';
/// An unsupported [GoldenFileComparator] that exists for API compatibility.
class LocalFileComparator extends GoldenFileComparator {
@override
Future<bool> compare(Uint8List imageBytes, Uri golden) {
throw UnsupportedError('LocalFileComparator is not supported on the web.');
}
@override
Future<void> update(Uri golden, Uint8List imageBytes) {
throw UnsupportedError('LocalFileComparator is not supported on the web.');
}
}
/// Returns whether [test] and [master] are pixel by pixel identical.
///
/// This method is not supported on the web and throws an [UnsupportedError]
/// when called.
Future<ComparisonResult> compareLists(List<int> test, List<int> master) async {
throw UnsupportedError('Golden testing is not supported on the web.');
}
/// The default [WebGoldenComparator] implementation for `flutter test`.
///
/// This comparator will send a request to the test server for golden comparison
/// which will then defer the comparison to [goldenFileComparator].
///
/// See also:
///
/// * [matchesGoldenFile], the function from [flutter_test] that invokes the
/// comparator.
class DefaultWebGoldenComparator extends WebGoldenComparator {
/// Creates a new [DefaultWebGoldenComparator] for the specified [testFile].
///
/// Golden file keys will be interpreted as file paths relative to the
/// directory in which [testFile] resides.
///
/// The [testFile] URL must represent a file.
DefaultWebGoldenComparator(this.testUri);
/// The test file currently being executed.
///
/// Golden file keys will be interpreted as file paths relative to the
/// directory in which this file resides.
Uri testUri;
@override
Future<bool> compare(double width, double height, Uri golden) async {
final String key = golden.toString();
final html.HttpRequest request = await html.HttpRequest.request(
'flutter_goldens',
method: 'POST',
sendData: json.encode(<String, Object>{
'testUri': testUri.toString(),
'key': key,
'width': width.round(),
'height': height.round(),
}),
);
final String response = request.response as String;
if (response == 'true') {
return true;
}
fail(response);
}
@override
Future<void> update(double width, double height, Uri golden) async {
// Update is handled on the server side, just use the same logic here
await compare(width, height, golden);
}
@override
Future<bool> compareBytes(Uint8List bytes, Uri golden) async {
final String key = golden.toString();
final String bytesEncoded = base64.encode(bytes);
final html.HttpRequest request = await html.HttpRequest.request(
'flutter_goldens',
method: 'POST',
sendData: json.encode(<String, Object>{
'testUri': testUri.toString(),
'key': key,
'bytes': bytesEncoded,
}),
);
final String response = request.response as String;
if (response == 'true') {
return true;
}
fail(response);
}
@override
Future<void> updateBytes(Uint8List bytes, Uri golden) async {
// Update is handled on the server side, just use the same logic here
await compareBytes(bytes, golden);
}
}
| flutter/packages/flutter_test/lib/src/_goldens_web.dart/0 | {
"file_path": "flutter/packages/flutter_test/lib/src/_goldens_web.dart",
"repo_id": "flutter",
"token_count": 1127
} | 786 |
// Copyright 2014 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.
/// This function can be used to call a const constructor in such a way as to
/// create a new instance rather than creating the common const instance.
///
/// ```dart
/// class A {
/// const A(this.i);
/// final int? i;
/// }
///
/// void main () {
/// // prevent prefer_const_constructors lint
/// A(nonconst(null));
///
/// // prevent prefer_const_declarations lint
/// final int? $null = nonconst(null);
/// final A a = nonconst(const A(null));
/// }
/// ```
T nonconst<T>(T t) => t;
| flutter/packages/flutter_test/lib/src/nonconst.dart/0 | {
"file_path": "flutter/packages/flutter_test/lib/src/nonconst.dart",
"repo_id": "flutter",
"token_count": 210
} | 787 |
name: flutter_test
environment:
sdk: '>=3.2.0-0 <4.0.0'
dependencies:
# To update these, use "flutter update-packages --force-upgrade".
#
# For detailed instructions, refer to:
# https://github.com/flutter/flutter/wiki/Updating-dependencies-in-Flutter
flutter:
sdk: flutter
# We depend on very specific internal implementation details of the
# 'test' package, which change between versions, so when upgrading
# this, make sure the tests are still running correctly.
test_api: 0.7.0
matcher: 0.12.16+1
# Used by golden file comparator
path: 1.9.0
# Testing utilities for dealing with async calls and time.
fake_async: 1.3.1
clock: 1.1.1
# We import stack_trace because the test packages uses it and we
# need to be able to unmangle the stack traces that it passed to
# stack_trace. See https://github.com/dart-lang/test/issues/590
stack_trace: 1.11.1
# Used by globalToLocal et al.
vector_math: 2.1.4
# Used to detect memory leaks with `testWidgets`.
leak_tracker_flutter_testing: 3.0.3
async: 2.11.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
boolean_selector: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
characters: 1.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
collection: 1.18.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
leak_tracker: 10.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
leak_tracker_testing: 3.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
material_color_utilities: 0.8.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
meta: 1.12.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
source_span: 1.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
stream_channel: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
string_scanner: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
term_glyph: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
vm_service: 14.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dev_dependencies:
file: 7.0.0
# PUBSPEC CHECKSUM: 3f1f
| flutter/packages/flutter_test/pubspec.yaml/0 | {
"file_path": "flutter/packages/flutter_test/pubspec.yaml",
"repo_id": "flutter",
"token_count": 853
} | 788 |
// Copyright 2014 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.
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
Future<void> testExecutable(FutureOr<void> Function() testMain) async {
reportTestException = (FlutterErrorDetails details, String testDescription) {
expect(details.exception, isA<StateError>());
expect((details.exception as StateError).message, 'foo');
expect(testDescription, 'custom exception reporter');
};
// The error that the test throws in [runTest] will be forwarded to our
// reporter and should not cause the test to fail.
await testMain();
}
void runTest() {
testWidgets('custom exception reporter', (WidgetTester tester) {
throw StateError('foo');
});
}
| flutter/packages/flutter_test/test/custom_exception_reporter/flutter_test_config.dart/0 | {
"file_path": "flutter/packages/flutter_test/test/custom_exception_reporter/flutter_test_config.dart",
"repo_id": "flutter",
"token_count": 258
} | 789 |
// Copyright 2014 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.
import 'dart:ui' show AccessibilityFeatures, Brightness, Display, FlutterView, Locale, PlatformDispatcher, VoidCallback;
import 'package:flutter/widgets.dart' show WidgetsBinding, WidgetsBindingObserver;
import 'package:flutter_test/flutter_test.dart';
import 'utils/fake_and_mock_utils.dart';
void main() {
test('TestPlatformDispatcher can handle new methods without breaking', () {
final dynamic testPlatformDispatcher = TestPlatformDispatcher(platformDispatcher: PlatformDispatcher.instance);
// ignore: avoid_dynamic_calls
expect(testPlatformDispatcher.someNewProperty, null);
});
testWidgets('TestPlatformDispatcher can fake locale', (WidgetTester tester) async {
verifyPropertyFaked<Locale>(
tester: tester,
realValue: PlatformDispatcher.instance.locale,
fakeValue: const Locale('fake_language_code'),
propertyRetriever: () {
return WidgetsBinding.instance.platformDispatcher.locale;
},
propertyFaker: (TestWidgetsFlutterBinding binding, Locale fakeValue) {
binding.platformDispatcher.localeTestValue = fakeValue;
},
);
});
testWidgets('TestPlatformDispatcher can fake locales', (WidgetTester tester) async {
verifyPropertyFaked<List<Locale>>(
tester: tester,
realValue: PlatformDispatcher.instance.locales,
fakeValue: <Locale>[const Locale('fake_language_code')],
propertyRetriever: () {
return WidgetsBinding.instance.platformDispatcher.locales;
},
propertyFaker: (TestWidgetsFlutterBinding binding, List<Locale> fakeValue) {
binding.platformDispatcher.localesTestValue = fakeValue;
},
);
});
testWidgets('TestPlatformDispatcher can fake text scale factor', (WidgetTester tester) async {
verifyPropertyFaked<double>(
tester: tester,
realValue: PlatformDispatcher.instance.textScaleFactor,
fakeValue: 2.5,
propertyRetriever: () {
return WidgetsBinding.instance.platformDispatcher.textScaleFactor;
},
propertyFaker: (TestWidgetsFlutterBinding binding, double fakeValue) {
binding.platformDispatcher.textScaleFactorTestValue = fakeValue;
},
);
});
testWidgets('TestPlatformDispatcher can fake clock format', (WidgetTester tester) async {
verifyPropertyFaked<bool>(
tester: tester,
realValue: PlatformDispatcher.instance.alwaysUse24HourFormat,
fakeValue: !PlatformDispatcher.instance.alwaysUse24HourFormat,
propertyRetriever: () {
return WidgetsBinding.instance.platformDispatcher.alwaysUse24HourFormat;
},
propertyFaker: (TestWidgetsFlutterBinding binding, bool fakeValue) {
binding.platformDispatcher.alwaysUse24HourFormatTestValue = fakeValue;
},
);
});
testWidgets('TestPlatformDispatcher can fake brieflyShowPassword', (WidgetTester tester) async {
verifyPropertyFaked<bool>(
tester: tester,
realValue: PlatformDispatcher.instance.brieflyShowPassword,
fakeValue: !PlatformDispatcher.instance.brieflyShowPassword,
propertyRetriever: () => WidgetsBinding.instance.platformDispatcher.brieflyShowPassword,
propertyFaker: (TestWidgetsFlutterBinding binding, bool fakeValue) {
binding.platformDispatcher.brieflyShowPasswordTestValue = fakeValue;
},
);
});
testWidgets('TestPlatformDispatcher can fake default route name', (WidgetTester tester) async {
verifyPropertyFaked<String>(
tester: tester,
realValue: PlatformDispatcher.instance.defaultRouteName,
fakeValue: 'fake_route',
propertyRetriever: () {
return WidgetsBinding.instance.platformDispatcher.defaultRouteName;
},
propertyFaker: (TestWidgetsFlutterBinding binding, String fakeValue) {
binding.platformDispatcher.defaultRouteNameTestValue = fakeValue;
},
);
});
testWidgets('TestPlatformDispatcher can fake accessibility features', (WidgetTester tester) async {
verifyPropertyFaked<AccessibilityFeatures>(
tester: tester,
realValue: PlatformDispatcher.instance.accessibilityFeatures,
fakeValue: const FakeAccessibilityFeatures(),
propertyRetriever: () {
return WidgetsBinding.instance.platformDispatcher.accessibilityFeatures;
},
propertyFaker: (TestWidgetsFlutterBinding binding, AccessibilityFeatures fakeValue) {
binding.platformDispatcher.accessibilityFeaturesTestValue = fakeValue;
},
);
});
testWidgets('TestPlatformDispatcher can fake platform brightness', (WidgetTester tester) async {
verifyPropertyFaked<Brightness>(
tester: tester,
realValue: Brightness.light,
fakeValue: Brightness.dark,
propertyRetriever: () {
return WidgetsBinding.instance.platformDispatcher.platformBrightness;
},
propertyFaker: (TestWidgetsFlutterBinding binding, Brightness fakeValue) {
binding.platformDispatcher.platformBrightnessTestValue = fakeValue;
},
);
});
testWidgets('TestPlatformDispatcher can clear out fake properties all at once', (WidgetTester tester) async {
final Locale originalLocale = PlatformDispatcher.instance.locale;
final double originalTextScaleFactor = PlatformDispatcher.instance.textScaleFactor;
final TestPlatformDispatcher testPlatformDispatcher = retrieveTestBinding(tester).platformDispatcher;
// Set fake values for window properties.
testPlatformDispatcher.localeTestValue = const Locale('foobar');
testPlatformDispatcher.textScaleFactorTestValue = 3.0;
// Erase fake window property values.
testPlatformDispatcher.clearAllTestValues();
// Verify that the window once again reports real property values.
expect(WidgetsBinding.instance.platformDispatcher.locale, originalLocale);
expect(WidgetsBinding.instance.platformDispatcher.textScaleFactor, originalTextScaleFactor);
});
testWidgets('TestPlatformDispatcher sends fake locales when WidgetsBindingObserver notifiers are called', (WidgetTester tester) async {
final List<Locale> defaultLocales = WidgetsBinding.instance.platformDispatcher.locales;
final TestObserver observer = TestObserver();
retrieveTestBinding(tester).addObserver(observer);
final List<Locale> expectedValue = <Locale>[const Locale('fake_language_code')];
retrieveTestBinding(tester).platformDispatcher.localesTestValue = expectedValue;
expect(observer.locales, equals(expectedValue));
retrieveTestBinding(tester).platformDispatcher.localesTestValue = defaultLocales;
});
testWidgets('TestPlatformDispatcher.view getter returns the implicit view', (WidgetTester tester) async {
expect(WidgetsBinding.instance.platformDispatcher.view(id: tester.view.viewId), same(tester.view));
});
// TODO(pdblasi-google): Removed this group of tests when the Display API is stable and supported on all platforms.
group('TestPlatformDispatcher with unsupported Display API', () {
testWidgets('can initialize with empty displays', (WidgetTester tester) async {
expect(() {
TestPlatformDispatcher(
platformDispatcher: _FakePlatformDispatcher(
displays: <Display>[],
views: <FlutterView>[
_FakeFlutterView(),
],
)
);
}, isNot(throwsA(anything)));
});
testWidgets('can initialize with mismatched displays', (WidgetTester tester) async {
expect(() {
TestPlatformDispatcher(
platformDispatcher: _FakePlatformDispatcher(
displays: <Display>[
_FakeDisplay(id: 2),
],
views: <FlutterView>[
_FakeFlutterView(display: _FakeDisplay(id: 1)),
],
)
);
}, isNot(throwsA(anything)));
});
testWidgets('creates test views for all views', (WidgetTester tester) async {
final PlatformDispatcher backingDispatcher = _FakePlatformDispatcher(
displays: <Display>[],
views: <FlutterView>[
_FakeFlutterView(),
],
);
final TestPlatformDispatcher testDispatcher = TestPlatformDispatcher(
platformDispatcher: backingDispatcher,
);
expect(testDispatcher.views.length, backingDispatcher.views.length);
});
group('creates TestFlutterViews', () {
testWidgets('that defaults to the correct devicePixelRatio', (WidgetTester tester) async {
const double expectedDpr = 2.5;
final TestPlatformDispatcher testDispatcher = TestPlatformDispatcher(
platformDispatcher: _FakePlatformDispatcher(
displays: <Display>[],
views: <FlutterView>[
_FakeFlutterView(devicePixelRatio: expectedDpr),
],
)
);
expect(testDispatcher.views.single.devicePixelRatio, expectedDpr);
});
testWidgets('with working devicePixelRatio setter', (WidgetTester tester) async {
const double expectedDpr = 2.5;
const double defaultDpr = 4;
final TestPlatformDispatcher testDispatcher = TestPlatformDispatcher(
platformDispatcher: _FakePlatformDispatcher(
displays: <Display>[],
views: <FlutterView>[
_FakeFlutterView(devicePixelRatio: defaultDpr),
],
)
);
testDispatcher.views.single.devicePixelRatio = expectedDpr;
expect(testDispatcher.views.single.devicePixelRatio, expectedDpr);
});
testWidgets('with working resetDevicePixelRatio', (WidgetTester tester) async {
const double changedDpr = 2.5;
const double defaultDpr = 4;
final TestPlatformDispatcher testDispatcher = TestPlatformDispatcher(
platformDispatcher: _FakePlatformDispatcher(
displays: <Display>[],
views: <FlutterView>[
_FakeFlutterView(devicePixelRatio: defaultDpr),
],
)
);
testDispatcher.views.single.devicePixelRatio = changedDpr;
testDispatcher.views.single.resetDevicePixelRatio();
expect(testDispatcher.views.single.devicePixelRatio, defaultDpr);
});
});
});
}
class TestObserver with WidgetsBindingObserver {
List<Locale>? locales;
@override
void didChangeLocales(List<Locale>? locales) {
this.locales = locales;
}
}
class _FakeDisplay extends Fake implements Display {
_FakeDisplay({this.id = 0});
@override
final int id;
}
class _FakeFlutterView extends Fake implements FlutterView {
_FakeFlutterView({
this.devicePixelRatio = 1,
Display? display,
}) : _display = display;
@override
final double devicePixelRatio;
// This emulates the PlatformDispatcher not having a display on the engine
// side. We don't have access to the `_displayId` used in the engine to try
// to find it and can't directly extend `FlutterView` to emulate it closer.
@override
Display get display {
assert(_display != null);
return _display!;
}
final Display? _display;
@override
final int viewId = 1;
}
class _FakePlatformDispatcher extends Fake implements PlatformDispatcher {
_FakePlatformDispatcher({required this.displays, required this.views});
@override
final Iterable<Display> displays;
@override
final Iterable<FlutterView> views;
@override
VoidCallback? onMetricsChanged;
}
| flutter/packages/flutter_test/test/platform_dispatcher_test.dart/0 | {
"file_path": "flutter/packages/flutter_test/test/platform_dispatcher_test.dart",
"repo_id": "flutter",
"token_count": 4168
} | 790 |
#!/usr/bin/env bash
# Copyright 2014 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.
# TODO(zanderso): refactor this and xcode_backend.sh into one script
# once iOS is using 'assemble'.
RunCommand() {
if [[ -n "$VERBOSE_SCRIPT_LOGGING" ]]; then
echo "♦ $*"
fi
"$@"
return $?
}
EchoError() {
echo "$@" 1>&2
}
ParseFlutterBuildMode() {
# Use FLUTTER_BUILD_MODE if it's set, otherwise use the Xcode build configuration name
# This means that if someone wants to use an Xcode build config other than Debug/Profile/Release,
# they _must_ set FLUTTER_BUILD_MODE so we know what type of artifact to build.
local build_mode="$(echo "${FLUTTER_BUILD_MODE:-${CONFIGURATION}}" | tr "[:upper:]" "[:lower:]")"
case "$build_mode" in
*release*) build_mode="release";;
*profile*) build_mode="profile";;
*debug*) build_mode="debug";;
*)
EchoError "========================================================================"
EchoError "ERROR: Unknown FLUTTER_BUILD_MODE: ${build_mode}."
EchoError "Valid values are 'Debug', 'Profile', or 'Release' (case insensitive)."
EchoError "This is controlled by the FLUTTER_BUILD_MODE environment variable."
EchoError "If that is not set, the CONFIGURATION environment variable is used."
EchoError ""
EchoError "You can fix this by either adding an appropriately named build"
EchoError "configuration, or adding an appropriate value for FLUTTER_BUILD_MODE to the"
EchoError ".xcconfig file for the current build configuration (${CONFIGURATION})."
EchoError "========================================================================"
exit -1;;
esac
echo "${build_mode}"
}
BuildApp() {
# Set the working directory to the project root
local project_path="${SOURCE_ROOT}/.."
RunCommand pushd "${project_path}" > /dev/null
# Set the target file.
local target_path="lib/main.dart"
if [[ -n "$FLUTTER_TARGET" ]]; then
target_path="${FLUTTER_TARGET}"
fi
# Use FLUTTER_BUILD_MODE if it's set, otherwise use the Xcode build configuration name
# This means that if someone wants to use an Xcode build config other than Debug/Profile/Release,
# they _must_ set FLUTTER_BUILD_MODE so we know what type of artifact to build.
local build_mode="$(ParseFlutterBuildMode)"
if [[ -n "$LOCAL_ENGINE" ]]; then
if [[ $(echo "$LOCAL_ENGINE" | tr "[:upper:]" "[:lower:]") != *"$build_mode"* ]]; then
EchoError "========================================================================"
EchoError "ERROR: Requested build with Flutter local engine at '${LOCAL_ENGINE}'"
EchoError "This engine is not compatible with FLUTTER_BUILD_MODE: '${build_mode}'."
EchoError "You can fix this by updating the LOCAL_ENGINE environment variable, or"
EchoError "by running:"
EchoError " flutter build macos --local-engine=host_${build_mode} --local-engine-host=host_${build_mode}"
EchoError "or"
EchoError " flutter build macos --local-engine=host_${build_mode}_unopt --local-engine-host=host_${build_mode}_unopt"
EchoError "========================================================================"
exit -1
fi
fi
if [[ -n "$LOCAL_ENGINE_HOST" ]]; then
if [[ $(echo "$LOCAL_ENGINE_HOST" | tr "[:upper:]" "[:lower:]") != *"$build_mode"* ]]; then
EchoError "========================================================================"
EchoError "ERROR: Requested build with Flutter local engine at '${LOCAL_ENGINE_HOST}'"
EchoError "This engine is not compatible with FLUTTER_BUILD_MODE: '${build_mode}'."
EchoError "You can fix this by updating the LOCAL_ENGINE_HOST environment variable, or"
EchoError "by running:"
EchoError " flutter build macos --local-engine=host_${build_mode} --local-engine-host=host_${build_mode}"
EchoError "or"
EchoError " flutter build macos --local-engine=host_${build_mode}_unopt --local-engine-host=host_${build_mode}_unopt"
EchoError "========================================================================"
exit -1
fi
fi
# The path where the input/output xcfilelists are stored. These are used by xcode
# to conditionally skip this script phase if neither have changed.
local ephemeral_dir="${SOURCE_ROOT}/Flutter/ephemeral"
local build_inputs_path="${ephemeral_dir}/FlutterInputs.xcfilelist"
local build_outputs_path="${ephemeral_dir}/FlutterOutputs.xcfilelist"
# Construct the "flutter assemble" argument array. Arguments should be added
# as quoted string elements of the flutter_args array, otherwise an argument
# (like a path) with spaces in it might be interpreted as two separate
# arguments.
local flutter_args=("${FLUTTER_ROOT}/bin/flutter")
if [[ -n "$VERBOSE_SCRIPT_LOGGING" ]]; then
flutter_args+=('--verbose')
fi
if [[ -n "$FLUTTER_ENGINE" ]]; then
flutter_args+=("--local-engine-src-path=${FLUTTER_ENGINE}")
fi
if [[ -n "$LOCAL_ENGINE" ]]; then
flutter_args+=("--local-engine=${LOCAL_ENGINE}")
fi
if [[ -n "$LOCAL_ENGINE_HOST" ]]; then
flutter_args+=("--local-engine-host=${LOCAL_ENGINE_HOST}")
fi
flutter_args+=(
"assemble"
"--no-version-check"
"-dTargetPlatform=darwin"
"-dDarwinArchs=${ARCHS}"
"-dTargetFile=${target_path}"
"-dBuildMode=${build_mode}"
"-dTreeShakeIcons=${TREE_SHAKE_ICONS}"
"-dDartObfuscation=${DART_OBFUSCATION}"
"-dSplitDebugInfo=${SPLIT_DEBUG_INFO}"
"-dTrackWidgetCreation=${TRACK_WIDGET_CREATION}"
"-dAction=${ACTION}"
"-dFrontendServerStarterPath=${FRONTEND_SERVER_STARTER_PATH}"
"--DartDefines=${DART_DEFINES}"
"--ExtraGenSnapshotOptions=${EXTRA_GEN_SNAPSHOT_OPTIONS}"
"--ExtraFrontEndOptions=${EXTRA_FRONT_END_OPTIONS}"
"--build-inputs=${build_inputs_path}"
"--build-outputs=${build_outputs_path}"
"--output=${BUILT_PRODUCTS_DIR}"
)
if [[ -n "$FLAVOR" ]]; then
flutter_args+=("-dFlavor=${FLAVOR}")
fi
if [[ -n "$PERFORMANCE_MEASUREMENT_FILE" ]]; then
flutter_args+=("--performance-measurement-file=${PERFORMANCE_MEASUREMENT_FILE}")
fi
if [[ -n "$BUNDLE_SKSL_PATH" ]]; then
flutter_args+=("-dBundleSkSLPath=${BUNDLE_SKSL_PATH}")
fi
if [[ -n "$CODE_SIZE_DIRECTORY" ]]; then
flutter_args+=("-dCodeSizeDirectory=${CODE_SIZE_DIRECTORY}")
fi
flutter_args+=("${build_mode}_macos_bundle_flutter_assets")
RunCommand "${flutter_args[@]}"
}
# Adds the App.framework as an embedded binary, the flutter_assets as
# resources, and the native assets.
EmbedFrameworks() {
# Embed App.framework from Flutter into the app (after creating the Frameworks directory
# if it doesn't already exist).
local xcode_frameworks_dir="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
RunCommand mkdir -p -- "${xcode_frameworks_dir}"
RunCommand rsync -av --delete --filter "- .DS_Store" "${BUILT_PRODUCTS_DIR}/App.framework" "${xcode_frameworks_dir}"
# Embed the actual FlutterMacOS.framework that the Flutter app expects to run against,
# which could be a local build or an arch/type specific build.
# Copy Xcode behavior and don't copy over headers or modules.
RunCommand rsync -av --delete --filter "- .DS_Store" --filter "- Headers" --filter "- Modules" "${BUILT_PRODUCTS_DIR}/FlutterMacOS.framework" "${xcode_frameworks_dir}/"
# Sign the binaries we moved.
if [[ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" ]]; then
RunCommand codesign --force --verbose --sign "${EXPANDED_CODE_SIGN_IDENTITY}" -- "${xcode_frameworks_dir}/App.framework/App"
RunCommand codesign --force --verbose --sign "${EXPANDED_CODE_SIGN_IDENTITY}" -- "${xcode_frameworks_dir}/FlutterMacOS.framework/FlutterMacOS"
fi
# Copy the native assets. These do not have to be codesigned here because,
# they are already codesigned in buildNativeAssetsMacOS.
local project_path="${SOURCE_ROOT}/.."
if [[ -n "$FLUTTER_APPLICATION_PATH" ]]; then
project_path="${FLUTTER_APPLICATION_PATH}"
fi
local native_assets_path="${project_path}/${FLUTTER_BUILD_DIR}/native_assets/macos/"
if [[ -d "$native_assets_path" ]]; then
RunCommand rsync -av --filter "- .DS_Store" --filter "- native_assets.yaml" "${native_assets_path}" "${xcode_frameworks_dir}"
fi
}
# Main entry point.
if [[ $# == 0 ]]; then
# Unnamed entry point defaults to build.
BuildApp
else
case $1 in
"build")
BuildApp ;;
"embed")
EmbedFrameworks ;;
esac
fi
| flutter/packages/flutter_tools/bin/macos_assemble.sh/0 | {
"file_path": "flutter/packages/flutter_tools/bin/macos_assemble.sh",
"repo_id": "flutter",
"token_count": 3012
} | 791 |
# Build the ephemeral app in a module project.
# Prevents: Warning: library class <plugin-package> depends on program class io.flutter.plugin.**
# This is due to plugins (libraries) depending on the embedding (the program jar)
-dontwarn io.flutter.plugin.**
# The android.** package is provided by the OS at runtime.
-dontwarn android.**
| flutter/packages/flutter_tools/gradle/flutter_proguard_rules.pro/0 | {
"file_path": "flutter/packages/flutter_tools/gradle/flutter_proguard_rules.pro",
"repo_id": "flutter",
"token_count": 97
} | 792 |
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="catalog - app_bar_bottom" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/examples/catalog/lib/app_bar_bottom.dart" />
<method />
</configuration>
</component> | flutter/packages/flutter_tools/ide_templates/intellij/.idea/runConfigurations/catalog___app_bar_bottom.xml.copy.tmpl/0 | {
"file_path": "flutter/packages/flutter_tools/ide_templates/intellij/.idea/runConfigurations/catalog___app_bar_bottom.xml.copy.tmpl",
"repo_id": "flutter",
"token_count": 98
} | 793 |
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="layers - spinning_square" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/examples/layers/widgets/spinning_square.dart" />
<method />
</configuration>
</component> | flutter/packages/flutter_tools/ide_templates/intellij/.idea/runConfigurations/layers___spinning_square.xml.copy.tmpl/0 | {
"file_path": "flutter/packages/flutter_tools/ide_templates/intellij/.idea/runConfigurations/layers___spinning_square.xml.copy.tmpl",
"repo_id": "flutter",
"token_count": 96
} | 794 |
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="platform_channel_swift" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/examples/platform_channel_swift/lib/main.dart" />
<method />
</configuration>
</component> | flutter/packages/flutter_tools/ide_templates/intellij/.idea/runConfigurations/platform_channel_swift.xml.copy.tmpl/0 | {
"file_path": "flutter/packages/flutter_tools/ide_templates/intellij/.idea/runConfigurations/platform_channel_swift.xml.copy.tmpl",
"repo_id": "flutter",
"token_count": 96
} | 795 |
// Copyright 2014 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.
import 'package:meta/meta.dart';
import '../base/error_handling_io.dart';
import '../base/file_system.dart';
import '../base/process.dart';
import '../base/terminal.dart';
import '../globals.dart' as globals;
import '../project.dart';
import '../reporting/reporting.dart';
import 'gradle_utils.dart';
typedef GradleErrorTest = bool Function(String);
/// A Gradle error handled by the tool.
class GradleHandledError {
const GradleHandledError({
required this.test,
required this.handler,
this.eventLabel,
});
/// The test function.
/// Returns [true] if the current error message should be handled.
final GradleErrorTest test;
/// The handler function.
final Future<GradleBuildStatus> Function({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) handler;
/// The [BuildEvent] label is named gradle-[eventLabel].
/// If not empty, the build event is logged along with
/// additional metadata such as the attempt number.
final String? eventLabel;
}
/// The status of the Gradle build.
enum GradleBuildStatus {
/// The tool cannot recover from the failure and should exit.
exit,
/// The tool can retry the exact same build.
retry,
}
/// Returns a simple test function that evaluates to `true` if at least one of
/// `errorMessages` is contained in the error message.
GradleErrorTest _lineMatcher(List<String> errorMessages) {
return (String line) {
return errorMessages.any((String errorMessage) => line.contains(errorMessage));
};
}
/// The list of Gradle errors that the tool can handle.
///
/// The handlers are executed in the order in which they appear in the list.
///
/// Only the first error handler for which the [test] function returns [true]
/// is handled. As a result, sort error handlers based on how strict the [test]
/// function is to eliminate false positives.
final List<GradleHandledError> gradleErrors = <GradleHandledError>[
licenseNotAcceptedHandler,
networkErrorHandler,
permissionDeniedErrorHandler,
flavorUndefinedHandler,
r8FailureHandler,
minSdkVersionHandler,
transformInputIssueHandler,
lockFileDepMissingHandler,
incompatibleKotlinVersionHandler,
minCompileSdkVersionHandler,
jvm11RequiredHandler,
outdatedGradleHandler,
sslExceptionHandler,
zipExceptionHandler,
incompatibleJavaAndGradleVersionsHandler,
remoteTerminatedHandshakeHandler,
couldNotOpenCacheDirectoryHandler,
];
const String _boxTitle = 'Flutter Fix';
// Permission defined error message.
@visibleForTesting
final GradleHandledError permissionDeniedErrorHandler = GradleHandledError(
test: _lineMatcher(const <String>[
'Permission denied',
]),
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
globals.printBox(
'${globals.logger.terminal.warningMark} Gradle does not have execution permission.\n'
'You should change the ownership of the project directory to your user, '
'or move the project to a directory with execute permissions.',
title: _boxTitle,
);
return GradleBuildStatus.exit;
},
eventLabel: 'permission-denied',
);
/// Gradle crashes for several known reasons when downloading that are not
/// actionable by Flutter.
@visibleForTesting
final GradleHandledError networkErrorHandler = GradleHandledError(
test: _lineMatcher(const <String>[
"> Could not get resource 'http",
'java.io.FileNotFoundException',
'java.io.FileNotFoundException: https://downloads.gradle.org',
'java.io.IOException: Server returned HTTP response code: 502',
'java.io.IOException: Unable to tunnel through proxy',
'java.lang.RuntimeException: Timeout of',
'java.net.ConnectException: Connection timed out',
'java.net.SocketException: Connection reset',
'java.util.zip.ZipException: error in opening zip file',
'javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake',
]),
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
globals.printError(
'${globals.logger.terminal.warningMark} '
'Gradle threw an error while downloading artifacts from the network.'
);
return GradleBuildStatus.retry;
},
eventLabel: 'network',
);
/// Handles corrupted jar or other types of zip files.
///
/// If a terminal is attached, this handler prompts the user if they would like to
/// delete the $HOME/.gradle directory prior to retrying the build.
///
/// If this handler runs on a bot (e.g. a CI bot), the $HOME/.gradle is automatically deleted.
///
/// See also:
/// * https://github.com/flutter/flutter/issues/51195
/// * https://github.com/flutter/flutter/issues/89959
/// * https://docs.gradle.org/current/userguide/directory_layout.html#dir:gradle_user_home
@visibleForTesting
final GradleHandledError zipExceptionHandler = GradleHandledError(
test: _lineMatcher(const <String>[
'java.util.zip.ZipException: error in opening zip file',
]),
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
globals.printError(
'${globals.logger.terminal.warningMark} '
'Your .gradle directory under the home directory might be corrupted.'
);
bool shouldDeleteUserGradle = await globals.botDetector.isRunningOnBot;
if (!shouldDeleteUserGradle && globals.terminal.stdinHasTerminal) {
try {
final String selection = await globals.terminal.promptForCharInput(
<String>['y', 'n'],
logger: globals.logger,
prompt: 'Do you want to delete the .gradle directory under the home directory?',
defaultChoiceIndex: 0,
);
shouldDeleteUserGradle = selection == 'y';
} on StateError catch (e) {
globals.printError(
e.message,
indent: 0,
);
}
}
if (shouldDeleteUserGradle) {
final String? homeDir = globals.platform.environment['HOME'];
if (homeDir == null) {
globals.logger.printStatus("Could not delete .gradle directory because there isn't a HOME env variable");
return GradleBuildStatus.retry;
}
final Directory userGradle = globals.fs.directory(globals.fs.path.join(homeDir, '.gradle'));
globals.logger.printStatus('Deleting ${userGradle.path}');
try {
ErrorHandlingFileSystem.deleteIfExists(userGradle, recursive: true);
} on FileSystemException catch (err) {
globals.printTrace('Failed to delete Gradle cache: $err');
}
}
return GradleBuildStatus.retry;
},
eventLabel: 'zip-exception',
);
// R8 failure.
@visibleForTesting
final GradleHandledError r8FailureHandler = GradleHandledError(
test: _lineMatcher(const <String>[
'com.android.tools.r8',
]),
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
globals.printBox(
'${globals.logger.terminal.warningMark} The shrinker may have failed to optimize the Java bytecode.\n'
'To disable the shrinker, pass the `--no-shrink` flag to this command.\n'
'To learn more, see: https://developer.android.com/studio/build/shrink-code',
title: _boxTitle,
);
return GradleBuildStatus.exit;
},
eventLabel: 'r8',
);
/// Handle Gradle error thrown when Gradle needs to download additional
/// Android SDK components (e.g. Platform Tools), and the license
/// for that component has not been accepted.
@visibleForTesting
final GradleHandledError licenseNotAcceptedHandler = GradleHandledError(
test: _lineMatcher(const <String>[
'You have not accepted the license agreements of the following SDK components',
]),
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
const String licenseNotAcceptedMatcher =
r'You have not accepted the license agreements of the following SDK components:\s*\[(.+)\]';
final RegExp licenseFailure = RegExp(licenseNotAcceptedMatcher, multiLine: true);
final Match? licenseMatch = licenseFailure.firstMatch(line);
globals.printBox(
'${globals.logger.terminal.warningMark} Unable to download needed Android SDK components, as the '
'following licenses have not been accepted: '
'${licenseMatch?.group(1)}\n\n'
'To resolve this, please run the following command in a Terminal:\n'
'flutter doctor --android-licenses',
title: _boxTitle,
);
return GradleBuildStatus.exit;
},
eventLabel: 'license-not-accepted',
);
final RegExp _undefinedTaskPattern = RegExp(r'Task .+ not found in root project.');
final RegExp _assembleTaskPattern = RegExp(r'assemble(\S+)');
/// Handler when a flavor is undefined.
@visibleForTesting
final GradleHandledError flavorUndefinedHandler = GradleHandledError(
test: (String line) {
return _undefinedTaskPattern.hasMatch(line);
},
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
final RunResult tasksRunResult = await globals.processUtils.run(
<String>[
globals.gradleUtils!.getExecutable(project),
'app:tasks' ,
'--all',
'--console=auto',
],
throwOnError: true,
workingDirectory: project.android.hostAppGradleRoot.path,
environment: globals.java?.environment,
);
// Extract build types and product flavors.
final Set<String> variants = <String>{};
for (final String task in tasksRunResult.stdout.split('\n')) {
final Match? match = _assembleTaskPattern.matchAsPrefix(task);
if (match != null) {
final String variant = match.group(1)!.toLowerCase();
if (!variant.endsWith('test')) {
variants.add(variant);
}
}
}
final Set<String> productFlavors = <String>{};
for (final String variant1 in variants) {
for (final String variant2 in variants) {
if (variant2.startsWith(variant1) && variant2 != variant1) {
final String buildType = variant2.substring(variant1.length);
if (variants.contains(buildType)) {
productFlavors.add(variant1);
}
}
}
}
final String errorMessage = '${globals.logger.terminal.warningMark} Gradle project does not define a task suitable for the requested build.';
final File buildGradle = project.directory.childDirectory('android').childDirectory('app').childFile('build.gradle');
if (productFlavors.isEmpty) {
globals.printBox(
'$errorMessage\n\n'
'The ${buildGradle.absolute.path} file does not define '
'any custom product flavors. '
'You cannot use the --flavor option.',
title: _boxTitle,
);
} else {
globals.printBox(
'$errorMessage\n\n'
'The ${buildGradle.absolute.path} file defines product '
'flavors: ${productFlavors.join(', ')}. '
'You must specify a --flavor option to select one of them.',
title: _boxTitle,
);
}
return GradleBuildStatus.exit;
},
eventLabel: 'flavor-undefined',
);
final RegExp _minSdkVersionPattern = RegExp(r'uses-sdk:minSdkVersion ([0-9]+) cannot be smaller than version ([0-9]+) declared in library \[\:(.+)\]');
/// Handler when a plugin requires a higher Android API level.
@visibleForTesting
final GradleHandledError minSdkVersionHandler = GradleHandledError(
test: (String line) {
return _minSdkVersionPattern.hasMatch(line);
},
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
final File gradleFile = project.directory
.childDirectory('android')
.childDirectory('app')
.childFile('build.gradle');
final Match? minSdkVersionMatch = _minSdkVersionPattern.firstMatch(line);
assert(minSdkVersionMatch?.groupCount == 3);
final String textInBold = globals.logger.terminal.bolden(
'Fix this issue by adding the following to the file ${gradleFile.path}:\n'
'android {\n'
' defaultConfig {\n'
' minSdkVersion ${minSdkVersionMatch?.group(2)}\n'
' }\n'
'}\n'
);
globals.printBox(
'The plugin ${minSdkVersionMatch?.group(3)} requires a higher Android SDK version.\n'
'$textInBold\n'
'Following this change, your app will not be available to users running Android SDKs below ${minSdkVersionMatch?.group(2)}.\n'
'Consider searching for a version of this plugin that supports these lower versions of the Android SDK instead.\n'
'For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration',
title: _boxTitle,
);
return GradleBuildStatus.exit;
},
eventLabel: 'plugin-min-sdk',
);
/// Handler when https://issuetracker.google.com/issues/141126614 or
/// https://github.com/flutter/flutter/issues/58247 is triggered.
@visibleForTesting
final GradleHandledError transformInputIssueHandler = GradleHandledError(
test: (String line) {
return line.contains('https://issuetracker.google.com/issues/158753935');
},
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
final File gradleFile = project.directory
.childDirectory('android')
.childDirectory('app')
.childFile('build.gradle');
final String textInBold = globals.logger.terminal.bolden(
'Fix this issue by adding the following to the file ${gradleFile.path}:\n'
'android {\n'
' lintOptions {\n'
' checkReleaseBuilds false\n'
' }\n'
'}'
);
globals.printBox(
'This issue appears to be https://github.com/flutter/flutter/issues/58247.\n'
'$textInBold',
title: _boxTitle,
);
return GradleBuildStatus.exit;
},
eventLabel: 'transform-input-issue',
);
/// Handler when a dependency is missing in the lockfile.
@visibleForTesting
final GradleHandledError lockFileDepMissingHandler = GradleHandledError(
test: (String line) {
return line.contains('which is not part of the dependency lock state');
},
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
final File gradleFile = project.directory
.childDirectory('android')
.childFile('build.gradle');
final String textInBold = globals.logger.terminal.bolden(
'To regenerate the lockfiles run: `./gradlew :generateLockfiles` in ${gradleFile.path}\n'
'To remove dependency locking, remove the `dependencyLocking` from ${gradleFile.path}'
);
globals.printBox(
'You need to update the lockfile, or disable Gradle dependency locking.\n'
'$textInBold',
title: _boxTitle,
);
return GradleBuildStatus.exit;
},
eventLabel: 'lock-dep-issue',
);
@visibleForTesting
final GradleHandledError incompatibleKotlinVersionHandler = GradleHandledError(
test: _lineMatcher(const <String>[
'was compiled with an incompatible version of Kotlin',
]),
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
final File gradleFile = project.directory
.childDirectory('android')
.childFile('build.gradle');
globals.printBox(
'${globals.logger.terminal.warningMark} Your project requires a newer version of the Kotlin Gradle plugin.\n'
'Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then update ${gradleFile.path}:\n'
"ext.kotlin_version = '<latest-version>'",
title: _boxTitle,
);
return GradleBuildStatus.exit;
},
eventLabel: 'incompatible-kotlin-version',
);
final RegExp _outdatedGradlePattern = RegExp(r'The current Gradle version (.+) is not compatible with the Kotlin Gradle plugin');
@visibleForTesting
final GradleHandledError outdatedGradleHandler = GradleHandledError(
test: _outdatedGradlePattern.hasMatch,
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
final File gradleFile = project.directory
.childDirectory('android')
.childFile('build.gradle');
final File gradlePropertiesFile = project.directory
.childDirectory('android')
.childDirectory('gradle')
.childDirectory('wrapper')
.childFile('gradle-wrapper.properties');
globals.printBox(
'${globals.logger.terminal.warningMark} Your project needs to upgrade Gradle and the Android Gradle plugin.\n\n'
'To fix this issue, replace the following content:\n'
'${gradleFile.path}:\n'
' ${globals.terminal.color("- classpath 'com.android.tools.build:gradle:<current-version>'", TerminalColor.red)}\n'
' ${globals.terminal.color("+ classpath 'com.android.tools.build:gradle:$templateAndroidGradlePluginVersion'", TerminalColor.green)}\n'
'${gradlePropertiesFile.path}:\n'
' ${globals.terminal.color('- https://services.gradle.org/distributions/gradle-<current-version>-all.zip', TerminalColor.red)}\n'
' ${globals.terminal.color('+ https://services.gradle.org/distributions/gradle-$templateDefaultGradleVersion-all.zip', TerminalColor.green)}',
title: _boxTitle,
);
return GradleBuildStatus.exit;
},
eventLabel: 'outdated-gradle-version',
);
final RegExp _minCompileSdkVersionPattern = RegExp(r'The minCompileSdk \(([0-9]+)\) specified in a');
@visibleForTesting
final GradleHandledError minCompileSdkVersionHandler = GradleHandledError(
test: _minCompileSdkVersionPattern.hasMatch,
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
final Match? minCompileSdkVersionMatch = _minCompileSdkVersionPattern.firstMatch(line);
assert(minCompileSdkVersionMatch?.groupCount == 1);
final File gradleFile = project.directory
.childDirectory('android')
.childDirectory('app')
.childFile('build.gradle');
globals.printBox(
'${globals.logger.terminal.warningMark} Your project requires a higher compileSdk version.\n'
'Fix this issue by bumping the compileSdk version in ${gradleFile.path}:\n'
'android {\n'
' compileSdk ${minCompileSdkVersionMatch?.group(1)}\n'
'}',
title: _boxTitle,
);
return GradleBuildStatus.exit;
},
eventLabel: 'min-compile-sdk-version',
);
@visibleForTesting
final GradleHandledError jvm11RequiredHandler = GradleHandledError(
test: (String line) {
return line.contains('Android Gradle plugin requires Java 11 to run');
},
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
globals.printBox(
'${globals.logger.terminal.warningMark} You need Java 11 or higher to build your app with this version of Gradle.\n\n'
'To get Java 11, update to the latest version of Android Studio on https://developer.android.com/studio/install.\n\n'
'To check the Java version used by Flutter, run `flutter doctor -v`.',
title: _boxTitle,
);
return GradleBuildStatus.exit;
},
eventLabel: 'java11-required',
);
/// Handles SSL exceptions: https://github.com/flutter/flutter/issues/104628
@visibleForTesting
final GradleHandledError sslExceptionHandler = GradleHandledError(
test: _lineMatcher(const <String>[
'javax.net.ssl.SSLException: Tag mismatch!',
'javax.crypto.AEADBadTagException: Tag mismatch!',
]),
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
globals.printError(
'${globals.logger.terminal.warningMark} '
'Gradle threw an error while downloading artifacts from the network.'
);
return GradleBuildStatus.retry;
},
eventLabel: 'ssl-exception-tag-mismatch',
);
/// If an incompatible Java and Gradle versions error is caught, we expect an
/// error specifying that the Java major class file version, one of
/// https://javaalmanac.io/bytecode/versions/, is unsupported by Gradle.
final RegExp _unsupportedClassFileMajorVersionPattern = RegExp(r'Unsupported class file major version\s+\d+');
@visibleForTesting
final GradleHandledError incompatibleJavaAndGradleVersionsHandler = GradleHandledError(
test: (String line) {
return _unsupportedClassFileMajorVersionPattern.hasMatch(line);
},
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
final File gradlePropertiesFile = project.directory
.childDirectory('android')
.childDirectory('gradle')
.childDirectory('wrapper')
.childFile('gradle-wrapper.properties');
// TODO(reidbaker): Replace URL with constant defined in
// https://github.com/flutter/flutter/pull/123916.
globals.printBox(
"${globals.logger.terminal.warningMark} Your project's Gradle version "
'is incompatible with the Java version that Flutter is using for Gradle.\n\n'
'If you recently upgraded Android Studio, consult the migration guide '
'at docs.flutter.dev/go/android-java-gradle-error.\n\n'
'Otherwise, to fix this issue, first, check the Java version used by Flutter by '
'running `flutter doctor --verbose`.\n\n'
'Then, update the Gradle version specified in ${gradlePropertiesFile.path} '
'to be compatible with that Java version. '
'See the link below for more information on compatible Java/Gradle versions:\n'
'https://docs.gradle.org/current/userguide/compatibility.html#java\n\n',
title: _boxTitle,
);
return GradleBuildStatus.exit;
},
eventLabel: 'incompatible-java-gradle-version',
);
@visibleForTesting
final GradleHandledError remoteTerminatedHandshakeHandler = GradleHandledError(
test: (String line) => line.contains('Remote host terminated the handshake'),
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
globals.printError(
'${globals.logger.terminal.warningMark} '
'Gradle threw an error while downloading artifacts from the network.'
);
return GradleBuildStatus.retry;
},
eventLabel: 'remote-terminated-handshake',
);
@visibleForTesting
final GradleHandledError couldNotOpenCacheDirectoryHandler = GradleHandledError(
test: (String line) => line.contains('> Could not open cache directory '),
handler: ({
required String line,
required FlutterProject project,
required bool usesAndroidX,
}) async {
globals.printError(
'${globals.logger.terminal.warningMark} '
'Gradle threw an error while resolving dependencies.'
);
return GradleBuildStatus.retry;
},
eventLabel: 'could-not-open-cache-directory',
);
| flutter/packages/flutter_tools/lib/src/android/gradle_errors.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/android/gradle_errors.dart",
"repo_id": "flutter",
"token_count": 8023
} | 796 |
// Copyright 2014 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.
/// An indirection around our mustache templating system to avoid a
/// dependency on mustache..
abstract class TemplateRenderer {
const TemplateRenderer();
String renderString(String template, dynamic context, {bool htmlEscapeValues = false});
}
| flutter/packages/flutter_tools/lib/src/base/template.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/base/template.dart",
"repo_id": "flutter",
"token_count": 103
} | 797 |
// Copyright 2014 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.
import 'package:pool/pool.dart';
import '../../artifacts.dart';
import '../../asset.dart';
import '../../base/common.dart';
import '../../base/file_system.dart';
import '../../base/logger.dart';
import '../../build_info.dart';
import '../../convert.dart';
import '../../devfs.dart';
import '../../flutter_manifest.dart';
import '../build_system.dart';
import '../depfile.dart';
import '../tools/asset_transformer.dart';
import '../tools/scene_importer.dart';
import '../tools/shader_compiler.dart';
import 'common.dart';
import 'icon_tree_shaker.dart';
/// A helper function to copy an asset bundle into an [environment]'s output
/// directory.
///
/// Throws [Exception] if [AssetBundle.build] returns a non-zero exit code.
///
/// [additionalContent] may contain additional DevFS entries that will be
/// included in the final bundle, but not the AssetManifest.json file.
///
/// Returns a [Depfile] containing all assets used in the build.
Future<Depfile> copyAssets(
Environment environment,
Directory outputDirectory, {
Map<String, DevFSContent> additionalContent = const <String, DevFSContent>{},
required TargetPlatform targetPlatform,
BuildMode? buildMode,
List<File> additionalInputs = const <File>[],
String? flavor,
}) async {
// Check for an SkSL bundle.
final String? shaderBundlePath = environment.defines[kBundleSkSLPath] ?? environment.inputs[kBundleSkSLPath];
final DevFSContent? skslBundle = processSkSLBundle(
shaderBundlePath,
engineVersion: environment.engineVersion,
fileSystem: environment.fileSystem,
logger: environment.logger,
targetPlatform: targetPlatform,
);
final File pubspecFile = environment.projectDir.childFile('pubspec.yaml');
// Only the default asset bundle style is supported in assemble.
final AssetBundle assetBundle = AssetBundleFactory.defaultInstance(
logger: environment.logger,
fileSystem: environment.fileSystem,
platform: environment.platform,
splitDeferredAssets: buildMode != BuildMode.debug && buildMode != BuildMode.jitRelease,
).createBundle();
final int resultCode = await assetBundle.build(
manifestPath: pubspecFile.path,
packagesPath: environment.projectDir.childFile('.packages').path,
deferredComponentsEnabled: environment.defines[kDeferredComponents] == 'true',
targetPlatform: targetPlatform,
flavor: flavor,
);
if (resultCode != 0) {
throw Exception('Failed to bundle asset files.');
}
final Pool pool = Pool(kMaxOpenFiles);
final List<File> inputs = <File>[
// An asset manifest with no assets would have zero inputs if not
// for this pubspec file.
pubspecFile,
...additionalInputs,
];
final List<File> outputs = <File>[];
final IconTreeShaker iconTreeShaker = IconTreeShaker(
environment,
assetBundle.entries[kFontManifestJson]?.content as DevFSStringContent?,
processManager: environment.processManager,
logger: environment.logger,
fileSystem: environment.fileSystem,
artifacts: environment.artifacts,
targetPlatform: targetPlatform,
);
final ShaderCompiler shaderCompiler = ShaderCompiler(
processManager: environment.processManager,
logger: environment.logger,
fileSystem: environment.fileSystem,
artifacts: environment.artifacts,
);
final SceneImporter sceneImporter = SceneImporter(
processManager: environment.processManager,
logger: environment.logger,
fileSystem: environment.fileSystem,
artifacts: environment.artifacts,
);
final AssetTransformer assetTransformer = AssetTransformer(
processManager: environment.processManager,
fileSystem: environment.fileSystem,
dartBinaryPath: environment.artifacts.getArtifactPath(Artifact.engineDartBinary),
);
final Map<String, AssetBundleEntry> assetEntries = <String, AssetBundleEntry>{
...assetBundle.entries,
...additionalContent.map((String key, DevFSContent value) {
return MapEntry<String, AssetBundleEntry>(
key,
AssetBundleEntry(
value,
kind: AssetKind.regular,
transformers: const <AssetTransformerEntry>[],
),
);
}),
if (skslBundle != null)
kSkSLShaderBundlePath: AssetBundleEntry(
skslBundle,
kind: AssetKind.regular,
transformers: const <AssetTransformerEntry>[],
),
};
await Future.wait<void>(
assetEntries.entries.map<Future<void>>((MapEntry<String, AssetBundleEntry> entry) async {
final PoolResource resource = await pool.request();
try {
// This will result in strange looking files, for example files with `/`
// on Windows or files that end up getting URI encoded such as `#.ext`
// to `%23.ext`. However, we have to keep it this way since the
// platform channels in the framework will URI encode these values,
// and the native APIs will look for files this way.
final File file = environment.fileSystem.file(
environment.fileSystem.path.join(outputDirectory.path, entry.key));
outputs.add(file);
file.parent.createSync(recursive: true);
final DevFSContent content = entry.value.content;
if (content is DevFSFileContent && content.file is File) {
inputs.add(content.file as File);
bool doCopy = true;
switch (entry.value.kind) {
case AssetKind.regular:
if (entry.value.transformers.isNotEmpty) {
final AssetTransformationFailure? failure = await assetTransformer.transformAsset(
asset: content.file as File,
outputPath: file.path,
workingDirectory: environment.projectDir.path,
transformerEntries: entry.value.transformers,
);
doCopy = false;
if (failure != null) {
throwToolExit(failure.message);
}
}
case AssetKind.font:
doCopy = !await iconTreeShaker.subsetFont(
input: content.file as File,
outputPath: file.path,
relativePath: entry.key,
);
case AssetKind.shader:
doCopy = !await shaderCompiler.compileShader(
input: content.file as File,
outputPath: file.path,
targetPlatform: targetPlatform,
);
case AssetKind.model:
doCopy = !await sceneImporter.importScene(
input: content.file as File,
outputPath: file.path,
);
}
if (doCopy) {
await (content.file as File).copy(file.path);
}
} else {
await file.writeAsBytes(await entry.value.content.contentsAsBytes());
}
} finally {
resource.release();
}
}));
// Copy deferred components assets only for release or profile builds.
// The assets are included in assetBundle.entries as a normal asset when
// building as debug.
if (environment.defines[kDeferredComponents] == 'true' && buildMode != null) {
await Future.wait<void>(assetBundle.deferredComponentsEntries.entries.map<Future<void>>(
(MapEntry<String, Map<String, AssetBundleEntry>> componentEntries) async {
final Directory componentOutputDir =
environment.projectDir
.childDirectory('build')
.childDirectory(componentEntries.key)
.childDirectory('intermediates')
.childDirectory('flutter');
await Future.wait<void>(
componentEntries.value.entries.map<Future<void>>((MapEntry<String, AssetBundleEntry> entry) async {
final PoolResource resource = await pool.request();
try {
// This will result in strange looking files, for example files with `/`
// on Windows or files that end up getting URI encoded such as `#.ext`
// to `%23.ext`. However, we have to keep it this way since the
// platform channels in the framework will URI encode these values,
// and the native APIs will look for files this way.
// If deferred components are disabled, then copy assets to regular location.
final File file = environment.defines[kDeferredComponents] == 'true'
? environment.fileSystem.file(
environment.fileSystem.path.join(componentOutputDir.path, buildMode.cliName, 'deferred_assets', 'flutter_assets', entry.key))
: environment.fileSystem.file(
environment.fileSystem.path.join(outputDirectory.path, entry.key));
outputs.add(file);
file.parent.createSync(recursive: true);
final DevFSContent content = entry.value.content;
if (content is DevFSFileContent && content.file is File) {
inputs.add(content.file as File);
if (!await iconTreeShaker.subsetFont(
input: content.file as File,
outputPath: file.path,
relativePath: entry.key,
)) {
await (content.file as File).copy(file.path);
}
} else {
await file.writeAsBytes(await entry.value.contentsAsBytes());
}
} finally {
resource.release();
}
}));
}));
}
final Depfile depfile = Depfile(inputs + assetBundle.additionalDependencies, outputs);
if (shaderBundlePath != null) {
final File skSLBundleFile = environment.fileSystem
.file(shaderBundlePath).absolute;
depfile.inputs.add(skSLBundleFile);
}
return depfile;
}
/// The path of the SkSL JSON bundle included in flutter_assets.
const String kSkSLShaderBundlePath = 'io.flutter.shaders.json';
/// Validate and process an SkSL asset bundle in a [DevFSContent].
///
/// Returns `null` if the bundle was not provided, otherwise attempts to
/// validate the bundle.
///
/// Throws [Exception] if the bundle is invalid due to formatting issues.
///
/// If the current target platform is different than the platform constructed
/// for the bundle, a warning will be printed.
DevFSContent? processSkSLBundle(String? bundlePath, {
required TargetPlatform targetPlatform,
required FileSystem fileSystem,
required Logger logger,
String? engineVersion,
}) {
if (bundlePath == null) {
return null;
}
// Step 1: check that file exists.
final File skSLBundleFile = fileSystem.file(bundlePath);
if (!skSLBundleFile.existsSync()) {
logger.printError('$bundlePath does not exist.');
throw Exception('SkSL bundle was invalid.');
}
// Step 2: validate top level bundle structure.
Map<String, Object?>? bundle;
try {
final Object? rawBundle = json.decode(skSLBundleFile.readAsStringSync());
if (rawBundle is Map<String, Object?>) {
bundle = rawBundle;
} else {
logger.printError('"$bundle" was not a JSON object: $rawBundle');
throw Exception('SkSL bundle was invalid.');
}
} on FormatException catch (err) {
logger.printError('"$bundle" was not a JSON object: $err');
throw Exception('SkSL bundle was invalid.');
}
// Step 3: Validate that:
// * The engine revision the bundle was compiled with
// is the same as the current revision.
// * The target platform is the same (this one is a warning only).
final String? bundleEngineRevision = bundle['engineRevision'] as String?;
if (bundleEngineRevision != engineVersion) {
logger.printError(
'Expected Flutter $bundleEngineRevision, but found $engineVersion\n'
'The SkSL bundle was produced with a different engine version. It must '
'be recreated for the current Flutter version.'
);
throw Exception('SkSL bundle was invalid');
}
final String? parsedPlatform = bundle['platform'] as String?;
TargetPlatform? bundleTargetPlatform;
if (parsedPlatform != null) {
bundleTargetPlatform = getTargetPlatformForName(parsedPlatform);
}
if (bundleTargetPlatform == null || bundleTargetPlatform != targetPlatform) {
logger.printError(
'The SkSL bundle was created for $bundleTargetPlatform, but the current '
'platform is $targetPlatform. This may lead to less efficient shader '
'caching.'
);
}
return DevFSStringContent(json.encode(<String, Object?>{
'data': bundle['data'],
}));
}
/// Copy the assets defined in the flutter manifest into a build directory.
class CopyAssets extends Target {
const CopyAssets();
@override
String get name => 'copy_assets';
@override
List<Target> get dependencies => const <Target>[
KernelSnapshot(),
];
@override
List<Source> get inputs => const <Source>[
Source.pattern('{FLUTTER_ROOT}/packages/flutter_tools/lib/src/build_system/targets/assets.dart'),
...IconTreeShaker.inputs,
...ShaderCompiler.inputs,
];
@override
List<Source> get outputs => const <Source>[];
@override
List<String> get depfiles => const <String>[
'flutter_assets.d',
];
@override
Future<void> build(Environment environment) async {
final Directory output = environment
.buildDir
.childDirectory('flutter_assets');
output.createSync(recursive: true);
final Depfile depfile = await copyAssets(
environment,
output,
targetPlatform: TargetPlatform.android,
flavor: environment.defines[kFlavor],
);
environment.depFileService.writeToFile(
depfile,
environment.buildDir.childFile('flutter_assets.d'),
);
}
}
| flutter/packages/flutter_tools/lib/src/build_system/targets/assets.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/build_system/targets/assets.dart",
"repo_id": "flutter",
"token_count": 5105
} | 798 |
// Copyright 2014 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.
import 'package:convert/convert.dart';
import 'package:crypto/crypto.dart';
import 'base/config.dart';
import 'base/file_system.dart';
import 'build_info.dart';
import 'convert.dart';
import 'globals.dart' as globals;
String get defaultMainPath => globals.fs.path.join('lib', 'main.dart');
const String defaultManifestPath = 'pubspec.yaml';
String get defaultDepfilePath => globals.fs.path.join(getBuildDirectory(), 'snapshot_blob.bin.d');
String getDefaultApplicationKernelPath({
required bool trackWidgetCreation,
}) {
return getKernelPathForTransformerOptions(
globals.fs.path.join(getBuildDirectory(), 'app.dill'),
trackWidgetCreation: trackWidgetCreation,
);
}
String getDefaultCachedKernelPath({
required bool trackWidgetCreation,
required List<String> dartDefines,
List<String> extraFrontEndOptions = const <String>[],
FileSystem? fileSystem,
Config? config,
}) {
final StringBuffer buffer = StringBuffer();
final List<String> cacheFrontEndOptions = extraFrontEndOptions.toList()
..removeWhere((String arg) => arg.startsWith('--enable-experiment='));
buffer.writeAll(dartDefines);
buffer.writeAll(cacheFrontEndOptions);
String buildPrefix = '';
if (buffer.isNotEmpty) {
final String output = buffer.toString();
final Digest digest = md5.convert(utf8.encode(output));
buildPrefix = '${hex.encode(digest.bytes)}.';
}
return getKernelPathForTransformerOptions(
(fileSystem ?? globals.fs).path.join(getBuildDirectory(
config ?? globals.config,
fileSystem ?? globals.fs
), '${buildPrefix}cache.dill'),
trackWidgetCreation: trackWidgetCreation,
);
}
String getKernelPathForTransformerOptions(
String path, {
required bool trackWidgetCreation,
}) {
if (trackWidgetCreation) {
path += '.track.dill';
}
return path;
}
const String defaultPrivateKeyPath = 'privatekey.der';
| flutter/packages/flutter_tools/lib/src/bundle.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/bundle.dart",
"repo_id": "flutter",
"token_count": 670
} | 799 |
// Copyright 2014 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.
import 'package:unified_analytics/unified_analytics.dart';
import '../base/common.dart';
import '../build_info.dart';
import '../bundle.dart';
import '../bundle_builder.dart';
import '../features.dart';
import '../globals.dart' as globals;
import '../project.dart';
import '../reporting/reporting.dart';
import '../runner/flutter_command.dart';
import 'build.dart';
class BuildBundleCommand extends BuildSubCommand {
BuildBundleCommand({
required super.logger,
bool verboseHelp = false,
BundleBuilder? bundleBuilder,
}) : _bundleBuilder = bundleBuilder ?? BundleBuilder(), super(verboseHelp: verboseHelp) {
usesTargetOption();
usesFilesystemOptions(hide: !verboseHelp);
usesBuildNumberOption();
addBuildModeFlags(verboseHelp: verboseHelp, defaultToRelease: false);
usesDartDefineOption();
usesExtraDartFlagOptions(verboseHelp: verboseHelp);
argParser
..addOption('depfile',
defaultsTo: defaultDepfilePath,
help: 'A file path where a depfile will be written. '
'This contains all build inputs and outputs in a Make-style syntax.'
)
..addOption('target-platform',
defaultsTo: 'android-arm',
allowed: const <String>[
'android-arm',
'android-arm64',
'android-x86',
'android-x64',
'ios',
'darwin',
'linux-x64',
'linux-arm64',
'windows-x64',
'windows-arm64',
],
help: 'The architecture for which to build the application.',
)
..addOption('asset-dir',
defaultsTo: getAssetBuildDirectory(),
help: 'The output directory for the kernel_blob.bin file, the native snapshot, the assets, etc. '
'Can be used to redirect the output when driving the Flutter toolchain from another build system.',
)
..addFlag(
'tree-shake-icons',
hide: !verboseHelp,
help: '(deprecated) Icon font tree shaking is not supported by this command.',
);
usesPubOption();
usesTrackWidgetCreation(verboseHelp: verboseHelp);
}
final BundleBuilder _bundleBuilder;
@override
final String name = 'bundle';
@override
final String description = 'Build the Flutter assets directory from your app.';
@override
final String usageFooter = 'The Flutter assets directory contains your '
'application code and resources; they are used by some Flutter Android and'
' iOS runtimes.';
@override
Future<CustomDimensions> get usageValues async {
final String projectDir = globals.fs.file(targetFile).parent.parent.path;
final FlutterProject flutterProject = FlutterProject.fromDirectory(globals.fs.directory(projectDir));
return CustomDimensions(
commandBuildBundleTargetPlatform: stringArg('target-platform'),
commandBuildBundleIsModule: flutterProject.isModule,
);
}
@override
Future<Event> unifiedAnalyticsUsageValues(String commandPath) async {
final String projectDir = globals.fs.file(targetFile).parent.parent.path;
final FlutterProject flutterProject = FlutterProject.fromDirectory(globals.fs.directory(projectDir));
return Event.commandUsageValues(
workflow: commandPath,
commandHasTerminal: hasTerminal,
buildBundleTargetPlatform: stringArg('target-platform'),
buildBundleIsModule: flutterProject.isModule,
);
}
@override
Future<void> validateCommand() async {
if (boolArg('tree-shake-icons')) {
throwToolExit('The "--tree-shake-icons" flag is deprecated for "build bundle" and will be removed in a future version of Flutter.');
}
return super.validateCommand();
}
@override
Future<FlutterCommandResult> runCommand() async {
final String targetPlatform = stringArg('target-platform')!;
final TargetPlatform platform = getTargetPlatformForName(targetPlatform);
// Check for target platforms that are only allowed via feature flags.
switch (platform) {
case TargetPlatform.darwin:
if (!featureFlags.isMacOSEnabled) {
throwToolExit('macOS is not a supported target platform.');
}
case TargetPlatform.windows_x64:
case TargetPlatform.windows_arm64:
if (!featureFlags.isWindowsEnabled) {
throwToolExit('Windows is not a supported target platform.');
}
case TargetPlatform.linux_x64:
case TargetPlatform.linux_arm64:
if (!featureFlags.isLinuxEnabled) {
throwToolExit('Linux is not a supported target platform.');
}
case TargetPlatform.android:
case TargetPlatform.android_arm:
case TargetPlatform.android_arm64:
case TargetPlatform.android_x64:
case TargetPlatform.android_x86:
case TargetPlatform.fuchsia_arm64:
case TargetPlatform.fuchsia_x64:
case TargetPlatform.ios:
case TargetPlatform.tester:
case TargetPlatform.web_javascript:
break;
}
final BuildInfo buildInfo = await getBuildInfo();
displayNullSafetyMode(buildInfo);
await _bundleBuilder.build(
platform: platform,
buildInfo: buildInfo,
mainPath: targetFile,
depfilePath: stringArg('depfile'),
assetDirPath: stringArg('asset-dir'),
buildNativeAssets: false,
);
return FlutterCommandResult.success();
}
}
| flutter/packages/flutter_tools/lib/src/commands/build_bundle.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/commands/build_bundle.dart",
"repo_id": "flutter",
"token_count": 1968
} | 800 |
// Copyright 2014 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.
import 'dart:async';
import '../debug_adapters/server.dart';
import '../globals.dart' as globals;
import '../runner/flutter_command.dart';
/// This command will start up a Debug Adapter that communicates using the Debug Adapter Protocol (DAP).
///
/// This is for use by editors and IDEs that have DAP clients to launch and
/// debug Flutter apps/tests. It extends the standard Dart DAP implementation
/// from DDS with Flutter-specific functionality (such as Hot Restart).
///
/// The server is intended to be single-use. It should live only for the
/// duration of a single debug session in the editor, and terminate when the
/// user stops debugging. If a user starts multiple debug sessions
/// simultaneously it is expected that the editor will start multiple debug
/// adapters.
///
/// The DAP specification can be found at
/// https://microsoft.github.io/debug-adapter-protocol/.
class DebugAdapterCommand extends FlutterCommand {
DebugAdapterCommand({ bool verboseHelp = false}) : hidden = !verboseHelp {
usesIpv6Flag(verboseHelp: verboseHelp);
addDdsOptions(verboseHelp: verboseHelp);
argParser
.addFlag(
'test',
help: 'Whether to use the "flutter test" debug adapter to run tests'
' and emit custom events for test progress/results.',
);
}
@override
final String name = 'debug-adapter';
@override
List<String> get aliases => const <String>['debug_adapter'];
@override
final String description = 'Run a Debug Adapter Protocol (DAP) server to communicate with the Flutter tool.';
@override
final String category = FlutterCommandCategory.tools;
@override
final bool hidden;
@override
Future<FlutterCommandResult> runCommand() async {
final DapServer server = DapServer(
globals.stdio.stdin,
globals.stdio.stdout.nonBlocking,
fileSystem: globals.fs,
platform: globals.platform,
ipv6: ipv6 ?? false,
enableDds: enableDds,
test: boolArg('test'),
onError: (Object? e) {
globals.printError(
'Input could not be parsed as a Debug Adapter Protocol message.\n'
'The "flutter debug-adapter" command is intended for use by tooling '
'that communicates using the Debug Adapter Protocol.\n\n'
'$e',
);
},
);
await server.channel.closed;
return FlutterCommandResult.success();
}
}
| flutter/packages/flutter_tools/lib/src/commands/debug_adapter.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/commands/debug_adapter.dart",
"repo_id": "flutter",
"token_count": 833
} | 801 |
// Copyright 2014 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.
import 'package:meta/meta.dart';
import 'package:vm_service/vm_service.dart' as vm_service;
import '../base/common.dart';
import '../base/file_system.dart';
import '../convert.dart';
import '../device.dart';
import '../globals.dart' as globals;
import '../runner/flutter_command.dart';
import '../vmservice.dart';
const String _kOut = 'out';
const String _kType = 'type';
const String _kVmServiceUrl = 'vm-service-url';
const String _kDeviceType = 'device';
const String _kSkiaType = 'skia';
class ScreenshotCommand extends FlutterCommand {
ScreenshotCommand({required this.fs}) {
argParser.addOption(
_kOut,
abbr: 'o',
valueHelp: 'path/to/file',
help: 'Location to write the screenshot.',
);
argParser.addOption(
_kVmServiceUrl,
aliases: <String>[ 'observatory-url' ], // for historical reasons
valueHelp: 'URI',
help: 'The VM Service URL to which to connect.\n'
'This is required when "--$_kType" is "$_kSkiaType".\n'
'To find the VM service URL, use "flutter run" and look for '
'"A Dart VM Service ... is available at" in the output.',
);
argParser.addOption(
_kType,
valueHelp: 'type',
help: 'The type of screenshot to retrieve.',
allowed: const <String>[_kDeviceType, _kSkiaType],
allowedHelp: const <String, String>{
_kDeviceType: "Delegate to the device's native screenshot capabilities. This "
'screenshots the entire screen currently being displayed (including content '
'not rendered by Flutter, like the device status bar).',
_kSkiaType: 'Render the Flutter app as a Skia picture. Requires "--$_kVmServiceUrl".',
},
defaultsTo: _kDeviceType,
);
usesDeviceTimeoutOption();
usesDeviceConnectionOption();
}
final FileSystem fs;
@override
String get name => 'screenshot';
@override
String get description => 'Take a screenshot from a connected device.';
@override
final String category = FlutterCommandCategory.tools;
@override
bool get refreshWirelessDevices => true;
@override
final List<String> aliases = <String>['pic'];
Device? device;
Future<void> _validateOptions(String? screenshotType, String? vmServiceUrl) async {
switch (screenshotType) {
case _kDeviceType:
if (vmServiceUrl != null) {
throwToolExit('VM Service URI cannot be provided for screenshot type $screenshotType');
}
device = await findTargetDevice(includeDevicesUnsupportedByProject: true);
if (device == null) {
throwToolExit('Must have a connected device for screenshot type $screenshotType');
}
if (!device!.supportsScreenshot) {
throwToolExit('Screenshot not supported for ${device!.name}.');
}
default:
if (vmServiceUrl == null) {
throwToolExit('VM Service URI must be specified for screenshot type $screenshotType');
}
if (vmServiceUrl.isEmpty || Uri.tryParse(vmServiceUrl) == null) {
throwToolExit('VM Service URI "$vmServiceUrl" is invalid');
}
}
}
@override
Future<FlutterCommandResult> verifyThenRunCommand(String? commandPath) async {
await _validateOptions(stringArg(_kType), stringArg(_kVmServiceUrl));
return super.verifyThenRunCommand(commandPath);
}
@override
Future<FlutterCommandResult> runCommand() async {
File? outputFile;
if (argResults?.wasParsed(_kOut) ?? false) {
outputFile = fs.file(stringArg(_kOut));
}
bool success = true;
switch (stringArg(_kType)) {
case _kDeviceType:
await runScreenshot(outputFile);
case _kSkiaType:
success = await runSkia(outputFile);
}
return success ? FlutterCommandResult.success()
: FlutterCommandResult.fail();
}
Future<void> runScreenshot(File? outputFile) async {
outputFile ??= globals.fsUtils.getUniqueFile(
fs.currentDirectory,
'flutter',
'png',
);
try {
await device!.takeScreenshot(outputFile);
} on Exception catch (error) {
throwToolExit('Error taking screenshot: $error');
}
checkOutput(outputFile, fs);
try {
_showOutputFileInfo(outputFile);
} on Exception catch (error) {
throwToolExit(
'Error with provided file path: "${outputFile.path}"\n'
'Error: $error'
);
}
}
Future<bool> runSkia(File? outputFile) async {
final Uri vmServiceUrl = Uri.parse(stringArg(_kVmServiceUrl)!);
final FlutterVmService vmService = await connectToVmService(vmServiceUrl, logger: globals.logger);
final vm_service.Response? skp = await vmService.screenshotSkp();
if (skp == null) {
globals.printError(
'The Skia picture request failed, probably because the device was '
'disconnected',
);
return false;
}
outputFile ??= globals.fsUtils.getUniqueFile(
fs.currentDirectory,
'flutter',
'skp',
);
final IOSink sink = outputFile.openWrite();
sink.add(base64.decode(skp.json?['skp'] as String));
await sink.close();
_showOutputFileInfo(outputFile);
ensureOutputIsNotJsonRpcError(outputFile);
return true;
}
static void checkOutput(File outputFile, FileSystem fs) {
if (!fs.file(outputFile.path).existsSync()) {
throwToolExit(
'File was not created, ensure path is valid\n'
'Path provided: "${outputFile.path}"'
);
}
}
@visibleForTesting
static void ensureOutputIsNotJsonRpcError(File outputFile) {
if (outputFile.lengthSync() >= 1000) {
return;
}
final String content = outputFile.readAsStringSync(
encoding: const AsciiCodec(allowInvalid: true),
);
if (content.startsWith('{"jsonrpc":"2.0", "error"')) {
throwToolExit('It appears the output file contains an error message, not valid output.');
}
}
void _showOutputFileInfo(File outputFile) {
final int sizeKB = (outputFile.lengthSync()) ~/ 1024;
globals.printStatus('Screenshot written to ${fs.path.relative(outputFile.path)} (${sizeKB}kB).');
}
}
| flutter/packages/flutter_tools/lib/src/commands/screenshot.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/commands/screenshot.dart",
"repo_id": "flutter",
"token_count": 2382
} | 802 |
// Copyright 2014 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.
import 'package:yaml/yaml.dart';
import '../base/common.dart';
import '../base/file_system.dart';
import '../base/utils.dart';
import '../build_system/build_system.dart';
import '../build_system/build_targets.dart';
Future<void> generateLocalizationsSyntheticPackage({
required Environment environment,
required BuildSystem buildSystem,
required BuildTargets buildTargets,
}) async {
final FileSystem fileSystem = environment.fileSystem;
final File l10nYamlFile = fileSystem.file(
fileSystem.path.join(environment.projectDir.path, 'l10n.yaml'));
// If pubspec.yaml has generate:true and if l10n.yaml exists in the
// root project directory, check to see if a synthetic package should
// be generated for gen_l10n.
if (!l10nYamlFile.existsSync()) {
return;
}
final YamlNode yamlNode = loadYamlNode(l10nYamlFile.readAsStringSync());
if (yamlNode.value != null && yamlNode is! YamlMap) {
throwToolExit(
'Expected ${l10nYamlFile.path} to contain a map, instead was $yamlNode'
);
}
// If an l10n.yaml file exists and is not empty, attempt to parse settings in
// it.
if (yamlNode.value != null) {
final YamlMap yamlMap = yamlNode as YamlMap;
final Object? value = yamlMap['synthetic-package'];
if (value is! bool && value != null) {
throwToolExit(
'Expected "synthetic-package" to have a bool value, '
'instead was "$value"'
);
}
// Generate gen_l10n synthetic package only if synthetic-package: true or
// synthetic-package is null.
final bool? isSyntheticL10nPackage = value as bool?;
if (isSyntheticL10nPackage == false) {
return;
}
}
final BuildResult result = await buildSystem.build(
buildTargets.generateLocalizationsTarget,
environment,
);
if (result.hasException) {
throwToolExit(
'Generating synthetic localizations package failed with ${result.exceptions.length} ${pluralize('error', result.exceptions.length)}:'
'\n\n'
'${result.exceptions.values.map<Object?>((ExceptionMeasurement e) => e.exception).join('\n\n')}',
);
}
}
| flutter/packages/flutter_tools/lib/src/dart/generate_synthetic_packages.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/dart/generate_synthetic_packages.dart",
"repo_id": "flutter",
"token_count": 798
} | 803 |
// Copyright 2014 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.
import 'dart:async';
import 'base/io.dart';
class ForwardedPort {
ForwardedPort(this.hostPort, this.devicePort) : context = null;
ForwardedPort.withContext(this.hostPort, this.devicePort, this.context);
final int hostPort;
final int devicePort;
final Process? context;
@override
String toString() => 'ForwardedPort HOST:$hostPort to DEVICE:$devicePort';
/// Kill subprocess (if present) used in forwarding.
void dispose() {
if (context != null) {
context!.kill();
}
}
}
/// Forward ports from the host machine to the device.
abstract class DevicePortForwarder {
/// Returns a Future that completes with the current list of forwarded
/// ports for this device.
List<ForwardedPort> get forwardedPorts;
/// Forward [hostPort] on the host to [devicePort] on the device.
/// If [hostPort] is null or zero, will auto select a host port.
/// Returns a Future that completes with the host port.
Future<int> forward(int devicePort, { int? hostPort });
/// Stops forwarding [forwardedPort].
Future<void> unforward(ForwardedPort forwardedPort);
/// Cleanup allocated resources, like [forwardedPorts].
Future<void> dispose();
}
// A port forwarder which does not support forwarding ports.
class NoOpDevicePortForwarder implements DevicePortForwarder {
const NoOpDevicePortForwarder();
@override
Future<int> forward(int devicePort, { int? hostPort }) async => devicePort;
@override
List<ForwardedPort> get forwardedPorts => <ForwardedPort>[];
@override
Future<void> unforward(ForwardedPort forwardedPort) async { }
@override
Future<void> dispose() async { }
}
| flutter/packages/flutter_tools/lib/src/device_port_forwarder.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/device_port_forwarder.dart",
"repo_id": "flutter",
"token_count": 525
} | 804 |
// Copyright 2014 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.
import 'dart:async';
import 'package:meta/meta.dart';
import 'package:vm_service/vm_service.dart' as vm_service;
import '../application_package.dart';
import '../artifacts.dart';
import '../base/common.dart';
import '../base/context.dart';
import '../base/file_system.dart';
import '../base/io.dart';
import '../base/logger.dart';
import '../base/net.dart';
import '../base/platform.dart';
import '../base/process.dart';
import '../base/time.dart';
import '../build_info.dart';
import '../device.dart';
import '../device_port_forwarder.dart';
import '../globals.dart' as globals;
import '../project.dart';
import '../runner/flutter_command.dart';
import '../vmservice.dart';
import 'application_package.dart';
import 'fuchsia_ffx.dart';
import 'fuchsia_pm.dart';
import 'fuchsia_sdk.dart';
import 'fuchsia_workflow.dart';
import 'pkgctl.dart';
/// The [FuchsiaDeviceTools] instance.
FuchsiaDeviceTools get fuchsiaDeviceTools => context.get<FuchsiaDeviceTools>()!;
/// Fuchsia device-side tools.
class FuchsiaDeviceTools {
late final FuchsiaPkgctl pkgctl = FuchsiaPkgctl();
late final FuchsiaFfx ffx = FuchsiaFfx();
}
final String _ipv4Loopback = InternetAddress.loopbackIPv4.address;
final String _ipv6Loopback = InternetAddress.loopbackIPv6.address;
// Enables testing the fuchsia isolate discovery
Future<FlutterVmService> _kDefaultFuchsiaIsolateDiscoveryConnector(Uri uri) {
return connectToVmService(uri, logger: globals.logger);
}
Future<void> _kDefaultDartDevelopmentServiceStarter(
Device device,
Uri vmServiceUri,
bool disableServiceAuthCodes,
) async {
await device.dds.startDartDevelopmentService(
vmServiceUri,
hostPort: 0,
ipv6: true,
disableServiceAuthCodes: disableServiceAuthCodes,
logger: globals.logger,
);
}
/// Read the log for a particular device.
class _FuchsiaLogReader extends DeviceLogReader {
_FuchsiaLogReader(this._device, this._systemClock, [this._app]);
// \S matches non-whitespace characters.
static final RegExp _flutterLogOutput = RegExp(r'INFO: \S+\(flutter\): ');
final FuchsiaDevice _device;
final ApplicationPackage? _app;
final SystemClock _systemClock;
@override
String get name => _device.name;
Stream<String>? _logLines;
@override
Stream<String> get logLines {
final Stream<String>? logStream = globals.fuchsiaSdk?.syslogs(_device.id);
_logLines ??= _processLogs(logStream);
return _logLines ?? const Stream<String>.empty();
}
Stream<String>? _processLogs(Stream<String>? lines) {
if (lines == null) {
return null;
}
// Get the starting time of the log processor to filter logs from before
// the process attached.
final DateTime startTime = _systemClock.now();
// Determine if line comes from flutter, and optionally whether it matches
// the correct fuchsia module.
final ApplicationPackage? app = _app;
final RegExp matchRegExp = app == null
? _flutterLogOutput
: RegExp('INFO: ${app.name}(\\.cm)?\\(flutter\\): ');
return Stream<String>.eventTransformed(
lines,
(EventSink<String> output) => _FuchsiaLogSink(output, matchRegExp, startTime),
);
}
@override
String toString() => name;
@override
void dispose() {
// The Fuchsia SDK syslog process is killed when the subscription to the
// logLines Stream is canceled.
}
}
class _FuchsiaLogSink implements EventSink<String> {
_FuchsiaLogSink(this._outputSink, this._matchRegExp, this._startTime);
static final RegExp _utcDateOutput = RegExp(r'\d+\-\d+\-\d+ \d+:\d+:\d+');
final EventSink<String> _outputSink;
final RegExp _matchRegExp;
final DateTime _startTime;
@override
void add(String line) {
if (!_matchRegExp.hasMatch(line)) {
return;
}
final String? rawDate = _utcDateOutput.firstMatch(line)?.group(0);
if (rawDate == null) {
return;
}
final DateTime logTime = DateTime.parse(rawDate);
if (logTime.millisecondsSinceEpoch < _startTime.millisecondsSinceEpoch) {
return;
}
_outputSink.add(
'[${logTime.toLocal()}] Flutter: ${line.split(_matchRegExp).last}');
}
@override
void addError(Object error, [StackTrace? stackTrace]) {
_outputSink.addError(error, stackTrace);
}
@override
void close() {
_outputSink.close();
}
}
/// Device discovery for Fuchsia devices.
class FuchsiaDevices extends PollingDeviceDiscovery {
FuchsiaDevices({
required Platform platform,
required FuchsiaWorkflow fuchsiaWorkflow,
required FuchsiaSdk fuchsiaSdk,
required Logger logger,
}) : _platform = platform,
_fuchsiaWorkflow = fuchsiaWorkflow,
_fuchsiaSdk = fuchsiaSdk,
_logger = logger,
super('Fuchsia devices');
final Platform _platform;
final FuchsiaWorkflow _fuchsiaWorkflow;
final FuchsiaSdk _fuchsiaSdk;
final Logger _logger;
@override
bool get supportsPlatform => isFuchsiaSupportedPlatform(_platform);
@override
bool get canListAnything => _fuchsiaWorkflow.canListDevices;
@override
Future<List<Device>> pollingGetDevices({ Duration? timeout }) async {
if (!_fuchsiaWorkflow.canListDevices) {
return <Device>[];
}
// TODO(omerlevran): Remove once soft transition is complete fxb/67602.
final List<String>? text = (await _fuchsiaSdk.listDevices(
timeout: timeout,
))?.split('\n');
if (text == null || text.isEmpty) {
return <Device>[];
}
final List<FuchsiaDevice> devices = <FuchsiaDevice>[];
for (final String line in text) {
final FuchsiaDevice? device = await _parseDevice(line);
if (device == null) {
continue;
}
devices.add(device);
}
return devices;
}
@override
Future<List<String>> getDiagnostics() async => const <String>[];
Future<FuchsiaDevice?> _parseDevice(String text) async {
final String line = text.trim();
// ['ip', 'device name']
final List<String> words = line.split(' ');
if (words.length < 2) {
return null;
}
final String name = words[1];
// TODO(omerlevran): Add support for resolve on the FuchsiaSdk Object.
final String? resolvedHost = await _fuchsiaSdk.fuchsiaFfx.resolve(name);
if (resolvedHost == null) {
_logger.printError('Failed to resolve host for Fuchsia device `$name`');
return null;
}
return FuchsiaDevice(resolvedHost, name: name);
}
@override
List<String> get wellKnownIds => const <String>[];
}
class FuchsiaDevice extends Device {
FuchsiaDevice(super.id, {required this.name})
: super(
platformType: PlatformType.fuchsia,
category: null,
ephemeral: true,
);
@override
bool get supportsHotReload => true;
@override
bool get supportsHotRestart => false;
@override
bool get supportsFlutterExit => false;
@override
final String name;
@override
Future<bool> get isLocalEmulator async => false;
@override
Future<String?> get emulatorId async => null;
@override
bool get supportsStartPaused => false;
late final Future<bool> isSession = _initIsSession();
/// Determine if the Fuchsia device is running a session based build.
///
/// If the device is running a session based build, `ffx session` should be
/// used to launch apps. Fuchsia flutter apps cannot currently be launched
/// without a session.
Future<bool> _initIsSession() async {
return await globals.fuchsiaSdk?.fuchsiaFfx.sessionShow() != null;
}
@override
Future<bool> isAppInstalled(
ApplicationPackage app, {
String? userIdentifier,
}) async => false;
@override
Future<bool> isLatestBuildInstalled(ApplicationPackage app) async => false;
@override
Future<bool> installApp(
ApplicationPackage app, {
String? userIdentifier,
}) => Future<bool>.value(false);
@override
Future<bool> uninstallApp(
ApplicationPackage app, {
String? userIdentifier,
}) async => false;
@override
bool isSupported() => true;
@override
bool supportsRuntimeMode(BuildMode buildMode) =>
buildMode != BuildMode.jitRelease;
@override
Future<LaunchResult> startApp(
FuchsiaApp package, {
String? mainPath,
String? route,
required DebuggingOptions debuggingOptions,
Map<String, Object?> platformArgs = const <String, Object?>{},
bool prebuiltApplication = false,
bool ipv6 = false,
String? userIdentifier,
}) async {
if (await isSession) {
globals.printTrace('Running on a session framework based build.');
} else {
globals.printTrace('Running on a non session framework based build.');
}
if (!prebuiltApplication) {
throwToolExit(
'This tool does not currently build apps for fuchsia.\n'
'Build the app using a supported Fuchsia workflow.\n'
'Then use the --${FlutterOptions.kUseApplicationBinary} flag.'
);
}
// Stop the app if it's currently running.
await stopApp(package);
// Find out who the device thinks we are.
final int port = await globals.os.findFreePort();
if (port == 0) {
globals.printError('Failed to find a free port');
return LaunchResult.failed();
}
// Try Start with a fresh package repo in case one was left over from a
// previous run.
final Directory packageRepo = globals.fs.directory(
globals.fs.path.join(getFuchsiaBuildDirectory(), '.pkg-repo'));
try {
if (packageRepo.existsSync()) {
packageRepo.deleteSync(recursive: true);
}
packageRepo.createSync(recursive: true);
} on Exception catch (e) {
globals.printError('Failed to create Fuchsia package repo directory '
'at ${packageRepo.path}: $e');
return LaunchResult.failed();
}
final String appName = FlutterProject.current().manifest.appName;
final Status status = globals.logger.startProgress(
'Starting Fuchsia application $appName...',
);
FuchsiaPackageServer? fuchsiaPackageServer;
bool serverRegistered = false;
String fuchsiaUrl;
try {
// Start up a package server.
const String packageServerName = FuchsiaPackageServer.toolHost;
fuchsiaPackageServer =
FuchsiaPackageServer(packageRepo.path, packageServerName, '', port);
if (!await fuchsiaPackageServer.start()) {
globals.printError('Failed to start the Fuchsia package server');
return LaunchResult.failed();
}
// Serve the application's package.
final File farArchive =
package.farArchive(debuggingOptions.buildInfo.mode);
if (!await fuchsiaPackageServer.addPackage(farArchive)) {
globals.printError('Failed to add package to the package server');
return LaunchResult.failed();
}
// Serve the flutter_runner.
final File flutterRunnerArchive =
globals.fs.file(globals.artifacts!.getArtifactPath(
Artifact.fuchsiaFlutterRunner,
platform: await targetPlatform,
mode: debuggingOptions.buildInfo.mode,
));
if (!await fuchsiaPackageServer.addPackage(flutterRunnerArchive)) {
globals.printError(
'Failed to add flutter_runner package to the package server');
return LaunchResult.failed();
}
// Teach the package controller about the package server.
if (!await fuchsiaDeviceTools.pkgctl
.addRepo(this, fuchsiaPackageServer)) {
globals.printError('Failed to teach amber about the package server');
return LaunchResult.failed();
}
serverRegistered = true;
// Tell the package controller to prefetch the flutter_runner.
String flutterRunnerName;
if (debuggingOptions.buildInfo.usesAot) {
if (debuggingOptions.buildInfo.mode.isRelease) {
flutterRunnerName = 'flutter_aot_product_runner';
} else {
flutterRunnerName = 'flutter_aot_runner';
}
} else {
if (debuggingOptions.buildInfo.mode.isRelease) {
flutterRunnerName = 'flutter_jit_product_runner';
} else {
flutterRunnerName = 'flutter_jit_runner';
}
}
if (!await fuchsiaDeviceTools.pkgctl
.resolve(this, fuchsiaPackageServer.name, flutterRunnerName)) {
globals
.printError('Failed to get pkgctl to prefetch the flutter_runner');
return LaunchResult.failed();
}
// Tell the package controller to prefetch the app.
if (!await fuchsiaDeviceTools.pkgctl
.resolve(this, fuchsiaPackageServer.name, appName)) {
globals.printError('Failed to get pkgctl to prefetch the package');
return LaunchResult.failed();
}
fuchsiaUrl = 'fuchsia-pkg://$packageServerName/$appName#meta/$appName.cm';
if (await isSession) {
// Instruct ffx session to start the app
final bool addedApp =
await globals.fuchsiaSdk?.fuchsiaFfx.sessionAdd(fuchsiaUrl) ?? false;
if (!addedApp) {
globals.printError('Failed to add the app via `ffx session add`');
return LaunchResult.failed();
}
} else {
globals.printError(
'Fuchsia flutter apps can only be launched within a session');
return LaunchResult.failed();
}
} finally {
// Try to un-teach the package controller about the package server if
// needed.
if (serverRegistered && fuchsiaPackageServer != null) {
await fuchsiaDeviceTools.pkgctl.rmRepo(this, fuchsiaPackageServer);
}
// Shutdown the package server and delete the package repo;
globals.printTrace("Shutting down the tool's package server.");
fuchsiaPackageServer?.stop();
globals.printTrace(
"Removing the tool's package repo: at ${packageRepo.path}");
try {
packageRepo.deleteSync(recursive: true);
} on Exception catch (e) {
globals.printError('Failed to remove Fuchsia package repo directory '
'at ${packageRepo.path}: $e.');
}
status.cancel();
}
if (debuggingOptions.buildInfo.mode.isRelease) {
globals.printTrace('App successfully started in a release mode.');
return LaunchResult.succeeded();
}
globals.printTrace(
'App started in a non-release mode. Setting up vmservice connection.');
// In a debug or profile build, try to find the vmService uri.
final FuchsiaIsolateDiscoveryProtocol discovery =
getIsolateDiscoveryProtocol(appName);
try {
final Uri vmServiceUri = await discovery.uri;
return LaunchResult.succeeded(vmServiceUri: vmServiceUri);
} finally {
discovery.dispose();
}
}
@override
Future<bool> stopApp(
ApplicationPackage? app, {
String? userIdentifier,
}) async {
if (await isSession) {
// Currently there are no way to close a running app programmatically
// using the session framework afaik. So this is a no-op.
return true;
}
// Fuchsia flutter apps currently require a session, but if that changes,
// add the relevant "stopApp" code here.
return true;
}
Future<TargetPlatform> _queryTargetPlatform() async {
const TargetPlatform defaultTargetPlatform = TargetPlatform.fuchsia_arm64;
if (!globals.fuchsiaArtifacts!.hasSshConfig) {
globals.printTrace('Could not determine Fuchsia target platform because '
'Fuchsia ssh configuration is missing.\n'
'Defaulting to arm64.');
return defaultTargetPlatform;
}
final RunResult result = await shell('uname -m');
if (result.exitCode != 0) {
globals.printError(
'Could not determine Fuchsia target platform type:\n$result\n'
'Defaulting to arm64.');
return defaultTargetPlatform;
}
final String machine = result.stdout.trim();
switch (machine) {
case 'aarch64':
return TargetPlatform.fuchsia_arm64;
case 'x86_64':
return TargetPlatform.fuchsia_x64;
default:
globals.printError('Unknown Fuchsia target platform "$machine". '
'Defaulting to arm64.');
return defaultTargetPlatform;
}
}
@override
bool get supportsScreenshot => isFuchsiaSupportedPlatform(globals.platform);
@override
Future<void> takeScreenshot(File outputFile) async {
if (outputFile.basename.split('.').last != 'ppm') {
throw Exception('${outputFile.path} must be a .ppm file');
}
final RunResult screencapResult =
await shell('screencap > /tmp/screenshot.ppm');
if (screencapResult.exitCode != 0) {
throw Exception(
'Could not take a screenshot on device $name:\n$screencapResult');
}
try {
final RunResult scpResult =
await scp('/tmp/screenshot.ppm', outputFile.path);
if (scpResult.exitCode != 0) {
throw Exception('Failed to copy screenshot from device:\n$scpResult');
}
} finally {
try {
final RunResult deleteResult = await shell('rm /tmp/screenshot.ppm');
if (deleteResult.exitCode != 0) {
globals.printError(
'Failed to delete screenshot.ppm from the device:\n$deleteResult');
}
} on Exception catch (e) {
globals
.printError('Failed to delete screenshot.ppm from the device: $e');
}
}
}
@override
late final Future<TargetPlatform> targetPlatform = _queryTargetPlatform();
@override
Future<String> get sdkNameAndVersion async {
const String defaultName = 'Fuchsia';
if (!globals.fuchsiaArtifacts!.hasSshConfig) {
globals.printTrace('Could not determine Fuchsia sdk name or version '
'because Fuchsia ssh configuration is missing.');
return defaultName;
}
const String versionPath = '/pkgfs/packages/build-info/0/data/version';
final RunResult catResult = await shell('cat $versionPath');
if (catResult.exitCode != 0) {
globals.printTrace('Failed to cat $versionPath: ${catResult.stderr}');
return defaultName;
}
final String version = catResult.stdout.trim();
if (version.isEmpty) {
globals.printTrace('$versionPath was empty');
return defaultName;
}
return 'Fuchsia $version';
}
@override
DeviceLogReader getLogReader({
ApplicationPackage? app,
bool includePastLogs = false,
}) {
assert(!includePastLogs, 'Past log reading not supported on Fuchsia.');
return _logReader ??= _FuchsiaLogReader(this, globals.systemClock, app);
}
_FuchsiaLogReader? _logReader;
@override
DevicePortForwarder get portForwarder =>
_portForwarder ??= _FuchsiaPortForwarder(this);
DevicePortForwarder? _portForwarder;
@visibleForTesting
set portForwarder(DevicePortForwarder forwarder) {
_portForwarder = forwarder;
}
@override
void clearLogs() {}
/// [true] if the current host address is IPv6.
late final bool ipv6 = isIPv6Address(id);
/// Return the address that the device should use to communicate with the
/// host.
late final Future<String> hostAddress = () async {
final RunResult result = await shell(r'echo $SSH_CONNECTION');
void fail() {
throwToolExit('Failed to get local address, aborting.\n$result');
}
if (result.exitCode != 0) {
fail();
}
final List<String> splitResult = result.stdout.split(' ');
if (splitResult.isEmpty) {
fail();
}
final String addr = splitResult[0].replaceAll('%', '%25');
if (addr.isEmpty) {
fail();
}
return addr;
}();
/// List the ports currently running a dart vmService.
Future<List<int>> servicePorts() async {
const String findCommand = 'find /hub -name vmservice-port';
final RunResult findResult = await shell(findCommand);
if (findResult.exitCode != 0) {
throwToolExit(
"'$findCommand' on device $name failed. stderr: '${findResult.stderr}'");
}
final String findOutput = findResult.stdout;
if (findOutput.trim() == '') {
throwToolExit(
'No Dart Observatories found. Are you running a debug build?');
}
final List<int> ports = <int>[];
for (final String path in findOutput.split('\n')) {
if (path == '') {
continue;
}
final String lsCommand = 'ls $path';
final RunResult lsResult = await shell(lsCommand);
if (lsResult.exitCode != 0) {
throwToolExit("'$lsCommand' on device $name failed");
}
final String lsOutput = lsResult.stdout;
for (final String line in lsOutput.split('\n')) {
if (line == '') {
continue;
}
final int? port = int.tryParse(line);
if (port != null) {
ports.add(port);
}
}
}
return ports;
}
/// Run `command` on the Fuchsia device shell.
Future<RunResult> shell(String command) async {
final File? sshConfig = globals.fuchsiaArtifacts?.sshConfig;
if (sshConfig == null) {
throwToolExit('Cannot interact with device. No ssh config.\n'
'Try setting FUCHSIA_SSH_CONFIG or FUCHSIA_BUILD_DIR.');
}
return globals.processUtils.run(<String>[
'ssh',
'-F',
sshConfig.absolute.path,
id, // Device's IP address.
command,
]);
}
/// Transfer the file [origin] from the device to [destination].
Future<RunResult> scp(String origin, String destination) async {
final File? sshConfig = globals.fuchsiaArtifacts!.sshConfig;
if (sshConfig == null) {
throwToolExit('Cannot interact with device. No ssh config.\n'
'Try setting FUCHSIA_SSH_CONFIG or FUCHSIA_BUILD_DIR.');
}
return globals.processUtils.run(<String>[
'scp',
'-F',
sshConfig.absolute.path,
'$id:$origin',
destination,
]);
}
/// Finds the first port running a VM matching `isolateName` from the
/// provided set of `ports`.
///
/// Returns null if no isolate port can be found.
Future<int> findIsolatePort(String isolateName, List<int> ports) async {
for (final int port in ports) {
try {
// The square-bracket enclosure for using the IPv6 loopback
// didn't appear to work, but when assigning to the IPv4 loopback device,
// netstat shows that the local port is actually being used on the IPv6
// loopback (::1).
final Uri uri = Uri.parse('http://[$_ipv6Loopback]:$port');
final FlutterVmService vmService =
await connectToVmService(uri, logger: globals.logger);
final List<FlutterView> flutterViews =
await vmService.getFlutterViews();
for (final FlutterView flutterView in flutterViews) {
final vm_service.IsolateRef? uiIsolate = flutterView.uiIsolate;
if (uiIsolate == null) {
continue;
}
final int? port = vmService.httpAddress?.port;
if (port != null &&
(uiIsolate.name?.contains(isolateName) ?? false)) {
return port;
}
}
} on SocketException catch (err) {
globals.printTrace('Failed to connect to $port: $err');
}
}
throwToolExit('No ports found running $isolateName');
}
FuchsiaIsolateDiscoveryProtocol getIsolateDiscoveryProtocol(
String isolateName) {
return FuchsiaIsolateDiscoveryProtocol(this, isolateName);
}
@override
bool isSupportedForProject(FlutterProject flutterProject) {
return flutterProject.fuchsia.existsSync();
}
@override
Future<void> dispose() async {
await _portForwarder?.dispose();
}
}
class FuchsiaIsolateDiscoveryProtocol {
FuchsiaIsolateDiscoveryProtocol(
this._device,
this._isolateName, [
this._vmServiceConnector = _kDefaultFuchsiaIsolateDiscoveryConnector,
this._ddsStarter = _kDefaultDartDevelopmentServiceStarter,
this._pollOnce = false,
]);
static const Duration _pollDuration = Duration(seconds: 10);
final Map<int, FlutterVmService> _ports = <int, FlutterVmService>{};
final FuchsiaDevice _device;
final String _isolateName;
final Completer<Uri> _foundUri = Completer<Uri>();
final Future<FlutterVmService> Function(Uri) _vmServiceConnector;
final Future<void> Function(Device, Uri, bool) _ddsStarter;
// whether to only poll once.
final bool _pollOnce;
Timer? _pollingTimer;
Status? _status;
FutureOr<Uri> get uri {
if (_uri != null) {
return _uri!;
}
_status ??= globals.logger.startProgress(
'Waiting for a connection from $_isolateName on ${_device.name}...',
);
unawaited(_findIsolate()); // Completes the _foundUri Future.
return _foundUri.future.then((Uri uri) {
_uri = uri;
return uri;
});
}
Uri? _uri;
void dispose() {
if (!_foundUri.isCompleted) {
_status?.cancel();
_status = null;
_pollingTimer?.cancel();
_pollingTimer = null;
_foundUri.completeError(Exception('Did not complete'));
}
}
Future<void> _findIsolate() async {
final List<int> ports = await _device.servicePorts();
for (final int port in ports) {
FlutterVmService? service;
if (_ports.containsKey(port)) {
service = _ports[port];
} else {
final int localPort = await _device.portForwarder.forward(port);
try {
final Uri uri = Uri.parse('http://[$_ipv6Loopback]:$localPort');
await _ddsStarter(_device, uri, true);
service = await _vmServiceConnector(_device.dds.uri!);
_ports[port] = service;
} on SocketException catch (err) {
globals.printTrace('Failed to connect to $localPort: $err');
continue;
}
}
final List<FlutterView> flutterViews =
await service?.getFlutterViews() ?? <FlutterView>[];
for (final FlutterView flutterView in flutterViews) {
final vm_service.IsolateRef? uiIsolate = flutterView.uiIsolate;
if (uiIsolate == null) {
continue;
}
final int? port = service?.httpAddress?.port;
if (port != null && (uiIsolate.name?.contains(_isolateName) ?? false)) {
_foundUri.complete(_device.ipv6
? Uri.parse('http://[$_ipv6Loopback]:$port/')
: Uri.parse('http://$_ipv4Loopback:$port/'));
_status?.stop();
return;
}
}
}
if (_pollOnce) {
_foundUri.completeError(Exception('Max iterations exceeded'));
_status?.stop();
return;
}
_pollingTimer = Timer(_pollDuration, _findIsolate);
}
}
class _FuchsiaPortForwarder extends DevicePortForwarder {
_FuchsiaPortForwarder(this.device);
final FuchsiaDevice device;
final Map<int, Process> _processes = <int, Process>{};
@override
Future<int> forward(int devicePort, {int? hostPort}) async {
hostPort ??= await globals.os.findFreePort();
if (hostPort == 0) {
throwToolExit(
'Failed to forward port $devicePort. No free host-side ports');
}
final File? sshConfig = globals.fuchsiaArtifacts?.sshConfig;
if (sshConfig == null) {
throwToolExit('Cannot interact with device. No ssh config.\n'
'Try setting FUCHSIA_SSH_CONFIG or FUCHSIA_BUILD_DIR.');
}
// The provided command works around a bug in -N, see US-515
// for more explanation.
final List<String> command = <String>[
'ssh',
'-6',
'-F',
sshConfig.absolute.path,
'-nNT',
'-vvv',
'-f',
'-L',
'$hostPort:$_ipv4Loopback:$devicePort',
device.id, // Device's IP address.
'true',
];
final Process process = await globals.processManager.start(command);
unawaited(process.exitCode.then((int exitCode) {
if (exitCode != 0) {
throwToolExit('Failed to forward port:$devicePort');
}
}));
_processes[hostPort] = process;
_forwardedPorts.add(ForwardedPort(hostPort, devicePort));
return hostPort;
}
@override
List<ForwardedPort> get forwardedPorts => _forwardedPorts;
final List<ForwardedPort> _forwardedPorts = <ForwardedPort>[];
@override
Future<void> unforward(ForwardedPort forwardedPort) async {
_forwardedPorts.remove(forwardedPort);
final Process? process = _processes.remove(forwardedPort.hostPort);
process?.kill();
final File? sshConfig = globals.fuchsiaArtifacts?.sshConfig;
if (sshConfig == null) {
// Nothing to cancel.
return;
}
final List<String> command = <String>[
'ssh',
'-F',
sshConfig.absolute.path,
'-O',
'cancel',
'-vvv',
'-L',
'${forwardedPort.hostPort}:$_ipv4Loopback:${forwardedPort.devicePort}',
device.id, // Device's IP address.
];
final ProcessResult result = await globals.processManager.run(command);
if (result.exitCode != 0) {
throwToolExit(
'Unforward command failed:\n'
'stdout: ${result.stdout}\n'
'stderr: ${result.stderr}',
);
}
}
@override
Future<void> dispose() async {
final List<ForwardedPort> forwardedPortsCopy =
List<ForwardedPort>.of(forwardedPorts);
for (final ForwardedPort port in forwardedPortsCopy) {
await unforward(port);
}
}
}
| flutter/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart",
"repo_id": "flutter",
"token_count": 11287
} | 805 |
// Copyright 2014 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.
import '../base/common.dart';
import '../base/process.dart';
import '../device.dart';
import '../emulator.dart';
import '../globals.dart' as globals;
import 'simulators.dart';
class IOSEmulators extends EmulatorDiscovery {
@override
bool get supportsPlatform => globals.platform.isMacOS;
@override
bool get canListAnything => globals.iosWorkflow?.canListEmulators ?? false;
@override
Future<List<Emulator>> get emulators async => getEmulators();
@override
bool get canLaunchAnything => canListAnything;
}
class IOSEmulator extends Emulator {
const IOSEmulator(String id) : super(id, true);
@override
String get name => 'iOS Simulator';
@override
String get manufacturer => 'Apple';
@override
Category get category => Category.mobile;
@override
PlatformType get platformType => PlatformType.ios;
@override
Future<void> launch({bool coldBoot = false}) async {
final String? simulatorPath = globals.xcode?.getSimulatorPath();
if (simulatorPath == null) {
throwToolExit('Could not find Simulator app');
}
Future<bool> launchSimulator(List<String> additionalArgs) async {
final List<String> args = <String>[
'open',
...additionalArgs,
'-a',
simulatorPath,
];
final RunResult launchResult = await globals.processUtils.run(args);
if (launchResult.exitCode != 0) {
globals.printError('$launchResult');
return false;
}
return true;
}
// First run with `-n` to force a device to boot if there isn't already one
if (!await launchSimulator(<String>['-n'])) {
return;
}
// Run again to force it to Foreground (using -n doesn't force existing
// devices to the foreground)
await launchSimulator(<String>[]);
}
}
/// Return the list of iOS Simulators (there can only be zero or one).
List<IOSEmulator> getEmulators() {
final String? simulatorPath = globals.xcode?.getSimulatorPath();
if (simulatorPath == null) {
return <IOSEmulator>[];
}
return <IOSEmulator>[const IOSEmulator(iosSimulatorId)];
}
| flutter/packages/flutter_tools/lib/src/ios/ios_emulators.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/ios/ios_emulators.dart",
"repo_id": "flutter",
"token_count": 770
} | 806 |
// Copyright 2014 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.
import 'package:meta/meta.dart';
import '../../src/base/process.dart';
import '../../src/convert.dart' show json;
import '../../src/macos/xcode.dart';
import '../convert.dart';
/// The generator of xcresults.
///
/// Call [generate] after an iOS/MacOS build will generate a [XCResult].
/// This only works when the `-resultBundleVersion` is set to 3.
/// * See also: [XCResult].
class XCResultGenerator {
/// Construct the [XCResultGenerator].
XCResultGenerator({
required this.resultPath,
required this.xcode,
required this.processUtils,
});
/// The file path that used to store the xcrun result.
///
/// There's usually a `resultPath.xcresult` file in the same folder.
final String resultPath;
/// The [ProcessUtils] to run commands.
final ProcessUtils processUtils;
/// [Xcode] object used to run xcode command.
final Xcode xcode;
/// Generates the XCResult.
///
/// Calls `xcrun xcresulttool get --path <resultPath> --format json`,
/// then stores the useful information the json into an [XCResult] object.
///
/// A`issueDiscarders` can be passed to discard any issues that matches the description of any [XCResultIssueDiscarder] in the list.
Future<XCResult> generate(
{List<XCResultIssueDiscarder> issueDiscarders =
const <XCResultIssueDiscarder>[]}) async {
final RunResult result = await processUtils.run(
<String>[
...xcode.xcrunCommand(),
'xcresulttool',
'get',
'--path',
resultPath,
'--format',
'json',
],
);
if (result.exitCode != 0) {
return XCResult.failed(errorMessage: result.stderr);
}
if (result.stdout.isEmpty) {
return XCResult.failed(
errorMessage: 'xcresult parser: Unrecognized top level json format.');
}
final Object? resultJson = json.decode(result.stdout);
if (resultJson == null || resultJson is! Map<String, Object?>) {
// If json parsing failed, indicate such error.
// This also includes the top level json object is an array, which indicates
// the structure of the json is changed and this parser class possibly needs to update for this change.
return XCResult.failed(
errorMessage: 'xcresult parser: Unrecognized top level json format.');
}
return XCResult(resultJson: resultJson, issueDiscarders: issueDiscarders);
}
}
/// The xcresult of an `xcodebuild` command.
///
/// This is the result from an `xcrun xcresulttool get --path <resultPath> --format json` run.
/// The result contains useful information such as build errors and warnings.
class XCResult {
/// Parse the `resultJson` and stores useful information in the returned `XCResult`.
factory XCResult({required Map<String, Object?> resultJson, List<XCResultIssueDiscarder> issueDiscarders = const <XCResultIssueDiscarder>[]}) {
final List<XCResultIssue> issues = <XCResultIssue>[];
final Object? issuesMap = resultJson['issues'];
if (issuesMap == null || issuesMap is! Map<String, Object?>) {
return XCResult.failed(
errorMessage: 'xcresult parser: Failed to parse the issues map.');
}
final Object? errorSummaries = issuesMap['errorSummaries'];
if (errorSummaries is Map<String, Object?>) {
issues.addAll(_parseIssuesFromIssueSummariesJson(
type: XCResultIssueType.error,
issueSummariesJson: errorSummaries,
issueDiscarder: issueDiscarders,
));
}
final Object? warningSummaries = issuesMap['warningSummaries'];
if (warningSummaries is Map<String, Object?>) {
issues.addAll(_parseIssuesFromIssueSummariesJson(
type: XCResultIssueType.warning,
issueSummariesJson: warningSummaries,
issueDiscarder: issueDiscarders,
));
}
final Object? actionsMap = resultJson['actions'];
if (actionsMap is Map<String, Object?>) {
final List<XCResultIssue> actionIssues = _parseActionIssues(actionsMap, issueDiscarders: issueDiscarders);
issues.addAll(actionIssues);
}
return XCResult._(issues: issues);
}
factory XCResult.failed({required String errorMessage}) {
return XCResult._(
parseSuccess: false,
parsingErrorMessage: errorMessage,
);
}
/// Create a [XCResult] with constructed [XCResultIssue]s for testing.
@visibleForTesting
factory XCResult.test({
List<XCResultIssue>? issues,
bool? parseSuccess,
String? parsingErrorMessage,
}) {
return XCResult._(
issues: issues ?? const <XCResultIssue>[],
parseSuccess: parseSuccess ?? true,
parsingErrorMessage: parsingErrorMessage,
);
}
XCResult._({
this.issues = const <XCResultIssue>[],
this.parseSuccess = true,
this.parsingErrorMessage,
});
/// The issues in the xcresult file.
final List<XCResultIssue> issues;
/// Indicate if the xcresult was successfully parsed.
///
/// See also: [parsingErrorMessage] for the error message if the parsing was unsuccessful.
final bool parseSuccess;
/// The error message describes why the parse if unsuccessful.
///
/// This is `null` if [parseSuccess] is `true`.
final String? parsingErrorMessage;
}
/// An issue object in the XCResult
class XCResultIssue {
/// Construct an `XCResultIssue` object from `issueJson`.
///
/// `issueJson` is the object at xcresultJson[['actions']['_values'][0]['buildResult']['issues']['errorSummaries'/'warningSummaries']['_values'].
factory XCResultIssue({
required XCResultIssueType type,
required Map<String, Object?> issueJson,
}) {
// Parse type.
final Object? issueSubTypeMap = issueJson['issueType'];
String? subType;
if (issueSubTypeMap is Map<String, Object?>) {
final Object? subTypeValue = issueSubTypeMap['_value'];
if (subTypeValue is String) {
subType = subTypeValue;
}
}
// Parse message.
String? message;
final Object? messageMap = issueJson['message'];
if (messageMap is Map<String, Object?>) {
final Object? messageValue = messageMap['_value'];
if (messageValue is String) {
message = messageValue;
}
}
final List<String> warnings = <String>[];
// Parse url and convert it to a location String.
String? location;
final Object? documentLocationInCreatingWorkspaceMap =
issueJson['documentLocationInCreatingWorkspace'];
if (documentLocationInCreatingWorkspaceMap is Map<String, Object?>) {
final Object? urlMap = documentLocationInCreatingWorkspaceMap['url'];
if (urlMap is Map<String, Object?>) {
final Object? urlValue = urlMap['_value'];
if (urlValue is String) {
location = _convertUrlToLocationString(urlValue);
if (location == null) {
warnings.add(
'(XCResult) The `url` exists but it was failed to be parsed. url: $urlValue');
}
}
}
}
return XCResultIssue._(
type: type,
subType: subType,
message: message,
location: location,
warnings: warnings,
);
}
/// Create a [XCResultIssue] without JSON parsing for testing.
@visibleForTesting
factory XCResultIssue.test({
XCResultIssueType type = XCResultIssueType.error,
String? subType,
String? message,
String? location,
List<String> warnings = const <String>[],
}) {
return XCResultIssue._(
type: type,
subType: subType,
message: message,
location: location,
warnings: warnings,
);
}
XCResultIssue._({
required this.type,
required this.subType,
required this.message,
required this.location,
required this.warnings,
});
/// The type of the issue.
final XCResultIssueType type;
/// The sub type of the issue.
///
/// This is a more detailed category about the issue.
/// The possible values are `Warning`, `Semantic Issue'` etc.
final String? subType;
/// Human readable message for the issue.
///
/// This can be displayed to user for their information.
final String? message;
/// The location where the issue occurs.
///
/// This is a re-formatted version of the "url" value in the json.
/// The format looks like <FileLocation>:<StartingLineNumber>:<StartingColumnNumber>.
final String? location;
/// Warnings when constructing the issue object.
final List<String> warnings;
}
/// The type of an `XCResultIssue`.
enum XCResultIssueType {
/// The issue is an warning.
///
/// This is for all the issues under the `warningSummaries` key in the xcresult.
warning,
/// The issue is an warning.
///
/// This is for all the issues under the `errorSummaries` key in the xcresult.
error,
}
/// Discards the [XCResultIssue] that matches any of the matchers.
class XCResultIssueDiscarder {
XCResultIssueDiscarder(
{this.typeMatcher,
this.subTypeMatcher,
this.messageMatcher,
this.locationMatcher})
: assert(typeMatcher != null ||
subTypeMatcher != null ||
messageMatcher != null ||
locationMatcher != null);
/// The type of the discarder.
///
/// A [XCResultIssue] should be discarded if its `type` equals to this.
final XCResultIssueType? typeMatcher;
/// The subType of the discarder.
///
/// A [XCResultIssue] should be discarded if its `subType` matches the RegExp.
final RegExp? subTypeMatcher;
/// The message of the discarder.
///
/// A [XCResultIssue] should be discarded if its `message` matches the RegExp.
final RegExp? messageMatcher;
/// The location of the discarder.
///
/// A [XCResultIssue] should be discarded if its `location` matches the RegExp.
final RegExp? locationMatcher;
}
// A typical location url string looks like file:///foo.swift#CharacterRangeLen=0&EndingColumnNumber=82&EndingLineNumber=7&StartingColumnNumber=82&StartingLineNumber=7.
//
// This function converts it to something like: /foo.swift:<StartingLineNumber>:<StartingColumnNumber>.
String? _convertUrlToLocationString(String url) {
final Uri? fragmentLocation = Uri.tryParse(url);
if (fragmentLocation == null) {
return null;
}
// Parse the fragment as a query of key-values:
final Uri fileLocation = Uri(
path: fragmentLocation.path,
query: fragmentLocation.fragment,
);
String startingLineNumber =
fileLocation.queryParameters['StartingLineNumber'] ?? '';
if (startingLineNumber.isNotEmpty) {
startingLineNumber = ':$startingLineNumber';
}
String startingColumnNumber =
fileLocation.queryParameters['StartingColumnNumber'] ?? '';
if (startingColumnNumber.isNotEmpty) {
startingColumnNumber = ':$startingColumnNumber';
}
return '${fileLocation.path}$startingLineNumber$startingColumnNumber';
}
// Determine if an `issue` should be discarded based on the `discarder`.
bool _shouldDiscardIssue(
{required XCResultIssue issue, required XCResultIssueDiscarder discarder}) {
if (issue.type == discarder.typeMatcher) {
return true;
}
if (issue.subType != null &&
discarder.subTypeMatcher != null &&
discarder.subTypeMatcher!.hasMatch(issue.subType!)) {
return true;
}
if (issue.message != null &&
discarder.messageMatcher != null &&
discarder.messageMatcher!.hasMatch(issue.message!)) {
return true;
}
if (issue.location != null &&
discarder.locationMatcher != null &&
discarder.locationMatcher!.hasMatch(issue.location!)) {
return true;
}
return false;
}
List<XCResultIssue> _parseIssuesFromIssueSummariesJson({
required XCResultIssueType type,
required Map<String, Object?> issueSummariesJson,
required List<XCResultIssueDiscarder> issueDiscarder,
}) {
final List<XCResultIssue> issues = <XCResultIssue>[];
final Object? errorsList = issueSummariesJson['_values'];
if (errorsList is List<Object?>) {
for (final Object? issueJson in errorsList) {
if (issueJson == null || issueJson is! Map<String, Object?>) {
continue;
}
final XCResultIssue resultIssue = XCResultIssue(
type: type,
issueJson: issueJson,
);
bool discard = false;
for (final XCResultIssueDiscarder discarder in issueDiscarder) {
if (_shouldDiscardIssue(issue: resultIssue, discarder: discarder)) {
discard = true;
break;
}
}
if (discard) {
continue;
}
issues.add(resultIssue);
}
}
return issues;
}
List<XCResultIssue> _parseActionIssues(
Map<String, Object?> actionsMap, {
required List<XCResultIssueDiscarder> issueDiscarders,
}) {
// Example of json:
// {
// "actions" : {
// "_values" : [
// {
// "actionResult" : {
// "_type" : {
// "_name" : "ActionResult"
// },
// "issues" : {
// "_type" : {
// "_name" : "ResultIssueSummaries"
// },
// "testFailureSummaries" : {
// "_type" : {
// "_name" : "Array"
// },
// "_values" : [
// {
// "_type" : {
// "_name" : "TestFailureIssueSummary",
// "_supertype" : {
// "_name" : "IssueSummary"
// }
// },
// "issueType" : {
// "_type" : {
// "_name" : "String"
// },
// "_value" : "Uncategorized"
// },
// "message" : {
// "_type" : {
// "_name" : "String"
// },
// "_value" : "Unable to find a destination matching the provided destination specifier:\n\t\t{ id:1234D567-890C-1DA2-34E5-F6789A0123C4 }\n\n\tIneligible destinations for the \"Runner\" scheme:\n\t\t{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 17.0 is not installed. To use with Xcode, first download and install the platform }"
// }
// }
// ]
// }
// }
// }
// }
// ]
// }
// }
final List<XCResultIssue> issues = <XCResultIssue>[];
final Object? actionsValues = actionsMap['_values'];
if (actionsValues is! List<Object?>) {
return issues;
}
for (final Object? actionValue in actionsValues) {
if (actionValue is!Map<String, Object?>) {
continue;
}
final Object? actionResult = actionValue['actionResult'];
if (actionResult is! Map<String, Object?>) {
continue;
}
final Object? actionResultIssues = actionResult['issues'];
if (actionResultIssues is! Map<String, Object?>) {
continue;
}
final Object? testFailureSummaries = actionResultIssues['testFailureSummaries'];
if (testFailureSummaries is Map<String, Object?>) {
issues.addAll(_parseIssuesFromIssueSummariesJson(
type: XCResultIssueType.error,
issueSummariesJson: testFailureSummaries,
issueDiscarder: issueDiscarders,
));
}
}
return issues;
}
| flutter/packages/flutter_tools/lib/src/ios/xcresult.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/ios/xcresult.dart",
"repo_id": "flutter",
"token_count": 5940
} | 807 |
// Copyright 2014 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.
import 'package:unified_analytics/unified_analytics.dart';
import '../artifacts.dart';
import '../base/analyze_size.dart';
import '../base/common.dart';
import '../base/file_system.dart';
import '../base/logger.dart';
import '../base/project_migrator.dart';
import '../base/utils.dart';
import '../build_info.dart';
import '../cache.dart';
import '../cmake.dart';
import '../cmake_project.dart';
import '../convert.dart';
import '../flutter_plugins.dart';
import '../globals.dart' as globals;
import '../migrations/cmake_custom_command_migration.dart';
import '../migrations/cmake_native_assets_migration.dart';
// Matches the following error and warning patterns:
// - <file path>:<line>:<column>: (fatal) error: <error...>
// - <file path>:<line>:<column>: warning: <warning...>
// - clang: error: <link error...>
// - Error: <tool error...>
final RegExp errorMatcher = RegExp(r'(?:(?:.*:\d+:\d+|clang):\s)?(fatal\s)?(?:error|warning):\s.*', caseSensitive: false);
/// Builds the Linux project through the Makefile.
Future<void> buildLinux(
LinuxProject linuxProject,
BuildInfo buildInfo, {
String? target,
SizeAnalyzer? sizeAnalyzer,
bool needCrossBuild = false,
required TargetPlatform targetPlatform,
String targetSysroot = '/',
required Logger logger,
}) async {
target ??= 'lib/main.dart';
if (!linuxProject.cmakeFile.existsSync()) {
throwToolExit('No Linux desktop project configured. See '
'https://docs.flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app '
'to learn about adding Linux support to a project.');
}
final List<ProjectMigrator> migrators = <ProjectMigrator>[
CmakeCustomCommandMigration(linuxProject, logger),
CmakeNativeAssetsMigration(linuxProject, 'linux', logger),
];
final ProjectMigration migration = ProjectMigration(migrators);
migration.run();
// Build the environment that needs to be set for the re-entrant flutter build
// step.
final Map<String, String> environmentConfig = buildInfo.toEnvironmentConfig();
environmentConfig['FLUTTER_TARGET'] = target;
final LocalEngineInfo? localEngineInfo = globals.artifacts?.localEngineInfo;
if (localEngineInfo != null) {
final String targetOutPath = localEngineInfo.targetOutPath;
// $ENGINE/src/out/foo_bar_baz -> $ENGINE/src
environmentConfig['FLUTTER_ENGINE'] = globals.fs.path.dirname(globals.fs.path.dirname(targetOutPath));
environmentConfig['LOCAL_ENGINE'] = localEngineInfo.localTargetName;
environmentConfig['LOCAL_ENGINE_HOST'] = localEngineInfo.localHostName;
}
writeGeneratedCmakeConfig(Cache.flutterRoot!, linuxProject, buildInfo, environmentConfig, logger);
createPluginSymlinks(linuxProject.parent);
final Status status = logger.startProgress(
'Building Linux application...',
);
try {
final String buildModeName = buildInfo.mode.cliName;
final Directory buildDirectory =
globals.fs.directory(getLinuxBuildDirectory(targetPlatform)).childDirectory(buildModeName);
await _runCmake(buildModeName, linuxProject.cmakeFile.parent, buildDirectory,
needCrossBuild, targetPlatform, targetSysroot);
await _runBuild(buildDirectory);
} finally {
status.cancel();
}
if (buildInfo.codeSizeDirectory != null && sizeAnalyzer != null) {
final String arch = getNameForTargetPlatform(targetPlatform);
final File codeSizeFile = globals.fs.directory(buildInfo.codeSizeDirectory)
.childFile('snapshot.$arch.json');
final File precompilerTrace = globals.fs.directory(buildInfo.codeSizeDirectory)
.childFile('trace.$arch.json');
final Map<String, Object?> output = await sizeAnalyzer.analyzeAotSnapshot(
aotSnapshot: codeSizeFile,
// This analysis is only supported for release builds.
outputDirectory: globals.fs.directory(
globals.fs.path.join(getLinuxBuildDirectory(targetPlatform), 'release', 'bundle'),
),
precompilerTrace: precompilerTrace,
type: 'linux',
);
final File outputFile = globals.fsUtils.getUniqueFile(
globals.fs
.directory(globals.fsUtils.homeDirPath)
.childDirectory('.flutter-devtools'), 'linux-code-size-analysis', 'json',
)..writeAsStringSync(jsonEncode(output));
// This message is used as a sentinel in analyze_apk_size_test.dart
logger.printStatus(
'A summary of your Linux bundle analysis can be found at: ${outputFile.path}',
);
// DevTools expects a file path relative to the .flutter-devtools/ dir.
final String relativeAppSizePath = outputFile.path.split('.flutter-devtools/').last.trim();
logger.printStatus(
'\nTo analyze your app size in Dart DevTools, run the following command:\n'
'dart devtools --appSizeBase=$relativeAppSizePath'
);
}
}
Future<void> _runCmake(String buildModeName, Directory sourceDir, Directory buildDir,
bool needCrossBuild, TargetPlatform targetPlatform, String targetSysroot) async {
final Stopwatch sw = Stopwatch()..start();
await buildDir.create(recursive: true);
final String buildFlag = sentenceCase(buildModeName);
final bool needCrossBuildOptionsForArm64 = needCrossBuild
&& targetPlatform == TargetPlatform.linux_arm64;
int result;
if (!globals.processManager.canRun('cmake')) {
throwToolExit(globals.userMessages.cmakeMissing);
}
result = await globals.processUtils.stream(
<String>[
'cmake',
'-G',
'Ninja',
'-DCMAKE_BUILD_TYPE=$buildFlag',
'-DFLUTTER_TARGET_PLATFORM=${getNameForTargetPlatform(targetPlatform)}',
// Support cross-building for arm64 targets on x64 hosts.
// (Cross-building for x64 on arm64 hosts isn't supported now.)
if (needCrossBuild)
'-DFLUTTER_TARGET_PLATFORM_SYSROOT=$targetSysroot',
if (needCrossBuildOptionsForArm64)
'-DCMAKE_C_COMPILER_TARGET=aarch64-linux-gnu',
if (needCrossBuildOptionsForArm64)
'-DCMAKE_CXX_COMPILER_TARGET=aarch64-linux-gnu',
sourceDir.path,
],
workingDirectory: buildDir.path,
environment: <String, String>{
'CC': 'clang',
'CXX': 'clang++',
},
trace: true,
);
if (result != 0) {
throwToolExit('Unable to generate build files');
}
final Duration elapsedDuration = sw.elapsed;
globals.flutterUsage.sendTiming('build', 'cmake-linux', elapsedDuration);
globals.analytics.send(Event.timing(
workflow: 'build',
variableName: 'cmake-linux',
elapsedMilliseconds: elapsedDuration.inMilliseconds,
));
}
Future<void> _runBuild(Directory buildDir) async {
final Stopwatch sw = Stopwatch()..start();
int result;
try {
result = await globals.processUtils.stream(
<String>[
'ninja',
'-C',
buildDir.path,
'install',
],
environment: <String, String>{
if (globals.logger.isVerbose)
'VERBOSE_SCRIPT_LOGGING': 'true',
if (!globals.logger.isVerbose)
'PREFIXED_ERROR_LOGGING': 'true',
},
trace: true,
stdoutErrorMatcher: errorMatcher,
);
} on ArgumentError {
throwToolExit("ninja not found. Run 'flutter doctor' for more information.");
}
if (result != 0) {
throwToolExit('Build process failed');
}
final Duration elapsedDuration = sw.elapsed;
globals.flutterUsage.sendTiming('build', 'linux-ninja', elapsedDuration);
globals.analytics.send(Event.timing(
workflow: 'build',
variableName: 'linux-ninja',
elapsedMilliseconds: elapsedDuration.inMilliseconds,
));
}
| flutter/packages/flutter_tools/lib/src/linux/build_linux.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/linux/build_linux.dart",
"repo_id": "flutter",
"token_count": 2727
} | 808 |
// Copyright 2014 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.
import 'dart:async';
import 'package:process/process.dart';
import '../application_package.dart';
import '../base/file_system.dart';
import '../base/logger.dart';
import '../base/os.dart';
import '../base/platform.dart';
import '../build_info.dart';
import '../desktop_device.dart';
import '../device.dart';
import '../ios/ios_workflow.dart';
import '../project.dart';
/// Represents an ARM macOS target that can run iPad apps.
///
/// https://developer.apple.com/documentation/apple-silicon/running-your-ios-apps-on-macos
class MacOSDesignedForIPadDevice extends DesktopDevice {
MacOSDesignedForIPadDevice({
required ProcessManager processManager,
required Logger logger,
required FileSystem fileSystem,
required OperatingSystemUtils operatingSystemUtils,
}) : _operatingSystemUtils = operatingSystemUtils,
super(
'mac-designed-for-ipad',
platformType: PlatformType.macos,
ephemeral: false,
processManager: processManager,
logger: logger,
fileSystem: fileSystem,
operatingSystemUtils: operatingSystemUtils,
);
final OperatingSystemUtils _operatingSystemUtils;
@override
String get name => 'Mac Designed for iPad';
@override
Future<TargetPlatform> get targetPlatform async => TargetPlatform.darwin;
@override
bool isSupported() => _operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm64;
@override
bool get supportsFlavors => true;
@override
bool isSupportedForProject(FlutterProject flutterProject) {
return flutterProject.ios.existsSync() && _operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm64;
}
@override
String? executablePathForDevice(ApplicationPackage package, BuildInfo buildInfo) => null;
@override
Future<LaunchResult> startApp(
ApplicationPackage? package, {
String? mainPath,
String? route,
required DebuggingOptions debuggingOptions,
Map<String, Object?> platformArgs = const <String, Object>{},
bool prebuiltApplication = false,
bool ipv6 = false,
String? userIdentifier,
}) async {
// Only attaching to a running app launched from Xcode is supported.
throw UnimplementedError('Building for "$name" is not supported.');
}
@override
Future<bool> stopApp(
ApplicationPackage? app, {
String? userIdentifier,
}) async => false;
@override
Future<void> buildForDevice({
String? mainPath,
required BuildInfo buildInfo,
}) async {
// Only attaching to a running app launched from Xcode is supported.
throw UnimplementedError('Building for "$name" is not supported.');
}
}
class MacOSDesignedForIPadDevices extends PollingDeviceDiscovery {
MacOSDesignedForIPadDevices({
required Platform platform,
required IOSWorkflow iosWorkflow,
required ProcessManager processManager,
required Logger logger,
required FileSystem fileSystem,
required OperatingSystemUtils operatingSystemUtils,
}) : _logger = logger,
_platform = platform,
_iosWorkflow = iosWorkflow,
_processManager = processManager,
_fileSystem = fileSystem,
_operatingSystemUtils = operatingSystemUtils,
super('Mac designed for iPad devices');
final IOSWorkflow _iosWorkflow;
final Platform _platform;
final ProcessManager _processManager;
final Logger _logger;
final FileSystem _fileSystem;
final OperatingSystemUtils _operatingSystemUtils;
@override
bool get supportsPlatform => _platform.isMacOS;
/// iOS (not desktop macOS) development is enabled, the host is an ARM Mac,
/// and discovery is allowed for this command.
@override
bool get canListAnything =>
_iosWorkflow.canListDevices && _operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm64;
@override
Future<List<Device>> pollingGetDevices({Duration? timeout}) async {
if (!canListAnything) {
return const <Device>[];
}
return <Device>[
MacOSDesignedForIPadDevice(
processManager: _processManager,
logger: _logger,
fileSystem: _fileSystem,
operatingSystemUtils: _operatingSystemUtils,
),
];
}
@override
Future<List<String>> getDiagnostics() async => const <String>[];
@override
List<String> get wellKnownIds => const <String>['mac-designed-for-ipad'];
}
| flutter/packages/flutter_tools/lib/src/macos/macos_ipad_device.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/macos/macos_ipad_device.dart",
"repo_id": "flutter",
"token_count": 1489
} | 809 |
// Copyright 2014 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.
import 'build_info.dart';
/// An interface to enable overriding native assets build logic in other
/// build systems.
abstract class TestCompilerNativeAssetsBuilder {
Future<Uri?> build(BuildInfo buildInfo);
}
| flutter/packages/flutter_tools/lib/src/native_assets.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/native_assets.dart",
"repo_id": "flutter",
"token_count": 100
} | 810 |
// Copyright 2014 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.
part of 'reporting.dart';
/// The collection of custom dimensions understood by the analytics backend.
/// When adding to this list, first ensure that the custom dimension is
/// defined in the backend, or will be defined shortly after the relevant PR
/// lands.
@immutable
class CustomDimensions {
const CustomDimensions({
this.sessionHostOsDetails,
this.sessionChannelName,
this.commandRunIsEmulator,
this.commandRunTargetName,
this.hotEventReason,
this.hotEventFinalLibraryCount,
this.hotEventSyncedLibraryCount,
this.hotEventSyncedClassesCount,
this.hotEventSyncedProceduresCount,
this.hotEventSyncedBytes,
this.hotEventInvalidatedSourcesCount,
this.hotEventTransferTimeInMs,
this.hotEventOverallTimeInMs,
this.commandRunProjectType,
this.commandRunProjectHostLanguage,
this.commandCreateAndroidLanguage,
this.commandCreateIosLanguage,
this.commandRunProjectModule,
this.commandCreateProjectType,
this.commandPackagesNumberPlugins,
this.commandPackagesProjectModule,
this.commandRunTargetOsVersion,
this.commandRunModeName,
this.commandBuildBundleTargetPlatform,
this.commandBuildBundleIsModule,
this.commandResult,
this.hotEventTargetPlatform,
this.hotEventSdkName,
this.hotEventEmulator,
this.hotEventFullRestart,
this.commandHasTerminal,
this.enabledFlutterFeatures,
this.localTime,
this.commandBuildAarTargetPlatform,
this.commandBuildAarProjectType,
this.buildEventCommand,
this.buildEventSettings,
this.commandBuildApkTargetPlatform,
this.commandBuildApkBuildMode,
this.commandBuildApkSplitPerAbi,
this.commandBuildAppBundleTargetPlatform,
this.commandBuildAppBundleBuildMode,
this.buildEventError,
this.commandResultEventMaxRss,
this.commandRunAndroidEmbeddingVersion,
this.commandPackagesAndroidEmbeddingVersion,
this.nullSafety,
this.nullSafeMigratedLibraries,
this.nullSafeTotalLibraries,
this.hotEventCompileTimeInMs,
this.hotEventFindInvalidatedTimeInMs,
this.hotEventScannedSourcesCount,
this.hotEventReassembleTimeInMs,
this.hotEventReloadVMTimeInMs,
this.commandRunEnableImpeller,
this.commandRunIOSInterfaceType,
this.commandRunIsTest,
});
final String? sessionHostOsDetails; // cd1
final String? sessionChannelName; // cd2
final bool? commandRunIsEmulator; // cd3
final String? commandRunTargetName; // cd4
final String? hotEventReason; // cd5
final int? hotEventFinalLibraryCount; // cd6
final int? hotEventSyncedLibraryCount; // cd7
final int? hotEventSyncedClassesCount; // cd8
final int? hotEventSyncedProceduresCount; // cd9
final int? hotEventSyncedBytes; // cd10
final int? hotEventInvalidatedSourcesCount; // cd11
final int? hotEventTransferTimeInMs; // cd12
final int? hotEventOverallTimeInMs; // cd13
final String? commandRunProjectType; // cd14
final String? commandRunProjectHostLanguage; // cd15
final String? commandCreateAndroidLanguage; // cd16
final String? commandCreateIosLanguage; // cd17
final bool? commandRunProjectModule; // cd18
final String? commandCreateProjectType; // cd19
final int? commandPackagesNumberPlugins; // cd20
final bool? commandPackagesProjectModule; // cd21
final String? commandRunTargetOsVersion; // cd22
final String? commandRunModeName; // cd23
final String? commandBuildBundleTargetPlatform; // cd24
final bool? commandBuildBundleIsModule; // cd25
final String? commandResult; // cd26
final String? hotEventTargetPlatform; // cd27
final String? hotEventSdkName; // cd28
final bool? hotEventEmulator; // cd29
final bool? hotEventFullRestart; // cd30
final bool? commandHasTerminal; // cd31
final String? enabledFlutterFeatures; // cd32
final String? localTime; // cd33
final String? commandBuildAarTargetPlatform; // cd34
final String? commandBuildAarProjectType; // cd35
final String? buildEventCommand; // cd36
final String? buildEventSettings; // cd37
final String? commandBuildApkTargetPlatform; // cd38
final String? commandBuildApkBuildMode; // cd39
final bool? commandBuildApkSplitPerAbi; // cd40
final String? commandBuildAppBundleTargetPlatform; // cd41
final String? commandBuildAppBundleBuildMode; // cd42
final String? buildEventError; // cd43
final int? commandResultEventMaxRss; // cd44
final String? commandRunAndroidEmbeddingVersion; // cd45
final String? commandPackagesAndroidEmbeddingVersion; // cd46
final bool? nullSafety; // cd47
// cd48 was fastReassemble but that feature was removed
final int? nullSafeMigratedLibraries; // cd49
final int? nullSafeTotalLibraries; // cd50
final int? hotEventCompileTimeInMs; // cd51
final int? hotEventFindInvalidatedTimeInMs; // cd52
final int? hotEventScannedSourcesCount; // cd53
final int? hotEventReassembleTimeInMs; // cd54
final int? hotEventReloadVMTimeInMs; // cd55
final bool? commandRunEnableImpeller; // cd56
final String? commandRunIOSInterfaceType; // cd57
final bool? commandRunIsTest; // cd58
/// Convert to a map that will be used to upload to the analytics backend.
Map<String, String> toMap() => <String, String>{
if (sessionHostOsDetails != null) CustomDimensionsEnum.sessionHostOsDetails.cdKey: sessionHostOsDetails.toString(),
if (sessionChannelName != null) CustomDimensionsEnum.sessionChannelName.cdKey: sessionChannelName.toString(),
if (commandRunIsEmulator != null) CustomDimensionsEnum.commandRunIsEmulator.cdKey: commandRunIsEmulator.toString(),
if (commandRunTargetName != null) CustomDimensionsEnum.commandRunTargetName.cdKey: commandRunTargetName.toString(),
if (hotEventReason != null) CustomDimensionsEnum.hotEventReason.cdKey: hotEventReason.toString(),
if (hotEventFinalLibraryCount != null) CustomDimensionsEnum.hotEventFinalLibraryCount.cdKey: hotEventFinalLibraryCount.toString(),
if (hotEventSyncedLibraryCount != null) CustomDimensionsEnum.hotEventSyncedLibraryCount.cdKey: hotEventSyncedLibraryCount.toString(),
if (hotEventSyncedClassesCount != null) CustomDimensionsEnum.hotEventSyncedClassesCount.cdKey: hotEventSyncedClassesCount.toString(),
if (hotEventSyncedProceduresCount != null) CustomDimensionsEnum.hotEventSyncedProceduresCount.cdKey: hotEventSyncedProceduresCount.toString(),
if (hotEventSyncedBytes != null) CustomDimensionsEnum.hotEventSyncedBytes.cdKey: hotEventSyncedBytes.toString(),
if (hotEventInvalidatedSourcesCount != null) CustomDimensionsEnum.hotEventInvalidatedSourcesCount.cdKey: hotEventInvalidatedSourcesCount.toString(),
if (hotEventTransferTimeInMs != null) CustomDimensionsEnum.hotEventTransferTimeInMs.cdKey: hotEventTransferTimeInMs.toString(),
if (hotEventOverallTimeInMs != null) CustomDimensionsEnum.hotEventOverallTimeInMs.cdKey: hotEventOverallTimeInMs.toString(),
if (commandRunProjectType != null) CustomDimensionsEnum.commandRunProjectType.cdKey: commandRunProjectType.toString(),
if (commandRunProjectHostLanguage != null) CustomDimensionsEnum.commandRunProjectHostLanguage.cdKey: commandRunProjectHostLanguage.toString(),
if (commandCreateAndroidLanguage != null) CustomDimensionsEnum.commandCreateAndroidLanguage.cdKey: commandCreateAndroidLanguage.toString(),
if (commandCreateIosLanguage != null) CustomDimensionsEnum.commandCreateIosLanguage.cdKey: commandCreateIosLanguage.toString(),
if (commandRunProjectModule != null) CustomDimensionsEnum.commandRunProjectModule.cdKey: commandRunProjectModule.toString(),
if (commandCreateProjectType != null) CustomDimensionsEnum.commandCreateProjectType.cdKey: commandCreateProjectType.toString(),
if (commandPackagesNumberPlugins != null) CustomDimensionsEnum.commandPackagesNumberPlugins.cdKey: commandPackagesNumberPlugins.toString(),
if (commandPackagesProjectModule != null) CustomDimensionsEnum.commandPackagesProjectModule.cdKey: commandPackagesProjectModule.toString(),
if (commandRunTargetOsVersion != null) CustomDimensionsEnum.commandRunTargetOsVersion.cdKey: commandRunTargetOsVersion.toString(),
if (commandRunModeName != null) CustomDimensionsEnum.commandRunModeName.cdKey: commandRunModeName.toString(),
if (commandBuildBundleTargetPlatform != null) CustomDimensionsEnum.commandBuildBundleTargetPlatform.cdKey: commandBuildBundleTargetPlatform.toString(),
if (commandBuildBundleIsModule != null) CustomDimensionsEnum.commandBuildBundleIsModule.cdKey: commandBuildBundleIsModule.toString(),
if (commandResult != null) CustomDimensionsEnum.commandResult.cdKey: commandResult.toString(),
if (hotEventTargetPlatform != null) CustomDimensionsEnum.hotEventTargetPlatform.cdKey: hotEventTargetPlatform.toString(),
if (hotEventSdkName != null) CustomDimensionsEnum.hotEventSdkName.cdKey: hotEventSdkName.toString(),
if (hotEventEmulator != null) CustomDimensionsEnum.hotEventEmulator.cdKey: hotEventEmulator.toString(),
if (hotEventFullRestart != null) CustomDimensionsEnum.hotEventFullRestart.cdKey: hotEventFullRestart.toString(),
if (commandHasTerminal != null) CustomDimensionsEnum.commandHasTerminal.cdKey: commandHasTerminal.toString(),
if (enabledFlutterFeatures != null) CustomDimensionsEnum.enabledFlutterFeatures.cdKey: enabledFlutterFeatures.toString(),
if (localTime != null) CustomDimensionsEnum.localTime.cdKey: localTime.toString(),
if (commandBuildAarTargetPlatform != null) CustomDimensionsEnum.commandBuildAarTargetPlatform.cdKey: commandBuildAarTargetPlatform.toString(),
if (commandBuildAarProjectType != null) CustomDimensionsEnum.commandBuildAarProjectType.cdKey: commandBuildAarProjectType.toString(),
if (buildEventCommand != null) CustomDimensionsEnum.buildEventCommand.cdKey: buildEventCommand.toString(),
if (buildEventSettings != null) CustomDimensionsEnum.buildEventSettings.cdKey: buildEventSettings.toString(),
if (commandBuildApkTargetPlatform != null) CustomDimensionsEnum.commandBuildApkTargetPlatform.cdKey: commandBuildApkTargetPlatform.toString(),
if (commandBuildApkBuildMode != null) CustomDimensionsEnum.commandBuildApkBuildMode.cdKey: commandBuildApkBuildMode.toString(),
if (commandBuildApkSplitPerAbi != null) CustomDimensionsEnum.commandBuildApkSplitPerAbi.cdKey: commandBuildApkSplitPerAbi.toString(),
if (commandBuildAppBundleTargetPlatform != null) CustomDimensionsEnum.commandBuildAppBundleTargetPlatform.cdKey: commandBuildAppBundleTargetPlatform.toString(),
if (commandBuildAppBundleBuildMode != null) CustomDimensionsEnum.commandBuildAppBundleBuildMode.cdKey: commandBuildAppBundleBuildMode.toString(),
if (buildEventError != null) CustomDimensionsEnum.buildEventError.cdKey: buildEventError.toString(),
if (commandResultEventMaxRss != null) CustomDimensionsEnum.commandResultEventMaxRss.cdKey: commandResultEventMaxRss.toString(),
if (commandRunAndroidEmbeddingVersion != null) CustomDimensionsEnum.commandRunAndroidEmbeddingVersion.cdKey: commandRunAndroidEmbeddingVersion.toString(),
if (commandPackagesAndroidEmbeddingVersion != null) CustomDimensionsEnum.commandPackagesAndroidEmbeddingVersion.cdKey: commandPackagesAndroidEmbeddingVersion.toString(),
if (nullSafety != null) CustomDimensionsEnum.nullSafety.cdKey: nullSafety.toString(),
if (nullSafeMigratedLibraries != null) CustomDimensionsEnum.nullSafeMigratedLibraries.cdKey: nullSafeMigratedLibraries.toString(),
if (nullSafeTotalLibraries != null) CustomDimensionsEnum.nullSafeTotalLibraries.cdKey: nullSafeTotalLibraries.toString(),
if (hotEventCompileTimeInMs != null) CustomDimensionsEnum.hotEventCompileTimeInMs.cdKey: hotEventCompileTimeInMs.toString(),
if (hotEventFindInvalidatedTimeInMs != null) CustomDimensionsEnum.hotEventFindInvalidatedTimeInMs.cdKey: hotEventFindInvalidatedTimeInMs.toString(),
if (hotEventScannedSourcesCount != null) CustomDimensionsEnum.hotEventScannedSourcesCount.cdKey: hotEventScannedSourcesCount.toString(),
if (hotEventReassembleTimeInMs != null) CustomDimensionsEnum.hotEventReassembleTimeInMs.cdKey: hotEventReassembleTimeInMs.toString(),
if (hotEventReloadVMTimeInMs != null) CustomDimensionsEnum.hotEventReloadVMTimeInMs.cdKey: hotEventReloadVMTimeInMs.toString(),
if (commandRunEnableImpeller != null) CustomDimensionsEnum.commandRunEnableImpeller.cdKey: commandRunEnableImpeller.toString(),
if (commandRunIOSInterfaceType != null) CustomDimensionsEnum.commandRunIOSInterfaceType.cdKey: commandRunIOSInterfaceType.toString(),
if (commandRunIsTest != null) CustomDimensionsEnum.commandRunIsTest.cdKey: commandRunIsTest.toString(),
};
/// Merge the values of two [CustomDimensions] into one. If a value is defined
/// in both instances, the value in [other] will override the value in this.
CustomDimensions merge(CustomDimensions? other) {
if (other == null) {
return this;
}
return CustomDimensions(
sessionHostOsDetails: other.sessionHostOsDetails ?? sessionHostOsDetails,
sessionChannelName: other.sessionChannelName ?? sessionChannelName,
commandRunIsEmulator: other.commandRunIsEmulator ?? commandRunIsEmulator,
commandRunTargetName: other.commandRunTargetName ?? commandRunTargetName,
hotEventReason: other.hotEventReason ?? hotEventReason,
hotEventFinalLibraryCount: other.hotEventFinalLibraryCount ?? hotEventFinalLibraryCount,
hotEventSyncedLibraryCount: other.hotEventSyncedLibraryCount ?? hotEventSyncedLibraryCount,
hotEventSyncedClassesCount: other.hotEventSyncedClassesCount ?? hotEventSyncedClassesCount,
hotEventSyncedProceduresCount: other.hotEventSyncedProceduresCount ?? hotEventSyncedProceduresCount,
hotEventSyncedBytes: other.hotEventSyncedBytes ?? hotEventSyncedBytes,
hotEventInvalidatedSourcesCount: other.hotEventInvalidatedSourcesCount ?? hotEventInvalidatedSourcesCount,
hotEventTransferTimeInMs: other.hotEventTransferTimeInMs ?? hotEventTransferTimeInMs,
hotEventOverallTimeInMs: other.hotEventOverallTimeInMs ?? hotEventOverallTimeInMs,
commandRunProjectType: other.commandRunProjectType ?? commandRunProjectType,
commandRunProjectHostLanguage: other.commandRunProjectHostLanguage ?? commandRunProjectHostLanguage,
commandCreateAndroidLanguage: other.commandCreateAndroidLanguage ?? commandCreateAndroidLanguage,
commandCreateIosLanguage: other.commandCreateIosLanguage ?? commandCreateIosLanguage,
commandRunProjectModule: other.commandRunProjectModule ?? commandRunProjectModule,
commandCreateProjectType: other.commandCreateProjectType ?? commandCreateProjectType,
commandPackagesNumberPlugins: other.commandPackagesNumberPlugins ?? commandPackagesNumberPlugins,
commandPackagesProjectModule: other.commandPackagesProjectModule ?? commandPackagesProjectModule,
commandRunTargetOsVersion: other.commandRunTargetOsVersion ?? commandRunTargetOsVersion,
commandRunModeName: other.commandRunModeName ?? commandRunModeName,
commandBuildBundleTargetPlatform: other.commandBuildBundleTargetPlatform ?? commandBuildBundleTargetPlatform,
commandBuildBundleIsModule: other.commandBuildBundleIsModule ?? commandBuildBundleIsModule,
commandResult: other.commandResult ?? commandResult,
hotEventTargetPlatform: other.hotEventTargetPlatform ?? hotEventTargetPlatform,
hotEventSdkName: other.hotEventSdkName ?? hotEventSdkName,
hotEventEmulator: other.hotEventEmulator ?? hotEventEmulator,
hotEventFullRestart: other.hotEventFullRestart ?? hotEventFullRestart,
commandHasTerminal: other.commandHasTerminal ?? commandHasTerminal,
enabledFlutterFeatures: other.enabledFlutterFeatures ?? enabledFlutterFeatures,
localTime: other.localTime ?? localTime,
commandBuildAarTargetPlatform: other.commandBuildAarTargetPlatform ?? commandBuildAarTargetPlatform,
commandBuildAarProjectType: other.commandBuildAarProjectType ?? commandBuildAarProjectType,
buildEventCommand: other.buildEventCommand ?? buildEventCommand,
buildEventSettings: other.buildEventSettings ?? buildEventSettings,
commandBuildApkTargetPlatform: other.commandBuildApkTargetPlatform ?? commandBuildApkTargetPlatform,
commandBuildApkBuildMode: other.commandBuildApkBuildMode ?? commandBuildApkBuildMode,
commandBuildApkSplitPerAbi: other.commandBuildApkSplitPerAbi ?? commandBuildApkSplitPerAbi,
commandBuildAppBundleTargetPlatform: other.commandBuildAppBundleTargetPlatform ?? commandBuildAppBundleTargetPlatform,
commandBuildAppBundleBuildMode: other.commandBuildAppBundleBuildMode ?? commandBuildAppBundleBuildMode,
buildEventError: other.buildEventError ?? buildEventError,
commandResultEventMaxRss: other.commandResultEventMaxRss ?? commandResultEventMaxRss,
commandRunAndroidEmbeddingVersion: other.commandRunAndroidEmbeddingVersion ?? commandRunAndroidEmbeddingVersion,
commandPackagesAndroidEmbeddingVersion: other.commandPackagesAndroidEmbeddingVersion ?? commandPackagesAndroidEmbeddingVersion,
nullSafety: other.nullSafety ?? nullSafety,
nullSafeMigratedLibraries: other.nullSafeMigratedLibraries ?? nullSafeMigratedLibraries,
nullSafeTotalLibraries: other.nullSafeTotalLibraries ?? nullSafeTotalLibraries,
hotEventCompileTimeInMs: other.hotEventCompileTimeInMs ?? hotEventCompileTimeInMs,
hotEventFindInvalidatedTimeInMs: other.hotEventFindInvalidatedTimeInMs ?? hotEventFindInvalidatedTimeInMs,
hotEventScannedSourcesCount: other.hotEventScannedSourcesCount ?? hotEventScannedSourcesCount,
hotEventReassembleTimeInMs: other.hotEventReassembleTimeInMs ?? hotEventReassembleTimeInMs,
hotEventReloadVMTimeInMs: other.hotEventReloadVMTimeInMs ?? hotEventReloadVMTimeInMs,
commandRunEnableImpeller: other.commandRunEnableImpeller ?? commandRunEnableImpeller,
commandRunIOSInterfaceType: other.commandRunIOSInterfaceType ?? commandRunIOSInterfaceType,
commandRunIsTest: other.commandRunIsTest ?? commandRunIsTest,
);
}
static CustomDimensions fromMap(Map<String, String> map) => CustomDimensions(
sessionHostOsDetails: _extractString(map, CustomDimensionsEnum.sessionHostOsDetails),
sessionChannelName: _extractString(map, CustomDimensionsEnum.sessionChannelName),
commandRunIsEmulator: _extractBool(map, CustomDimensionsEnum.commandRunIsEmulator),
commandRunTargetName: _extractString(map, CustomDimensionsEnum.commandRunTargetName),
hotEventReason: _extractString(map, CustomDimensionsEnum.hotEventReason),
hotEventFinalLibraryCount: _extractInt(map, CustomDimensionsEnum.hotEventFinalLibraryCount),
hotEventSyncedLibraryCount: _extractInt(map, CustomDimensionsEnum.hotEventSyncedLibraryCount),
hotEventSyncedClassesCount: _extractInt(map, CustomDimensionsEnum.hotEventSyncedClassesCount),
hotEventSyncedProceduresCount: _extractInt(map, CustomDimensionsEnum.hotEventSyncedProceduresCount),
hotEventSyncedBytes: _extractInt(map, CustomDimensionsEnum.hotEventSyncedBytes),
hotEventInvalidatedSourcesCount: _extractInt(map, CustomDimensionsEnum.hotEventInvalidatedSourcesCount),
hotEventTransferTimeInMs: _extractInt(map, CustomDimensionsEnum.hotEventTransferTimeInMs),
hotEventOverallTimeInMs: _extractInt(map, CustomDimensionsEnum.hotEventOverallTimeInMs),
commandRunProjectType: _extractString(map, CustomDimensionsEnum.commandRunProjectType),
commandRunProjectHostLanguage: _extractString(map, CustomDimensionsEnum.commandRunProjectHostLanguage),
commandCreateAndroidLanguage: _extractString(map, CustomDimensionsEnum.commandCreateAndroidLanguage),
commandCreateIosLanguage: _extractString(map, CustomDimensionsEnum.commandCreateIosLanguage),
commandRunProjectModule: _extractBool(map, CustomDimensionsEnum.commandRunProjectModule),
commandCreateProjectType: _extractString(map, CustomDimensionsEnum.commandCreateProjectType),
commandPackagesNumberPlugins: _extractInt(map, CustomDimensionsEnum.commandPackagesNumberPlugins),
commandPackagesProjectModule: _extractBool(map, CustomDimensionsEnum.commandPackagesProjectModule),
commandRunTargetOsVersion: _extractString(map, CustomDimensionsEnum.commandRunTargetOsVersion),
commandRunModeName: _extractString(map, CustomDimensionsEnum.commandRunModeName),
commandBuildBundleTargetPlatform: _extractString(map, CustomDimensionsEnum.commandBuildBundleTargetPlatform),
commandBuildBundleIsModule: _extractBool(map, CustomDimensionsEnum.commandBuildBundleIsModule),
commandResult: _extractString(map, CustomDimensionsEnum.commandResult),
hotEventTargetPlatform: _extractString(map, CustomDimensionsEnum.hotEventTargetPlatform),
hotEventSdkName: _extractString(map, CustomDimensionsEnum.hotEventSdkName),
hotEventEmulator: _extractBool(map, CustomDimensionsEnum.hotEventEmulator),
hotEventFullRestart: _extractBool(map, CustomDimensionsEnum.hotEventFullRestart),
commandHasTerminal: _extractBool(map, CustomDimensionsEnum.commandHasTerminal),
enabledFlutterFeatures: _extractString(map, CustomDimensionsEnum.enabledFlutterFeatures),
localTime: _extractString(map, CustomDimensionsEnum.localTime),
commandBuildAarTargetPlatform: _extractString(map, CustomDimensionsEnum.commandBuildAarTargetPlatform),
commandBuildAarProjectType: _extractString(map, CustomDimensionsEnum.commandBuildAarProjectType),
buildEventCommand: _extractString(map, CustomDimensionsEnum.buildEventCommand),
buildEventSettings: _extractString(map, CustomDimensionsEnum.buildEventSettings),
commandBuildApkTargetPlatform: _extractString(map, CustomDimensionsEnum.commandBuildApkTargetPlatform),
commandBuildApkBuildMode: _extractString(map, CustomDimensionsEnum.commandBuildApkBuildMode),
commandBuildApkSplitPerAbi: _extractBool(map, CustomDimensionsEnum.commandBuildApkSplitPerAbi),
commandBuildAppBundleTargetPlatform: _extractString(map, CustomDimensionsEnum.commandBuildAppBundleTargetPlatform),
commandBuildAppBundleBuildMode: _extractString(map, CustomDimensionsEnum.commandBuildAppBundleBuildMode),
buildEventError: _extractString(map, CustomDimensionsEnum.buildEventError),
commandResultEventMaxRss: _extractInt(map, CustomDimensionsEnum.commandResultEventMaxRss),
commandRunAndroidEmbeddingVersion: _extractString(map, CustomDimensionsEnum.commandRunAndroidEmbeddingVersion),
commandPackagesAndroidEmbeddingVersion: _extractString(map, CustomDimensionsEnum.commandPackagesAndroidEmbeddingVersion),
nullSafety: _extractBool(map, CustomDimensionsEnum.nullSafety),
nullSafeMigratedLibraries: _extractInt(map, CustomDimensionsEnum.nullSafeMigratedLibraries),
nullSafeTotalLibraries: _extractInt(map, CustomDimensionsEnum.nullSafeTotalLibraries),
hotEventCompileTimeInMs: _extractInt(map, CustomDimensionsEnum.hotEventCompileTimeInMs),
hotEventFindInvalidatedTimeInMs: _extractInt(map, CustomDimensionsEnum.hotEventFindInvalidatedTimeInMs),
hotEventScannedSourcesCount: _extractInt(map, CustomDimensionsEnum.hotEventScannedSourcesCount),
hotEventReassembleTimeInMs: _extractInt(map, CustomDimensionsEnum.hotEventReassembleTimeInMs),
hotEventReloadVMTimeInMs: _extractInt(map, CustomDimensionsEnum.hotEventReloadVMTimeInMs),
commandRunEnableImpeller: _extractBool(map, CustomDimensionsEnum.commandRunEnableImpeller),
commandRunIOSInterfaceType: _extractString(map, CustomDimensionsEnum.commandRunIOSInterfaceType),
commandRunIsTest: _extractBool(map, CustomDimensionsEnum.commandRunIsTest),
);
static bool? _extractBool(Map<String, String> map, CustomDimensionsEnum field) =>
map.containsKey(field.cdKey)? map[field.cdKey] == 'true' : null;
static String? _extractString(Map<String, String> map, CustomDimensionsEnum field) =>
map.containsKey(field.cdKey)? map[field.cdKey] : null;
static int? _extractInt(Map<String, String> map, CustomDimensionsEnum field) =>
map.containsKey(field.cdKey)? int.parse(map[field.cdKey]!) : null;
@override
String toString() => toMap().toString();
@override
bool operator ==(Object other) {
return other is CustomDimensions &&
_mapsEqual(other.toMap(), toMap());
}
@override
int get hashCode => Object.hashAll(toMap().values);
}
/// List of all fields used in CustomDimensions.
///
/// The index of this enum is used to calculate the key of the fields. Always
/// append to this list when adding new fields, and do not remove or reorder
/// any elements.
enum CustomDimensionsEnum {
sessionHostOsDetails, // cd1
sessionChannelName, // cd2
commandRunIsEmulator, // cd3
commandRunTargetName, // cd4
hotEventReason, // cd5
hotEventFinalLibraryCount, // cd6
hotEventSyncedLibraryCount, // cd7
hotEventSyncedClassesCount, // cd8
hotEventSyncedProceduresCount, // cd9
hotEventSyncedBytes, // cd10
hotEventInvalidatedSourcesCount, // cd11
hotEventTransferTimeInMs, // cd12
hotEventOverallTimeInMs, // cd13
commandRunProjectType, // cd14
commandRunProjectHostLanguage, // cd15
commandCreateAndroidLanguage, // cd16
commandCreateIosLanguage, // cd17
commandRunProjectModule, // cd18
commandCreateProjectType, // cd19
commandPackagesNumberPlugins, // cd20
commandPackagesProjectModule, // cd21
commandRunTargetOsVersion, // cd22
commandRunModeName, // cd23
commandBuildBundleTargetPlatform, // cd24
commandBuildBundleIsModule, // cd25
commandResult, // cd26
hotEventTargetPlatform, // cd27
hotEventSdkName, // cd28
hotEventEmulator, // cd29
hotEventFullRestart, // cd30
commandHasTerminal, // cd31
enabledFlutterFeatures, // cd32
localTime, // cd33
commandBuildAarTargetPlatform, // cd34
commandBuildAarProjectType, // cd35
buildEventCommand, // cd36
buildEventSettings, // cd37
commandBuildApkTargetPlatform, // cd38
commandBuildApkBuildMode, // cd39
commandBuildApkSplitPerAbi, // cd40
commandBuildAppBundleTargetPlatform, // cd41
commandBuildAppBundleBuildMode, // cd42
buildEventError, // cd43
commandResultEventMaxRss, // cd44
commandRunAndroidEmbeddingVersion, // cd45
commandPackagesAndroidEmbeddingVersion, // cd46
nullSafety, // cd47
obsolete1, // cd48 (was fastReassemble)
nullSafeMigratedLibraries, // cd49
nullSafeTotalLibraries, // cd50
hotEventCompileTimeInMs, // cd51
hotEventFindInvalidatedTimeInMs, // cd52
hotEventScannedSourcesCount, // cd53
hotEventReassembleTimeInMs, // cd54
hotEventReloadVMTimeInMs, // cd55
commandRunEnableImpeller, // cd56
commandRunIOSInterfaceType, // cd57
commandRunIsTest; // cd58
String get cdKey => 'cd${index + 1}';
}
| flutter/packages/flutter_tools/lib/src/reporting/custom_dimensions.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/reporting/custom_dimensions.dart",
"repo_id": "flutter",
"token_count": 8539
} | 811 |
// Copyright 2014 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.
import 'dart:async';
import 'package:file/file.dart';
import 'base/file_system.dart';
import 'base/logger.dart';
import 'build_info.dart';
import 'convert.dart';
import 'device.dart';
import 'globals.dart' as globals;
Future<String?> sharedSkSlWriter(Device device, Map<String, Object?>? data, {
File? outputFile,
Logger? logger,
}) async {
logger ??= globals.logger;
if (data == null || data.isEmpty) {
logger.printStatus(
'No data was received. To ensure SkSL data can be generated use a '
'physical device then:\n'
' 1. Pass "--cache-sksl" as an argument to flutter run.\n'
' 2. Interact with the application to force shaders to be compiled.\n'
);
return null;
}
if (outputFile == null) {
outputFile = globals.fsUtils.getUniqueFile(
globals.fs.currentDirectory,
'flutter',
'sksl.json',
);
} else if (!outputFile.parent.existsSync()) {
outputFile.parent.createSync(recursive: true);
}
// Convert android sub-platforms to single target platform.
TargetPlatform targetPlatform = await device.targetPlatform;
switch (targetPlatform) {
case TargetPlatform.android_arm:
case TargetPlatform.android_arm64:
case TargetPlatform.android_x64:
case TargetPlatform.android_x86:
targetPlatform = TargetPlatform.android;
case TargetPlatform.android:
case TargetPlatform.darwin:
case TargetPlatform.ios:
case TargetPlatform.fuchsia_arm64:
case TargetPlatform.fuchsia_x64:
case TargetPlatform.linux_arm64:
case TargetPlatform.linux_x64:
case TargetPlatform.tester:
case TargetPlatform.web_javascript:
case TargetPlatform.windows_x64:
case TargetPlatform.windows_arm64:
break;
}
final Map<String, Object> manifest = <String, Object>{
'platform': getNameForTargetPlatform(targetPlatform),
'name': device.name,
'engineRevision': globals.flutterVersion.engineRevision,
'data': data,
};
outputFile.writeAsStringSync(json.encode(manifest));
logger.printStatus('Wrote SkSL data to ${outputFile.path}.');
return outputFile.path;
}
| flutter/packages/flutter_tools/lib/src/sksl_writer.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/sksl_writer.dart",
"repo_id": "flutter",
"token_count": 792
} | 812 |
// Copyright 2014 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.
import 'test_device.dart';
/// Callbacks for reporting progress while running tests.
abstract class TestWatcher {
/// Called after the test device starts.
///
/// If startPaused was true, the caller needs to resume in DevTools to
/// start running the tests.
void handleStartedDevice(Uri? vmServiceUri) { }
/// Called after the tests finish but before the test device exits.
///
/// The test device won't exit until this method completes.
/// Not called if the test device died.
Future<void> handleFinishedTest(TestDevice testDevice);
/// Called when the test device crashed before it could be connected to the
/// test harness.
Future<void> handleTestCrashed(TestDevice testDevice);
/// Called if we timed out waiting for the test device to connect to test
/// harness.
Future<void> handleTestTimedOut(TestDevice testDevice);
}
| flutter/packages/flutter_tools/lib/src/test/watcher.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/test/watcher.dart",
"repo_id": "flutter",
"token_count": 268
} | 813 |
// Copyright 2014 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.
import 'dart:typed_data';
import '../base/file_system.dart';
import '../base/utils.dart';
import '../convert.dart';
/// A pseudo-filesystem stored in memory.
///
/// To support output to arbitrary multi-root file schemes, the frontend server
/// will output web sources, sourcemaps, and metadata to concatenated single files
/// with an additional manifest file containing the correct offsets.
class WebMemoryFS {
final Map<String, Uint8List> metadataFiles = <String, Uint8List>{};
final Map<String, Uint8List> files = <String, Uint8List>{};
final Map<String, Uint8List> sourcemaps = <String, Uint8List>{};
String? get mergedMetadata => _mergedMetadata;
String? _mergedMetadata;
/// Update the filesystem with the provided source and manifest files.
///
/// Returns the list of updated files.
List<String> write(
File codeFile,
File manifestFile,
File sourcemapFile,
File metadataFile,
) {
final List<String> modules = <String>[];
final Uint8List codeBytes = codeFile.readAsBytesSync();
final Uint8List sourcemapBytes = sourcemapFile.readAsBytesSync();
final Uint8List metadataBytes = metadataFile.readAsBytesSync();
final Map<String, dynamic> manifest =
castStringKeyedMap(json.decode(manifestFile.readAsStringSync()))!;
for (final String filePath in manifest.keys) {
final Map<String, dynamic> offsets =
castStringKeyedMap(manifest[filePath])!;
final List<int> codeOffsets =
(offsets['code'] as List<dynamic>).cast<int>();
final List<int> sourcemapOffsets =
(offsets['sourcemap'] as List<dynamic>).cast<int>();
final List<int> metadataOffsets =
(offsets['metadata'] as List<dynamic>).cast<int>();
if (codeOffsets.length != 2 ||
sourcemapOffsets.length != 2 ||
metadataOffsets.length != 2) {
continue;
}
final int codeStart = codeOffsets[0];
final int codeEnd = codeOffsets[1];
if (codeStart < 0 || codeEnd > codeBytes.lengthInBytes) {
continue;
}
final Uint8List byteView = Uint8List.view(
codeBytes.buffer,
codeStart,
codeEnd - codeStart,
);
final String fileName =
filePath.startsWith('/') ? filePath.substring(1) : filePath;
files[fileName] = byteView;
final int sourcemapStart = sourcemapOffsets[0];
final int sourcemapEnd = sourcemapOffsets[1];
if (sourcemapStart < 0 || sourcemapEnd > sourcemapBytes.lengthInBytes) {
continue;
}
final Uint8List sourcemapView = Uint8List.view(
sourcemapBytes.buffer,
sourcemapStart,
sourcemapEnd - sourcemapStart,
);
final String sourcemapName = '$fileName.map';
sourcemaps[sourcemapName] = sourcemapView;
final int metadataStart = metadataOffsets[0];
final int metadataEnd = metadataOffsets[1];
if (metadataStart < 0 || metadataEnd > metadataBytes.lengthInBytes) {
continue;
}
final Uint8List metadataView = Uint8List.view(
metadataBytes.buffer,
metadataStart,
metadataEnd - metadataStart,
);
final String metadataName = '$fileName.metadata';
metadataFiles[metadataName] = metadataView;
modules.add(fileName);
}
_mergedMetadata = metadataFiles.values
.map((Uint8List encoded) => utf8.decode(encoded))
.join('\n');
return modules;
}
}
| flutter/packages/flutter_tools/lib/src/web/memory_fs.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/web/memory_fs.dart",
"repo_id": "flutter",
"token_count": 1350
} | 814 |
// Copyright 2014 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.
import 'dart:async';
import 'package:process/process.dart';
import '../base/file_system.dart';
import '../base/logger.dart';
import '../base/os.dart';
import '../build_info.dart';
import '../desktop_device.dart';
import '../device.dart';
import '../project.dart';
import 'application_package.dart';
import 'build_windows.dart';
import 'windows_workflow.dart';
/// A device that represents a desktop Windows target.
class WindowsDevice extends DesktopDevice {
WindowsDevice({
required ProcessManager processManager,
required Logger logger,
required FileSystem fileSystem,
required OperatingSystemUtils operatingSystemUtils,
}) : _operatingSystemUtils = operatingSystemUtils,
super(
'windows',
platformType: PlatformType.windows,
ephemeral: false,
processManager: processManager,
logger: logger,
fileSystem: fileSystem,
operatingSystemUtils: operatingSystemUtils,
);
final OperatingSystemUtils _operatingSystemUtils;
@override
bool isSupported() => true;
@override
String get name => 'Windows';
@override
Future<TargetPlatform> get targetPlatform async => _targetPlatform;
TargetPlatform get _targetPlatform => switch (_operatingSystemUtils.hostPlatform) {
HostPlatform.windows_arm64 => TargetPlatform.windows_arm64,
_ => TargetPlatform.windows_x64,
};
@override
bool isSupportedForProject(FlutterProject flutterProject) {
return flutterProject.windows.existsSync();
}
@override
Future<void> buildForDevice({
String? mainPath,
required BuildInfo buildInfo,
}) async {
await buildWindows(
FlutterProject.current().windows,
buildInfo,
_targetPlatform,
target: mainPath,
);
}
@override
String executablePathForDevice(covariant WindowsApp package, BuildInfo buildInfo) {
return package.executable(buildInfo.mode, _targetPlatform);
}
}
class WindowsDevices extends PollingDeviceDiscovery {
WindowsDevices({
required ProcessManager processManager,
required Logger logger,
required FileSystem fileSystem,
required OperatingSystemUtils operatingSystemUtils,
required WindowsWorkflow windowsWorkflow,
}) : _fileSystem = fileSystem,
_logger = logger,
_processManager = processManager,
_operatingSystemUtils = operatingSystemUtils,
_windowsWorkflow = windowsWorkflow,
super('windows devices');
final FileSystem _fileSystem;
final Logger _logger;
final ProcessManager _processManager;
final OperatingSystemUtils _operatingSystemUtils;
final WindowsWorkflow _windowsWorkflow;
@override
bool get supportsPlatform => _windowsWorkflow.appliesToHostPlatform;
@override
bool get canListAnything => _windowsWorkflow.canListDevices;
@override
Future<List<Device>> pollingGetDevices({ Duration? timeout }) async {
if (!canListAnything) {
return const <Device>[];
}
return <Device>[
WindowsDevice(
fileSystem: _fileSystem,
logger: _logger,
processManager: _processManager,
operatingSystemUtils: _operatingSystemUtils,
),
];
}
@override
Future<List<String>> getDiagnostics() async => const <String>[];
@override
List<String> get wellKnownIds => const <String>['windows'];
}
| flutter/packages/flutter_tools/lib/src/windows/windows_device.dart/0 | {
"file_path": "flutter/packages/flutter_tools/lib/src/windows/windows_device.dart",
"repo_id": "flutter",
"token_count": 1114
} | 815 |
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/{{projectName}}.iml" filepath="$PROJECT_DIR$/{{projectName}}.iml" />
<module fileurl="file://$PROJECT_DIR$/android/{{projectName}}_android.iml" filepath="$PROJECT_DIR$/android/{{projectName}}_android.iml" />
</modules>
</component>
</project>
| flutter/packages/flutter_tools/templates/app_shared/.idea/modules.xml.tmpl/0 | {
"file_path": "flutter/packages/flutter_tools/templates/app_shared/.idea/modules.xml.tmpl",
"repo_id": "flutter",
"token_count": 158
} | 816 |
#include "ephemeral/Flutter-Generated.xcconfig"
| flutter/packages/flutter_tools/templates/app_shared/macos.tmpl/Flutter/Flutter-Debug.xcconfig/0 | {
"file_path": "flutter/packages/flutter_tools/templates/app_shared/macos.tmpl/Flutter/Flutter-Debug.xcconfig",
"repo_id": "flutter",
"token_count": 19
} | 817 |
<!DOCTYPE html>
<html>
<head>
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
For more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
This is a placeholder for base href that will be replaced by the value of
the `--base-href` argument provided to `flutter build`.
-->
<base href="$FLUTTER_BASE_HREF">
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="{{description}}">
<!-- iOS meta tags & icons -->
<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="{{projectName}}">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/>
<title>{{projectName}}</title>
<link rel="manifest" href="manifest.json">
</head>
<body>
<script src="flutter_bootstrap.js" async></script>
</body>
</html>
| flutter/packages/flutter_tools/templates/app_shared/web/index.html.tmpl/0 | {
"file_path": "flutter/packages/flutter_tools/templates/app_shared/web/index.html.tmpl",
"repo_id": "flutter",
"token_count": 418
} | 818 |
import 'package:flutter/material.dart';
{{#withPlatformChannelPluginHook}}
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:{{pluginProjectName}}/{{pluginProjectName}}.dart';
{{/withPlatformChannelPluginHook}}
void main() => runApp(const MyApp());
{{^withPlatformChannelPluginHook}}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or press Run > Flutter Hot Reload in a Flutter IDE). Notice that the
// counter didn't reset back to zero; the application is not restarted.
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are
// always marked "final".
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
// This call to setState tells the Flutter framework that something has
// changed in this State, which causes it to rerun the build method below
// so that the display can reflect the updated values. If we changed
// _counter without calling setState(), then the build method would not be
// called again, and so nothing would appear to happen.
_counter++;
});
}
@override
Widget build(BuildContext context) {
// This method is rerun every time setState is called, for instance as done
// by the _incrementCounter method above.
//
// The Flutter framework has been optimized to make rerunning build methods
// fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets.
return Scaffold(
appBar: AppBar(
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Text(widget.title),
),
body: Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: Column(
// Column is also a layout widget. It takes a list of children and
// arranges them vertically. By default, it sizes itself to fit its
// children horizontally, and tries to be as tall as its parent.
//
// Invoke "debug painting" (press "p" in the console, choose the
// "Toggle Debug Paint" action from the Flutter Inspector in Android
// Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
// to see the wireframe for each widget.
//
// Column has various properties to control how it sizes itself and
// how it positions its children. Here we use mainAxisAlignment to
// center the children vertically; the main axis here is the vertical
// axis because Columns are vertical (the cross axis would be
// horizontal).
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
{{/withPlatformChannelPluginHook}}
{{#withPlatformChannelPluginHook}}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String _platformVersion = 'Unknown';
@override
void initState() {
super.initState();
initPlatformState();
}
// Platform messages are asynchronous, so we initialize in an async method.
Future<void> initPlatformState() async {
String platformVersion;
// Platform messages may fail, so we use a try/catch PlatformException.
// We also handle the message potentially returning null.
try {
platformVersion =
await {{pluginDartClass}}.platformVersion ?? 'Unknown platform version';
} on PlatformException {
platformVersion = 'Failed to get platform version.';
}
// If the widget was removed from the tree while the asynchronous platform
// message was in flight, we want to discard the reply rather than calling
// setState to update our non-existent appearance.
if (!mounted) return;
setState(() {
_platformVersion = platformVersion;
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Text('Running on: $_platformVersion\n'),
),
),
);
}
}
{{/withPlatformChannelPluginHook}}
| flutter/packages/flutter_tools/templates/module/common/lib/main.dart.tmpl/0 | {
"file_path": "flutter/packages/flutter_tools/templates/module/common/lib/main.dart.tmpl",
"repo_id": "flutter",
"token_count": 2087
} | 819 |
This directory contains support code for embedding the Flutter project in an iOS app.
It should not be edited or checked in.
| flutter/packages/flutter_tools/templates/module/ios/library/Flutter.tmpl/README.md/0 | {
"file_path": "flutter/packages/flutter_tools/templates/module/ios/library/Flutter.tmpl/README.md",
"repo_id": "flutter",
"token_count": 28
} | 820 |
package {{androidIdentifier}};
import androidx.annotation.NonNull;
import io.flutter.embedding.engine.plugins.FlutterPlugin;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
import io.flutter.plugin.common.MethodChannel.Result;
/** {{pluginClass}} */
public class {{pluginClass}} implements FlutterPlugin, MethodCallHandler {
/// The MethodChannel that will the communication between Flutter and native Android
///
/// This local reference serves to register the plugin with the Flutter Engine and unregister it
/// when the Flutter Engine is detached from the Activity
private MethodChannel channel;
@Override
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "{{projectName}}");
channel.setMethodCallHandler(this);
}
@Override
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
if (call.method.equals("getPlatformVersion")) {
result.success("Android " + android.os.Build.VERSION.RELEASE);
} else {
result.notImplemented();
}
}
@Override
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
channel.setMethodCallHandler(null);
}
}
| flutter/packages/flutter_tools/templates/plugin/android-java.tmpl/src/main/java/androidIdentifier/pluginClass.java.tmpl/0 | {
"file_path": "flutter/packages/flutter_tools/templates/plugin/android-java.tmpl/src/main/java/androidIdentifier/pluginClass.java.tmpl",
"repo_id": "flutter",
"token_count": 396
} | 821 |
{{#no_platforms}}
// You have generated a new plugin project without specifying the `--platforms`
// flag. A plugin project with no platform support was generated. To add a
// platform, run `flutter create -t plugin --platforms <platforms> .` under the
// same directory. You can also find a detailed instruction on how to add
// platforms in the `pubspec.yaml` at
// https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms.
{{/no_platforms}}
import '{{projectName}}_platform_interface.dart';
class {{pluginDartClass}} {
Future<String?> getPlatformVersion() {
return {{pluginDartClass}}Platform.instance.getPlatformVersion();
}
}
| flutter/packages/flutter_tools/templates/plugin/lib/projectName.dart.tmpl/0 | {
"file_path": "flutter/packages/flutter_tools/templates/plugin/lib/projectName.dart.tmpl",
"repo_id": "flutter",
"token_count": 193
} | 822 |
#include "include/{{projectName}}/{{pluginClassSnakeCase}}_c_api.h"
#include <flutter/plugin_registrar_windows.h>
#include "{{pluginClassSnakeCase}}.h"
void {{pluginClass}}CApiRegisterWithRegistrar(
FlutterDesktopPluginRegistrarRef registrar) {
{{projectName}}::{{pluginClass}}::RegisterWithRegistrar(
flutter::PluginRegistrarManager::GetInstance()
->GetRegistrar<flutter::PluginRegistrarWindows>(registrar));
}
| flutter/packages/flutter_tools/templates/plugin/windows.tmpl/pluginClassSnakeCase_c_api.cpp.tmpl/0 | {
"file_path": "flutter/packages/flutter_tools/templates/plugin/windows.tmpl/pluginClassSnakeCase_c_api.cpp.tmpl",
"repo_id": "flutter",
"token_count": 154
} | 823 |
arb-dir: lib/src/localization
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
| flutter/packages/flutter_tools/templates/skeleton/l10n.yaml.tmpl/0 | {
"file_path": "flutter/packages/flutter_tools/templates/skeleton/l10n.yaml.tmpl",
"repo_id": "flutter",
"token_count": 38
} | 824 |
// Copyright 2014 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.
import 'package:args/command_runner.dart';
import 'package:file/memory.dart';
import 'package:file_testing/file_testing.dart';
import 'package:flutter_tools/src/artifacts.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/build_system/build_system.dart';
import 'package:flutter_tools/src/cache.dart';
import 'package:flutter_tools/src/commands/assemble.dart';
import 'package:flutter_tools/src/convert.dart';
import 'package:flutter_tools/src/features.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:unified_analytics/unified_analytics.dart';
import '../../src/common.dart';
import '../../src/context.dart';
import '../../src/fakes.dart';
import '../../src/test_build_system.dart';
import '../../src/test_flutter_command_runner.dart';
void main() {
Cache.disableLocking();
Cache.flutterRoot = '';
final StackTrace stackTrace = StackTrace.current;
late FakeAnalytics fakeAnalytics;
setUp(() {
fakeAnalytics = getInitializedFakeAnalyticsInstance(
fs: MemoryFileSystem.test(),
fakeFlutterVersion: FakeFlutterVersion(),
);
});
testUsingContext('flutter assemble can run a build', () async {
final CommandRunner<void> commandRunner = createTestCommandRunner(AssembleCommand(
buildSystem: TestBuildSystem.all(BuildResult(success: true)),
));
await commandRunner.run(<String>['assemble', '-o Output', 'debug_macos_bundle_flutter_assets']);
expect(testLogger.traceText, contains('build succeeded.'));
}, overrides: <Type, Generator>{
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
FileSystem: () => MemoryFileSystem.test(),
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('flutter assemble can parse defines whose values contain =', () async {
final CommandRunner<void> commandRunner = createTestCommandRunner(AssembleCommand(
buildSystem: TestBuildSystem.all(BuildResult(success: true), (Target target, Environment environment) {
expect(environment.defines, containsPair('FooBar', 'fizz=2'));
})
));
await commandRunner.run(<String>['assemble', '-o Output', '-dFooBar=fizz=2', 'debug_macos_bundle_flutter_assets']);
expect(testLogger.traceText, contains('build succeeded.'));
}, overrides: <Type, Generator>{
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
FileSystem: () => MemoryFileSystem.test(),
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('flutter assemble can parse inputs', () async {
final AssembleCommand command = AssembleCommand(
buildSystem: TestBuildSystem.all(BuildResult(success: true), (Target target, Environment environment) {
expect(environment.inputs, containsPair('Foo', 'Bar.txt'));
}));
final CommandRunner<void> commandRunner = createTestCommandRunner(command);
await commandRunner.run(<String>['assemble', '-o Output', '-iFoo=Bar.txt', 'debug_macos_bundle_flutter_assets']);
expect(testLogger.traceText, contains('build succeeded.'));
expect(await command.requiredArtifacts, isEmpty);
}, overrides: <Type, Generator>{
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
FileSystem: () => MemoryFileSystem.test(),
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('flutter assemble sets required artifacts from target platform', () async {
final AssembleCommand command = AssembleCommand(
buildSystem: TestBuildSystem.all(BuildResult(success: true)));
final CommandRunner<void> commandRunner = createTestCommandRunner(command);
await commandRunner.run(<String>['assemble', '-o Output', '-dTargetPlatform=darwin', '-dDarwinArchs=x86_64', 'debug_macos_bundle_flutter_assets']);
expect(await command.requiredArtifacts, <DevelopmentArtifact>{
DevelopmentArtifact.macOS,
});
}, overrides: <Type, Generator>{
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
FileSystem: () => MemoryFileSystem.test(),
ProcessManager: () => FakeProcessManager.any(),
FeatureFlags: () => TestFeatureFlags(isMacOSEnabled: true),
});
testUsingContext('flutter assemble sends usage values correctly with platform', () async {
final AssembleCommand command = AssembleCommand(
buildSystem: TestBuildSystem.all(BuildResult(success: true)));
final CommandRunner<void> commandRunner = createTestCommandRunner(command);
await commandRunner.run(<String>['assemble', '-o Output', '-dTargetPlatform=darwin', '-dDarwinArchs=x86_64', 'debug_macos_bundle_flutter_assets']);
expect(
fakeAnalytics.sentEvents,
contains(
Event.commandUsageValues(
workflow: 'assemble',
commandHasTerminal: false,
buildBundleTargetPlatform: 'darwin',
buildBundleIsModule: false,
),
),
);
}, overrides: <Type, Generator>{
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
FileSystem: () => MemoryFileSystem.test(),
ProcessManager: () => FakeProcessManager.any(),
FeatureFlags: () => TestFeatureFlags(isMacOSEnabled: true),
Analytics: () => fakeAnalytics,
});
testUsingContext('flutter assemble throws ToolExit if not provided with output', () async {
final CommandRunner<void> commandRunner = createTestCommandRunner(AssembleCommand(
buildSystem: TestBuildSystem.all(BuildResult(success: true)),
));
expect(commandRunner.run(<String>['assemble', 'debug_macos_bundle_flutter_assets']), throwsToolExit());
}, overrides: <Type, Generator>{
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
FileSystem: () => MemoryFileSystem.test(),
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('flutter assemble throws ToolExit if dart-defines are not base64 encoded', () async {
final CommandRunner<void> commandRunner = createTestCommandRunner(AssembleCommand(
buildSystem: TestBuildSystem.all(BuildResult(success: true)),
));
final List<String> command = <String>[
'assemble',
'--output',
'Output',
'--DartDefines=flutter.inspector.structuredErrors%3Dtrue',
'debug_macos_bundle_flutter_assets',
];
expect(
commandRunner.run(command),
throwsToolExit(message: 'Error parsing assemble command: your generated configuration may be out of date')
);
}, overrides: <Type, Generator>{
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
FileSystem: () => MemoryFileSystem.test(),
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('flutter assemble throws ToolExit if called with non-existent rule', () async {
final CommandRunner<void> commandRunner = createTestCommandRunner(AssembleCommand(
buildSystem: TestBuildSystem.all(BuildResult(success: true)),
));
expect(commandRunner.run(<String>['assemble', '-o Output', 'undefined']),
throwsToolExit());
}, overrides: <Type, Generator>{
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
FileSystem: () => MemoryFileSystem.test(),
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('flutter assemble does not log stack traces during build failure', () async {
final CommandRunner<void> commandRunner = createTestCommandRunner(AssembleCommand(
buildSystem: TestBuildSystem.all(BuildResult(success: false, exceptions: <String, ExceptionMeasurement>{
'hello': ExceptionMeasurement('hello', 'bar', stackTrace, fatal: true),
}))
));
await expectLater(commandRunner.run(<String>['assemble', '-o Output', 'debug_macos_bundle_flutter_assets']),
throwsToolExit());
expect(testLogger.errorText, contains('Target hello failed: bar'));
expect(testLogger.errorText, isNot(contains(stackTrace.toString())));
}, overrides: <Type, Generator>{
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
FileSystem: () => MemoryFileSystem.test(),
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('flutter assemble outputs JSON performance data to provided file', () async {
final CommandRunner<void> commandRunner = createTestCommandRunner(AssembleCommand(
buildSystem: TestBuildSystem.all(
BuildResult(success: true, performance: <String, PerformanceMeasurement>{
'hello': PerformanceMeasurement(
target: 'hello',
analyticsName: 'bar',
elapsedMilliseconds: 123,
skipped: false,
succeeded: true,
),
}),
),
));
await commandRunner.run(<String>[
'assemble',
'-o Output',
'--performance-measurement-file=out.json',
'debug_macos_bundle_flutter_assets',
]);
expect(globals.fs.file('out.json'), exists);
expect(
json.decode(globals.fs.file('out.json').readAsStringSync()),
containsPair('targets', contains(
containsPair('name', 'bar'),
)),
);
}, overrides: <Type, Generator>{
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
FileSystem: () => MemoryFileSystem.test(),
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('flutter assemble does not inject engine revision with local-engine', () async {
final CommandRunner<void> commandRunner = createTestCommandRunner(AssembleCommand(
buildSystem: TestBuildSystem.all(BuildResult(success: true), (Target target, Environment environment) {
expect(environment.engineVersion, isNull);
})
));
await commandRunner.run(<String>['assemble', '-o Output', 'debug_macos_bundle_flutter_assets']);
}, overrides: <Type, Generator>{
Artifacts: () => Artifacts.testLocalEngine(localEngine: 'out/host_release', localEngineHost: 'out/host_release'),
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
FileSystem: () => MemoryFileSystem.test(),
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('flutter assemble only writes input and output files when the values change', () async {
final BuildSystem buildSystem = TestBuildSystem.list(<BuildResult>[
BuildResult(
success: true,
inputFiles: <File>[globals.fs.file('foo')..createSync()],
outputFiles: <File>[globals.fs.file('bar')..createSync()],
),
BuildResult(
success: true,
inputFiles: <File>[globals.fs.file('foo')..createSync()],
outputFiles: <File>[globals.fs.file('bar')..createSync()],
),
BuildResult(
success: true,
inputFiles: <File>[globals.fs.file('foo'), globals.fs.file('fizz')..createSync()],
outputFiles: <File>[globals.fs.file('bar'), globals.fs.file(globals.fs.path.join('.dart_tool', 'fizz2'))..createSync(recursive: true)],
),
]);
final CommandRunner<void> commandRunner = createTestCommandRunner(AssembleCommand(buildSystem: buildSystem));
await commandRunner.run(<String>[
'assemble',
'-o Output',
'--build-outputs=outputs',
'--build-inputs=inputs',
'debug_macos_bundle_flutter_assets',
]);
final File inputs = globals.fs.file('inputs');
final File outputs = globals.fs.file('outputs');
expect(inputs.readAsStringSync(), contains('foo'));
expect(outputs.readAsStringSync(), contains('bar'));
final DateTime theDistantPast = DateTime(1991, 8, 23);
inputs.setLastModifiedSync(theDistantPast);
outputs.setLastModifiedSync(theDistantPast);
await commandRunner.run(<String>[
'assemble',
'-o Output',
'--build-outputs=outputs',
'--build-inputs=inputs',
'debug_macos_bundle_flutter_assets',
]);
expect(inputs.lastModifiedSync(), theDistantPast);
expect(outputs.lastModifiedSync(), theDistantPast);
await commandRunner.run(<String>[
'assemble',
'-o Output',
'--build-outputs=outputs',
'--build-inputs=inputs',
'debug_macos_bundle_flutter_assets',
]);
expect(inputs.readAsStringSync(), contains('foo'));
expect(inputs.readAsStringSync(), contains('fizz'));
expect(inputs.lastModifiedSync(), isNot(theDistantPast));
}, overrides: <Type, Generator>{
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
FileSystem: () => MemoryFileSystem.test(),
ProcessManager: () => FakeProcessManager.any(),
});
testWithoutContext('writePerformanceData outputs performance data in JSON form', () {
final List<PerformanceMeasurement> performanceMeasurement = <PerformanceMeasurement>[
PerformanceMeasurement(
analyticsName: 'foo',
target: 'hidden',
skipped: false,
succeeded: true,
elapsedMilliseconds: 123,
),
];
final FileSystem fileSystem = MemoryFileSystem.test();
final File outFile = fileSystem.currentDirectory
.childDirectory('foo')
.childFile('out.json');
writePerformanceData(performanceMeasurement, outFile);
expect(outFile, exists);
expect(json.decode(outFile.readAsStringSync()), <String, Object>{
'targets': <Object>[
<String, Object>{
'name': 'foo',
'skipped': false,
'succeeded': true,
'elapsedMilliseconds': 123,
},
],
});
});
}
| flutter/packages/flutter_tools/test/commands.shard/hermetic/assemble_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/commands.shard/hermetic/assemble_test.dart",
"repo_id": "flutter",
"token_count": 4719
} | 825 |
// Copyright 2014 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.
import 'dart:convert';
import 'package:flutter_tools/src/android/android_sdk.dart';
import 'package:flutter_tools/src/artifacts.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/base/platform.dart';
import 'package:flutter_tools/src/base/terminal.dart';
import 'package:flutter_tools/src/cache.dart';
import 'package:flutter_tools/src/commands/devices.dart';
import 'package:flutter_tools/src/device.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:test/fake.dart';
import '../../src/common.dart';
import '../../src/context.dart';
import '../../src/fake_devices.dart';
import '../../src/test_flutter_command_runner.dart';
void main() {
group('devices', () {
setUpAll(() {
Cache.disableLocking();
});
late Cache cache;
late Platform platform;
group('ensure factory', () {
late FakeBufferLogger fakeLogger;
setUpAll(() {
fakeLogger = FakeBufferLogger();
});
testWithoutContext('returns DevicesCommandOutputWithExtendedWirelessDeviceDiscovery on MacOS', () async {
final Platform platform = FakePlatform(operatingSystem: 'macos');
final DevicesCommandOutput devicesCommandOutput = DevicesCommandOutput(
platform: platform,
logger: fakeLogger,
);
expect(devicesCommandOutput is DevicesCommandOutputWithExtendedWirelessDeviceDiscovery, true);
});
testWithoutContext('returns default when not on MacOS', () async {
final Platform platform = FakePlatform();
final DevicesCommandOutput devicesCommandOutput = DevicesCommandOutput(
platform: platform,
logger: fakeLogger,
);
expect(devicesCommandOutput is DevicesCommandOutputWithExtendedWirelessDeviceDiscovery, false);
});
});
group('when Platform is not MacOS', () {
setUp(() {
cache = Cache.test(processManager: FakeProcessManager.any());
platform = FakePlatform();
});
testUsingContext('returns 0 when called', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
}, overrides: <Type, Generator>{
Cache: () => cache,
Artifacts: () => Artifacts.test(),
});
testUsingContext('no error when no connected devices', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
expect(
testLogger.statusText,
equals('''
No authorized devices detected.
Run "flutter emulators" to list and start any available device emulators.
If you expected a device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
'''),
);
}, overrides: <Type, Generator>{
AndroidSdk: () => null,
DeviceManager: () => NoDevicesManager(),
ProcessManager: () => FakeProcessManager.any(),
Cache: () => cache,
Artifacts: () => Artifacts.test(),
Platform: () => platform,
});
group('when includes both attached and wireless devices', () {
List<FakeDeviceJsonData>? deviceList;
setUp(() {
deviceList = <FakeDeviceJsonData>[
fakeDevices[0],
fakeDevices[1],
fakeDevices[2],
];
});
testUsingContext("get devices' platform types", () async {
final List<String> platformTypes = Device.devicesPlatformTypes(
await globals.deviceManager!.getAllDevices(),
);
expect(platformTypes, <String>['android', 'web']);
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Cache: () => cache,
Artifacts: () => Artifacts.test(),
Platform: () => platform,
});
group('with --machine flag', () {
testUsingContext('Outputs parsable JSON', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices', '--machine']);
expect(
json.decode(testLogger.statusText),
<Map<String, Object>>[
fakeDevices[0].json,
fakeDevices[1].json,
fakeDevices[2].json,
],
);
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Cache: () => cache,
Artifacts: () => Artifacts.test(),
Platform: () => platform,
});
group('when deviceConnectionInterface', () {
testUsingContext('filtered to attached', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices', '--machine', '--device-connection', 'attached']);
expect(
json.decode(testLogger.statusText),
<Map<String, Object>>[
fakeDevices[0].json,
fakeDevices[1].json,
],
);
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Cache: () => cache,
Artifacts: () => Artifacts.test(),
Platform: () => platform,
});
testUsingContext('filtered to wireless', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices', '--machine', '--device-connection', 'wireless']);
expect(
json.decode(testLogger.statusText),
<Map<String, Object>>[
fakeDevices[2].json,
],
);
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Cache: () => cache,
Artifacts: () => Artifacts.test(),
Platform: () => platform,
});
});
});
testUsingContext('available devices and diagnostics', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
expect(testLogger.statusText, '''
Found 2 connected devices:
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
Found 1 wirelessly connected device:
wireless android (mobile) • wireless-android • android-arm • Test SDK (1.2.3) (emulator)
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
});
group('when deviceConnectionInterface', () {
testUsingContext('filtered to attached', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices', '--device-connection', 'attached']);
expect(testLogger.statusText, '''
Found 2 connected devices:
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
});
testUsingContext('filtered to wireless', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices', '--device-connection', 'wireless']);
expect(testLogger.statusText, '''
Found 1 wirelessly connected device:
wireless android (mobile) • wireless-android • android-arm • Test SDK (1.2.3) (emulator)
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
});
});
});
group('when includes only attached devices', () {
List<FakeDeviceJsonData>? deviceList;
setUp(() {
deviceList = <FakeDeviceJsonData>[
fakeDevices[0],
fakeDevices[1],
];
});
testUsingContext('available devices and diagnostics', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
expect(testLogger.statusText, '''
Found 2 connected devices:
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
});
});
group('when includes only wireless devices', () {
List<FakeDeviceJsonData>? deviceList;
setUp(() {
deviceList = <FakeDeviceJsonData>[
fakeDevices[2],
];
});
testUsingContext('available devices and diagnostics', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
expect(testLogger.statusText, '''
Found 1 wirelessly connected device:
wireless android (mobile) • wireless-android • android-arm • Test SDK (1.2.3) (emulator)
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
});
});
});
group('when Platform is MacOS', () {
setUp(() {
cache = Cache.test(processManager: FakeProcessManager.any());
platform = FakePlatform(operatingSystem: 'macos');
});
testUsingContext('returns 0 when called', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
}, overrides: <Type, Generator>{
Cache: () => cache,
Artifacts: () => Artifacts.test(),
Platform: () => platform,
});
group('when no connected devices', () {
testUsingContext('no error', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
expect(
testLogger.statusText,
equals('''
No devices found yet. Checking for wireless devices...
No authorized devices detected.
Run "flutter emulators" to list and start any available device emulators.
If you expected a device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
'''),
);
}, overrides: <Type, Generator>{
AndroidSdk: () => null,
DeviceManager: () => NoDevicesManager(),
ProcessManager: () => FakeProcessManager.any(),
Cache: () => cache,
Artifacts: () => Artifacts.test(),
Platform: () => platform,
});
group('when deviceConnectionInterface', () {
testUsingContext('filtered to attached', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices', '--device-connection', 'attached']);
expect(testLogger.statusText, '''
No authorized devices detected.
Run "flutter emulators" to list and start any available device emulators.
If you expected a device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => NoDevicesManager(),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
});
testUsingContext('filtered to wireless', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices', '--device-connection', 'wireless']);
expect(testLogger.statusText, '''
Checking for wireless devices...
No authorized devices detected.
Run "flutter emulators" to list and start any available device emulators.
If you expected a device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => NoDevicesManager(),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
});
});
});
group('when includes both attached and wireless devices', () {
List<FakeDeviceJsonData>? deviceList;
setUp(() {
deviceList = <FakeDeviceJsonData>[
fakeDevices[0],
fakeDevices[1],
fakeDevices[2],
fakeDevices[3],
];
});
testUsingContext("get devices' platform types", () async {
final List<String> platformTypes = Device.devicesPlatformTypes(
await globals.deviceManager!.getAllDevices(),
);
expect(platformTypes, <String>['android', 'ios', 'web']);
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Cache: () => cache,
Artifacts: () => Artifacts.test(),
Platform: () => platform,
});
group('with --machine flag', () {
testUsingContext('Outputs parsable JSON', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices', '--machine']);
expect(
json.decode(testLogger.statusText),
<Map<String, Object>>[
fakeDevices[0].json,
fakeDevices[1].json,
fakeDevices[2].json,
fakeDevices[3].json,
],
);
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Cache: () => cache,
Artifacts: () => Artifacts.test(),
Platform: () => platform,
});
group('when deviceConnectionInterface', () {
testUsingContext('filtered to attached', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices', '--machine', '--device-connection', 'attached']);
expect(
json.decode(testLogger.statusText),
<Map<String, Object>>[
fakeDevices[0].json,
fakeDevices[1].json,
],
);
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Cache: () => cache,
Artifacts: () => Artifacts.test(),
Platform: () => platform,
});
testUsingContext('filtered to wireless', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices', '--machine', '--device-connection', 'wireless']);
expect(
json.decode(testLogger.statusText),
<Map<String, Object>>[
fakeDevices[2].json,
fakeDevices[3].json,
],
);
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Cache: () => cache,
Artifacts: () => Artifacts.test(),
Platform: () => platform,
});
});
});
testUsingContext('available devices and diagnostics', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
expect(testLogger.statusText, '''
Found 2 connected devices:
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
Checking for wireless devices...
Found 2 wirelessly connected devices:
wireless android (mobile) • wireless-android • android-arm • Test SDK (1.2.3) (emulator)
wireless ios (mobile) • wireless-ios • ios • iOS 16 (simulator)
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
});
group('with ansi terminal', () {
late FakeTerminal terminal;
late FakeBufferLogger fakeLogger;
setUp(() {
terminal = FakeTerminal(supportsColor: true);
fakeLogger = FakeBufferLogger(terminal: terminal);
fakeLogger.originalStatusText = '''
Found 2 connected devices:
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
Checking for wireless devices...
''';
});
testUsingContext('available devices and diagnostics', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
expect(fakeLogger.statusText, '''
Found 2 connected devices:
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
Found 2 wirelessly connected devices:
wireless android (mobile) • wireless-android • android-arm • Test SDK (1.2.3) (emulator)
wireless ios (mobile) • wireless-ios • ios • iOS 16 (simulator)
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () =>
_FakeDeviceManager(devices: deviceList, logger: fakeLogger),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
AnsiTerminal: () => terminal,
Logger: () => fakeLogger,
});
});
group('with verbose logging', () {
late FakeBufferLogger fakeLogger;
setUp(() {
fakeLogger = FakeBufferLogger(verbose: true);
});
testUsingContext('available devices and diagnostics', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
expect(fakeLogger.statusText, '''
Found 2 connected devices:
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
Checking for wireless devices...
Found 2 connected devices:
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
Found 2 wirelessly connected devices:
wireless android (mobile) • wireless-android • android-arm • Test SDK (1.2.3) (emulator)
wireless ios (mobile) • wireless-ios • ios • iOS 16 (simulator)
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(
devices: deviceList,
logger: fakeLogger,
),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
Logger: () => fakeLogger,
});
testUsingContext('when deviceConnectionInterface filtered to wireless', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices', '--device-connection', 'wireless']);
expect(testLogger.statusText, '''
Checking for wireless devices...
Found 2 wirelessly connected devices:
wireless android (mobile) • wireless-android • android-arm • Test SDK (1.2.3) (emulator)
wireless ios (mobile) • wireless-ios • ios • iOS 16 (simulator)
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
});
});
});
group('when includes only attached devices', () {
List<FakeDeviceJsonData>? deviceList;
setUp(() {
deviceList = <FakeDeviceJsonData>[
fakeDevices[0],
fakeDevices[1],
];
});
testUsingContext('available devices and diagnostics', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
expect(testLogger.statusText, '''
Found 2 connected devices:
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
Checking for wireless devices...
No wireless devices were found.
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
});
group('with ansi terminal', () {
late FakeTerminal terminal;
late FakeBufferLogger fakeLogger;
setUp(() {
terminal = FakeTerminal(supportsColor: true);
fakeLogger = FakeBufferLogger(terminal: terminal);
fakeLogger.originalStatusText = '''
Found 2 connected devices:
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
Checking for wireless devices...
''';
});
testUsingContext('available devices and diagnostics', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
expect(fakeLogger.statusText, '''
Found 2 connected devices:
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
No wireless devices were found.
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(
devices: deviceList,
logger: fakeLogger,
),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
AnsiTerminal: () => terminal,
Logger: () => fakeLogger,
});
});
group('with verbose logging', () {
late FakeBufferLogger fakeLogger;
setUp(() {
fakeLogger = FakeBufferLogger(verbose: true);
});
testUsingContext('available devices and diagnostics', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
expect(fakeLogger.statusText, '''
Found 2 connected devices:
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
Checking for wireless devices...
Found 2 connected devices:
ephemeral (mobile) • ephemeral • android-arm • Test SDK (1.2.3) (emulator)
webby (mobile) • webby • web-javascript • Web SDK (1.2.4) (emulator)
No wireless devices were found.
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(
devices: deviceList,
logger: fakeLogger,
),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
Logger: () => fakeLogger,
});
});
});
group('when includes only wireless devices', () {
List<FakeDeviceJsonData>? deviceList;
setUp(() {
deviceList = <FakeDeviceJsonData>[
fakeDevices[2],
fakeDevices[3],
];
});
testUsingContext('available devices and diagnostics', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
expect(testLogger.statusText, '''
No devices found yet. Checking for wireless devices...
Found 2 wirelessly connected devices:
wireless android (mobile) • wireless-android • android-arm • Test SDK (1.2.3) (emulator)
wireless ios (mobile) • wireless-ios • ios • iOS 16 (simulator)
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(devices: deviceList),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
});
group('with ansi terminal', () {
late FakeTerminal terminal;
late FakeBufferLogger fakeLogger;
setUp(() {
terminal = FakeTerminal(supportsColor: true);
fakeLogger = FakeBufferLogger(terminal: terminal);
fakeLogger.originalStatusText = '''
No devices found yet. Checking for wireless devices...
''';
});
testUsingContext('available devices and diagnostics', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
expect(fakeLogger.statusText, '''
Found 2 wirelessly connected devices:
wireless android (mobile) • wireless-android • android-arm • Test SDK (1.2.3) (emulator)
wireless ios (mobile) • wireless-ios • ios • iOS 16 (simulator)
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(
devices: deviceList,
logger: fakeLogger,
),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
AnsiTerminal: () => terminal,
Logger: () => fakeLogger,
});
});
group('with verbose logging', () {
late FakeBufferLogger fakeLogger;
setUp(() {
fakeLogger = FakeBufferLogger(verbose: true);
});
testUsingContext('available devices and diagnostics', () async {
final DevicesCommand command = DevicesCommand();
await createTestCommandRunner(command).run(<String>['devices']);
expect(fakeLogger.statusText, '''
No devices found yet. Checking for wireless devices...
Found 2 wirelessly connected devices:
wireless android (mobile) • wireless-android • android-arm • Test SDK (1.2.3) (emulator)
wireless ios (mobile) • wireless-ios • ios • iOS 16 (simulator)
Cannot connect to device ABC
Run "flutter emulators" to list and start any available device emulators.
If you expected another device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the "--device-timeout" flag. Visit https://flutter.dev/setup/ for troubleshooting tips.
''');
}, overrides: <Type, Generator>{
DeviceManager: () => _FakeDeviceManager(
devices: deviceList,
logger: fakeLogger,
),
ProcessManager: () => FakeProcessManager.any(),
Platform: () => platform,
Logger: () => fakeLogger,
});
});
});
});
});
}
class _FakeDeviceManager extends DeviceManager {
_FakeDeviceManager({
List<FakeDeviceJsonData>? devices,
FakeBufferLogger? logger,
}) : fakeDevices = devices ?? <FakeDeviceJsonData>[],
super(logger: logger ?? testLogger);
List<FakeDeviceJsonData> fakeDevices = <FakeDeviceJsonData>[];
@override
Future<List<Device>> getAllDevices({DeviceDiscoveryFilter? filter}) async {
final List<Device> devices = <Device>[];
for (final FakeDeviceJsonData deviceJson in fakeDevices) {
if (filter?.deviceConnectionInterface == null ||
deviceJson.dev.connectionInterface == filter?.deviceConnectionInterface) {
devices.add(deviceJson.dev);
}
}
return devices;
}
@override
Future<List<Device>> refreshAllDevices({
Duration? timeout,
DeviceDiscoveryFilter? filter,
}) => getAllDevices(filter: filter);
@override
Future<List<Device>> refreshExtendedWirelessDeviceDiscoverers({
Duration? timeout,
DeviceDiscoveryFilter? filter,
}) => getAllDevices(filter: filter);
@override
Future<List<String>> getDeviceDiagnostics() => Future<List<String>>.value(
<String>['Cannot connect to device ABC']
);
@override
List<DeviceDiscovery> get deviceDiscoverers => <DeviceDiscovery>[];
}
class NoDevicesManager extends DeviceManager {
NoDevicesManager() : super(logger: testLogger);
@override
List<DeviceDiscovery> get deviceDiscoverers => <DeviceDiscovery>[];
}
class FakeTerminal extends Fake implements AnsiTerminal {
FakeTerminal({
this.supportsColor = false,
});
@override
final bool supportsColor;
@override
bool get isCliAnimationEnabled => supportsColor;
@override
bool singleCharMode = false;
@override
String clearLines(int numberOfLines) {
return 'CLEAR_LINES_$numberOfLines';
}
}
class FakeBufferLogger extends BufferLogger {
FakeBufferLogger({
super.terminal,
super.outputPreferences,
super.verbose,
}) : super.test();
String originalStatusText = '';
@override
void printStatus(
String message, {
bool? emphasis,
TerminalColor? color,
bool? newline,
int? indent,
int? hangingIndent,
bool? wrap,
}) {
if (message.startsWith('CLEAR_LINES_')) {
expect(statusText, equals(originalStatusText));
final int numberOfLinesToRemove =
int.parse(message.split('CLEAR_LINES_')[1]) - 1;
final List<String> lines = LineSplitter.split(statusText).toList();
// Clear string buffer and re-add lines not removed
clear();
for (int lineNumber = 0; lineNumber < lines.length - numberOfLinesToRemove; lineNumber++) {
super.printStatus(lines[lineNumber]);
}
} else {
super.printStatus(
message,
emphasis: emphasis,
color: color,
newline: newline,
indent: indent,
hangingIndent: hangingIndent,
wrap: wrap,
);
}
}
}
| flutter/packages/flutter_tools/test/commands.shard/hermetic/devices_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/commands.shard/hermetic/devices_test.dart",
"repo_id": "flutter",
"token_count": 14377
} | 826 |
// Copyright 2014 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.
import 'dart:async';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/io.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/build_info.dart';
import 'package:flutter_tools/src/cache.dart';
import 'package:flutter_tools/src/commands/screenshot.dart';
import 'package:flutter_tools/src/device.dart';
import 'package:flutter_tools/src/project.dart';
import 'package:flutter_tools/src/vmservice.dart';
import 'package:test/fake.dart';
import '../../src/common.dart';
import '../../src/context.dart';
import '../../src/fake_devices.dart';
import '../../src/test_flutter_command_runner.dart';
void main() {
setUpAll(() {
Cache.disableLocking();
});
group('Validate screenshot options', () {
testUsingContext('rasterizer and skia screenshots do not require a device', () async {
// Throw a specific exception when attempting to make a VM Service connection to
// verify that we've made it past the initial validation.
openChannelForTesting = (String url, {CompressionOptions? compression, Logger? logger}) async {
expect(url, 'ws://localhost:8181/ws');
throw Exception('dummy');
};
await expectLater(() => createTestCommandRunner(ScreenshotCommand(fs: MemoryFileSystem.test()))
.run(<String>['screenshot', '--type=skia', '--vm-service-url=http://localhost:8181']),
throwsA(isException.having((Exception exception) => exception.toString(), 'message', contains('dummy'))),
);
});
testUsingContext('rasterizer and skia screenshots require VM Service uri', () async {
await expectLater(() => createTestCommandRunner(ScreenshotCommand(fs: MemoryFileSystem.test()))
.run(<String>['screenshot', '--type=skia']),
throwsToolExit(message: 'VM Service URI must be specified for screenshot type skia')
);
});
testUsingContext('device screenshots require device', () async {
await expectLater(() => createTestCommandRunner(ScreenshotCommand(fs: MemoryFileSystem.test()))
.run(<String>['screenshot']),
throwsToolExit(message: 'Must have a connected device for screenshot type device'),
);
});
testUsingContext('device screenshots cannot provided VM Service', () async {
await expectLater(() => createTestCommandRunner(ScreenshotCommand(fs: MemoryFileSystem.test()))
.run(<String>['screenshot', '--vm-service-url=http://localhost:8181']),
throwsToolExit(message: 'VM Service URI cannot be provided for screenshot type device'),
);
});
});
group('Screenshot file validation', () {
testWithoutContext('successful in pwd', () async {
final MemoryFileSystem fs = MemoryFileSystem.test();
fs.file('test.png').createSync();
fs.directory('sub_dir').createSync();
fs.file('sub_dir/test.png').createSync();
expect(() => ScreenshotCommand.checkOutput(fs.file('test.png'), fs),
returnsNormally);
expect(
() => ScreenshotCommand.checkOutput(fs.file('sub_dir/test.png'), fs),
returnsNormally);
});
testWithoutContext('failed in pwd', () async {
final MemoryFileSystem fs = MemoryFileSystem.test();
fs.directory('sub_dir').createSync();
expect(
() => ScreenshotCommand.checkOutput(fs.file('test.png'), fs),
throwsToolExit(
message: 'File was not created, ensure path is valid'));
expect(
() => ScreenshotCommand.checkOutput(fs.file('../'), fs),
throwsToolExit(
message: 'File was not created, ensure path is valid'));
expect(
() => ScreenshotCommand.checkOutput(fs.file('.'), fs),
throwsToolExit(
message: 'File was not created, ensure path is valid'));
expect(
() => ScreenshotCommand.checkOutput(fs.file('/'), fs),
throwsToolExit(
message: 'File was not created, ensure path is valid'));
expect(
() => ScreenshotCommand.checkOutput(fs.file('sub_dir/test.png'), fs),
throwsToolExit(
message: 'File was not created, ensure path is valid'));
});
});
group('Screenshot output validation', () {
testWithoutContext('successful', () async {
final MemoryFileSystem fs = MemoryFileSystem.test();
fs.file('test.png').createSync();
expect(() => ScreenshotCommand.ensureOutputIsNotJsonRpcError(fs.file('test.png')),
returnsNormally);
});
testWithoutContext('failed', () async {
final MemoryFileSystem fs = MemoryFileSystem.test();
fs.file('test.png').writeAsStringSync('{"jsonrpc":"2.0", "error":"something"}');
expect(
() => ScreenshotCommand.ensureOutputIsNotJsonRpcError(fs.file('test.png')),
throwsToolExit(
message: 'It appears the output file contains an error message, not valid output.'));
});
});
group('Screenshot for devices unsupported for project', () {
late _TestDeviceManager testDeviceManager;
setUp(() {
testDeviceManager = _TestDeviceManager(logger: BufferLogger.test());
});
testUsingContext('should not throw for a single device', () async {
final ScreenshotCommand command = ScreenshotCommand(fs: MemoryFileSystem.test());
final _ScreenshotDevice deviceUnsupportedForProject = _ScreenshotDevice(
id: '123', name: 'Device 1', isSupportedForProject: false);
testDeviceManager.devices = <Device>[deviceUnsupportedForProject];
await createTestCommandRunner(command).run(<String>['screenshot']);
}, overrides: <Type, Generator>{
DeviceManager: () => testDeviceManager,
});
testUsingContext('should tool exit for multiple devices', () async {
final ScreenshotCommand command = ScreenshotCommand(fs: MemoryFileSystem.test());
final List<_ScreenshotDevice> devicesUnsupportedForProject = <_ScreenshotDevice>[
_ScreenshotDevice(id: '123', name: 'Device 1', isSupportedForProject: false),
_ScreenshotDevice(id: '456', name: 'Device 2', isSupportedForProject: false),
];
testDeviceManager.devices = devicesUnsupportedForProject;
await expectLater(() => createTestCommandRunner(command).run(<String>['screenshot']), throwsToolExit(
message: 'Must have a connected device for screenshot type device',
));
expect(testLogger.statusText, contains('''
More than one device connected; please specify a device with the '-d <deviceId>' flag, or use '-d all' to act on all devices.
Device 1 (mobile) • 123 • android • 1.2.3
Device 2 (mobile) • 456 • android • 1.2.3
'''));
}, overrides: <Type, Generator>{
DeviceManager: () => testDeviceManager,
});
});
}
class _ScreenshotDevice extends Fake implements Device {
_ScreenshotDevice({
required this.id,
required this.name,
required bool isSupportedForProject,
}) : _isSupportedForProject = isSupportedForProject;
@override
final String name;
@override
final String id;
final bool _isSupportedForProject;
@override
bool isSupportedForProject(FlutterProject flutterProject) => _isSupportedForProject;
@override
bool supportsScreenshot = true;
@override
bool get isConnected => true;
@override
bool isSupported() => true;
@override
bool ephemeral = true;
@override
DeviceConnectionInterface connectionInterface = DeviceConnectionInterface.attached;
@override
Future<void> takeScreenshot(File outputFile) async {
outputFile.writeAsBytesSync(<int>[1, 2, 3, 4]);
}
@override
Future<String> get targetPlatformDisplayName async => 'android';
@override
Future<String> get sdkNameAndVersion async => '1.2.3';
@override
Future<TargetPlatform> get targetPlatform => Future<TargetPlatform>.value(TargetPlatform.android);
@override
Future<bool> get isLocalEmulator async => false;
@override
Category get category => Category.mobile;
}
class _TestDeviceManager extends DeviceManager {
_TestDeviceManager({required super.logger});
List<Device> devices = <Device>[];
@override
List<DeviceDiscovery> get deviceDiscoverers {
final FakePollingDeviceDiscovery discoverer = FakePollingDeviceDiscovery();
devices.forEach(discoverer.addDevice);
return <DeviceDiscovery>[discoverer];
}
}
| flutter/packages/flutter_tools/test/commands.shard/hermetic/screenshot_command_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/commands.shard/hermetic/screenshot_command_test.dart",
"repo_id": "flutter",
"token_count": 2905
} | 827 |
-----BEGIN CERTIFICATE-----
MIICjTCCAfYCCQDR1evIEbvoVjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMC
VVMxEjAQBgNVBAgMCVNvbWV3aGVyZTERMA8GA1UEBwwIU29tZUNpdHkxDTALBgNV
BAoMBENvcnAxETAPBgNVBAsMCFNvZnR3YXJlMRIwEAYDVQQDDAlsb2NhbGhvc3Qx
HjAcBgkqhkiG9w0BCQEWD2FkbWluQGxvY2FsaG9zdDAeFw0xMjA2MDgxOTE0Mzha
Fw0xMjA3MDgxOTE0MzhaMIGKMQswCQYDVQQGEwJVUzESMBAGA1UECAwJU29tZXdo
ZXJlMREwDwYDVQQHDAhTb21lQ2l0eTENMAsGA1UECgwEQ29ycDERMA8GA1UECwwI
U29mdHdhcmUxEjAQBgNVBAMMCWxvY2FsaG9zdDEeMBwGCSqGSIb3DQEJARYPYWRt
aW5AbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC/Vj4UCdQI
N0IMCHDWwDo3QyH9I8sBm/OwIiiJbQ0RpyfWCn4ilzZwu98okwUCu5PwlFQZd67a
DooxhFS2FSw4iRZCUGJlgV7BG1JX9q0xqVy33V6rxFFYQYHw6r7FHPaw2FuRCOoi
uDqE+ua6lbV2YP/eXiRnq5hT5vWfEX5rYwIDAQABMA0GCSqGSIb3DQEBBQUAA4GB
ADQFczkmr+91I3id7HH1voh9YKVqA9nh1yYFCkonsDPXBEJIZEyYa9HaWVkcMMgo
F7bJbWKyaYXW818XPXuOmSBI7dmaMtqITEJWsxdcMVKYCOMtjTLwquPki6xXZxNb
y/zubrV+P4XN0Wi0hoDU/0/RNQOuAF1w7UOQsUmn1ihj
-----END CERTIFICATE-----
| flutter/packages/flutter_tools/test/data/asset_test/tls_cert/dummy-cert.pem/0 | {
"file_path": "flutter/packages/flutter_tools/test/data/asset_test/tls_cert/dummy-cert.pem",
"repo_id": "flutter",
"token_count": 690
} | 828 |
// Copyright 2014 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.
import 'package:file/memory.dart';
import 'package:flutter_tools/src/android/android_studio.dart';
import 'package:flutter_tools/src/android/android_studio_validator.dart';
import 'package:flutter_tools/src/base/config.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/io.dart';
import 'package:flutter_tools/src/base/platform.dart';
import 'package:flutter_tools/src/base/user_messages.dart';
import 'package:flutter_tools/src/base/version.dart';
import 'package:flutter_tools/src/doctor_validator.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:test/fake.dart';
import '../../src/common.dart';
import '../../src/context.dart';
import '../../src/fake_process_manager.dart';
const String home = '/home/me';
final Platform linuxPlatform = FakePlatform(
environment: <String, String>{'HOME': home}
);
void main() {
late FileSystem fileSystem;
late FakeProcessManager fakeProcessManager;
setUp(() {
fileSystem = MemoryFileSystem.test();
fakeProcessManager = FakeProcessManager.empty();
});
group(NoAndroidStudioValidator, () {
testWithoutContext('shows Android Studio as "not available" when not available.', () async {
final Config config = Config.test();
final NoAndroidStudioValidator validator = NoAndroidStudioValidator(
config: config,
platform: linuxPlatform,
userMessages: UserMessages(),
);
expect((await validator.validate()).type, equals(ValidationType.notAvailable));
});
});
group(AndroidStudioValidator, () {
testUsingContext('gives doctor error on java crash', () async {
fakeProcessManager.addCommand(const FakeCommand(
command: <String>[
'/opt/android-studio-with-cheese-5.0/jre/bin/java',
'-version',
],
exception: ProcessException('java', <String>['-version']),
));
const String installPath = '/opt/android-studio-with-cheese-5.0';
const String studioHome = '$home/.AndroidStudioWithCheese5.0';
const String homeFile = '$studioHome/system/.home';
globals.fs.directory(installPath).createSync(recursive: true);
globals.fs.file(homeFile).createSync(recursive: true);
globals.fs.file(homeFile).writeAsStringSync(installPath);
// This checks that running the validator doesn't throw an unhandled
// exception and that the ProcessException makes it into the error
// message list.
for (final DoctorValidator validator in AndroidStudioValidator.allValidators(globals.config, globals.platform, globals.fs, globals.userMessages)) {
final ValidationResult result = await validator.validate();
expect(result.messages.where((ValidationMessage message) {
return message.isError && message.message.contains('ProcessException');
}).isNotEmpty, true);
}
expect(fakeProcessManager, hasNoRemainingExpectations);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => fakeProcessManager,
Platform: () => linuxPlatform,
FileSystemUtils: () => FileSystemUtils(
fileSystem: fileSystem,
platform: linuxPlatform,
),
});
testWithoutContext('warns if version of Android Studio could not be determined', () async {
final AndroidStudio studio = _FakeAndroidStudio();
final AndroidStudioValidator validator = AndroidStudioValidator(studio, fileSystem: fileSystem, userMessages: UserMessages());
final ValidationResult result = await validator.validate();
expect(result.messages, contains(const ValidationMessage.error('Unable to determine Android Studio version.')));
expect(result.statusInfo, 'version unknown');
});
});
}
class _FakeAndroidStudio extends Fake implements AndroidStudio {
@override
List<String> get validationMessages => <String>[];
@override
bool get isValid => true;
@override
String? get pluginsPath => null;
@override
String get directory => 'android-studio';
@override
Version? get version => null;
@override
String get javaPath => 'android-studio/jbr/bin/java';
}
| flutter/packages/flutter_tools/test/general.shard/android/android_studio_validator_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/android/android_studio_validator_test.dart",
"repo_id": "flutter",
"token_count": 1457
} | 829 |
// Copyright 2014 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.
import 'package:file/memory.dart';
import 'package:flutter_tools/src/asset.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/base/platform.dart';
import 'package:flutter_tools/src/base/user_messages.dart';
import 'package:flutter_tools/src/cache.dart';
import 'package:flutter_tools/src/project.dart';
import '../src/common.dart';
void main() {
Future<ManifestAssetBundle> buildBundleWithFlavor(String? flavor, {
required Logger logger,
required FileSystem fileSystem,
required Platform platform,
}) async {
final ManifestAssetBundle bundle = ManifestAssetBundle(
logger: logger,
fileSystem: fileSystem,
platform: platform,
flutterRoot: Cache.defaultFlutterRoot(
platform: platform,
fileSystem: fileSystem,
userMessages: UserMessages(),
),
splitDeferredAssets: true,
);
await bundle.build(
packagesPath: '.packages',
flutterProject: FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
flavor: flavor,
);
return bundle;
}
testWithoutContext('correctly bundles assets given a simple asset manifest with flavors', () async {
final MemoryFileSystem fileSystem = MemoryFileSystem();
fileSystem.currentDirectory = fileSystem.systemTempDirectory.createTempSync('flutter_asset_bundle_test.');
final BufferLogger logger = BufferLogger.test();
final FakePlatform platform = FakePlatform();
fileSystem.file('.packages').createSync();
fileSystem.file(fileSystem.path.join('assets', 'common', 'image.png')).createSync(recursive: true);
fileSystem.file(fileSystem.path.join('assets', 'vanilla', 'ice-cream.png')).createSync(recursive: true);
fileSystem.file(fileSystem.path.join('assets', 'strawberry', 'ice-cream.png')).createSync(recursive: true);
fileSystem.file(fileSystem.path.join('assets', 'orange', 'ice-cream.png')).createSync(recursive: true);
fileSystem.file('pubspec.yaml')
..createSync()
..writeAsStringSync(r'''
name: example
flutter:
assets:
- assets/common/
- path: assets/vanilla/
flavors:
- vanilla
- path: assets/strawberry/
flavors:
- strawberry
- path: assets/orange/ice-cream.png
flavors:
- orange
''');
ManifestAssetBundle bundle;
bundle = await buildBundleWithFlavor(
null,
logger: logger,
fileSystem: fileSystem,
platform: platform,
);
expect(bundle.entries.keys, contains('assets/common/image.png'));
expect(bundle.entries.keys, isNot(contains('assets/vanilla/ice-cream.png')));
expect(bundle.entries.keys, isNot(contains('assets/strawberry/ice-cream.png')));
expect(bundle.entries.keys, isNot(contains('assets/orange/ice-cream.png')));
bundle = await buildBundleWithFlavor(
'strawberry',
logger: logger,
fileSystem: fileSystem,
platform: platform,
);
expect(bundle.entries.keys, contains('assets/common/image.png'));
expect(bundle.entries.keys, isNot(contains('assets/vanilla/ice-cream.png')));
expect(bundle.entries.keys, contains('assets/strawberry/ice-cream.png'));
expect(bundle.entries.keys, isNot(contains('assets/orange/ice-cream.png')));
bundle = await buildBundleWithFlavor(
'orange',
logger: logger,
fileSystem: fileSystem,
platform: platform,
);
expect(bundle.entries.keys, contains('assets/common/image.png'));
expect(bundle.entries.keys, isNot(contains('assets/vanilla/ice-cream.png')));
expect(bundle.entries.keys, isNot(contains('assets/strawberry/ice-cream.png')));
expect(bundle.entries.keys, contains('assets/orange/ice-cream.png'));
});
testWithoutContext('throws a tool exit when a non-flavored folder contains a flavored asset', () async {
final MemoryFileSystem fileSystem = MemoryFileSystem();
fileSystem.currentDirectory = fileSystem.systemTempDirectory.createTempSync('flutter_asset_bundle_test.');
final BufferLogger logger = BufferLogger.test();
final FakePlatform platform = FakePlatform();
fileSystem.file('.packages').createSync();
fileSystem.file(fileSystem.path.join('assets', 'unflavored.png')).createSync(recursive: true);
fileSystem.file(fileSystem.path.join('assets', 'vanillaOrange.png')).createSync(recursive: true);
fileSystem.file('pubspec.yaml')
..createSync()
..writeAsStringSync(r'''
name: example
flutter:
assets:
- assets/
- path: assets/vanillaOrange.png
flavors:
- vanilla
- orange
''');
expect(
buildBundleWithFlavor(
null,
logger: logger,
fileSystem: fileSystem,
platform: platform,
),
throwsToolExit(message: 'Multiple assets entries include the file '
'"assets/vanillaOrange.png", but they specify different lists of flavors.\n'
'An entry with the path "assets/" does not specify any flavors.\n'
'An entry with the path "assets/vanillaOrange.png" specifies the flavor(s): "vanilla", "orange".\n\n'
'Consider organizing assets with different flavors into different directories.'),
);
});
testWithoutContext('throws a tool exit when a flavored folder contains a flavorless asset', () async {
final MemoryFileSystem fileSystem = MemoryFileSystem();
fileSystem.currentDirectory = fileSystem.systemTempDirectory.createTempSync('flutter_asset_bundle_test.');
final BufferLogger logger = BufferLogger.test();
final FakePlatform platform = FakePlatform();
fileSystem.file('.packages').createSync();
fileSystem.file(fileSystem.path.join('vanilla', 'vanilla.png')).createSync(recursive: true);
fileSystem.file(fileSystem.path.join('vanilla', 'flavorless.png')).createSync(recursive: true);
fileSystem.file('pubspec.yaml')
..createSync()
..writeAsStringSync(r'''
name: example
flutter:
assets:
- path: vanilla/
flavors:
- vanilla
- vanilla/flavorless.png
''');
expect(
buildBundleWithFlavor(
null,
logger: logger,
fileSystem: fileSystem,
platform: platform,
),
throwsToolExit(message: 'Multiple assets entries include the file '
'"vanilla/flavorless.png", but they specify different lists of flavors.\n'
'An entry with the path "vanilla/" specifies the flavor(s): "vanilla".\n'
'An entry with the path "vanilla/flavorless.png" does not specify any flavors.\n\n'
'Consider organizing assets with different flavors into different directories.'),
);
});
testWithoutContext('tool exits when two file-explicit entries give the same asset different flavors', () {
final MemoryFileSystem fileSystem = MemoryFileSystem();
fileSystem.currentDirectory = fileSystem.systemTempDirectory.createTempSync('flutter_asset_bundle_test.');
final BufferLogger logger = BufferLogger.test();
final FakePlatform platform = FakePlatform();
fileSystem.file('.packages').createSync();
fileSystem.file('orange.png').createSync(recursive: true);
fileSystem.file('pubspec.yaml')
..createSync()
..writeAsStringSync(r'''
name: example
flutter:
assets:
- path: orange.png
flavors:
- orange
- path: orange.png
flavors:
- mango
''');
expect(
buildBundleWithFlavor(
null,
logger: logger,
fileSystem: fileSystem,
platform: platform,
),
throwsToolExit(message: 'Multiple assets entries include the file '
'"orange.png", but they specify different lists of flavors.\n'
'An entry with the path "orange.png" specifies the flavor(s): "orange".\n'
'An entry with the path "orange.png" specifies the flavor(s): "mango".'),
);
});
testWithoutContext('throws ToolExit when flavor from file-level declaration has different flavor from containing folder flavor declaration', () async {
final MemoryFileSystem fileSystem = MemoryFileSystem();
fileSystem.currentDirectory = fileSystem.systemTempDirectory.createTempSync('flutter_asset_bundle_test.');
final BufferLogger logger = BufferLogger.test();
final FakePlatform platform = FakePlatform();
fileSystem.file('.packages').createSync();
fileSystem.file(fileSystem.path.join('vanilla', 'actually-strawberry.png')).createSync(recursive: true);
fileSystem.file(fileSystem.path.join('vanilla', 'vanilla.png')).createSync(recursive: true);
fileSystem.file('pubspec.yaml')
..createSync()
..writeAsStringSync(r'''
name: example
flutter:
assets:
- path: vanilla/
flavors:
- vanilla
- path: vanilla/actually-strawberry.png
flavors:
- strawberry
''');
expect(
buildBundleWithFlavor(
null,
logger: logger,
fileSystem: fileSystem,
platform: platform,
),
throwsToolExit(message: 'Multiple assets entries include the file '
'"vanilla/actually-strawberry.png", but they specify different lists of flavors.\n'
'An entry with the path "vanilla/" specifies the flavor(s): "vanilla".\n'
'An entry with the path "vanilla/actually-strawberry.png" '
'specifies the flavor(s): "strawberry".'),
);
});
}
| flutter/packages/flutter_tools/test/general.shard/asset_bundle_flavors_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/asset_bundle_flavors_test.dart",
"repo_id": "flutter",
"token_count": 3379
} | 830 |
// Copyright 2014 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.
import 'dart:convert' show json;
import 'package:file/memory.dart';
import 'package:file_testing/file_testing.dart';
import 'package:flutter_tools/src/base/fingerprint.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/base/utils.dart';
import '../../src/common.dart';
void main() {
group('Fingerprinter', () {
late MemoryFileSystem fileSystem;
setUp(() {
fileSystem = MemoryFileSystem.test();
});
testWithoutContext('creates fingerprint with specified properties and files', () {
fileSystem.file('a.dart').createSync();
final Fingerprinter fingerprinter = Fingerprinter(
fingerprintPath: 'out.fingerprint',
paths: <String>['a.dart'],
fileSystem: fileSystem,
logger: BufferLogger.test(),
);
final Fingerprint fingerprint = fingerprinter.buildFingerprint();
expect(fingerprint, Fingerprint.fromBuildInputs(const <String>['a.dart'], fileSystem));
});
testWithoutContext('creates fingerprint with file checksums', () {
fileSystem.file('a.dart').createSync();
final Fingerprinter fingerprinter = Fingerprinter(
fingerprintPath: 'out.fingerprint',
paths: <String>['a.dart'],
fileSystem: fileSystem,
logger: BufferLogger.test(),
);
final Fingerprint fingerprint = fingerprinter.buildFingerprint();
expect(fingerprint, Fingerprint.fromBuildInputs(const <String>['a.dart'], fileSystem));
});
testWithoutContext('fingerprint does not match if not present', () {
fileSystem.file('a.dart').createSync();
fileSystem.file('b.dart').createSync();
final Fingerprinter fingerprinter = Fingerprinter(
fingerprintPath: 'out.fingerprint',
paths: <String>['a.dart', 'b.dart'],
fileSystem: fileSystem,
logger: BufferLogger.test(),
);
expect(fingerprinter.doesFingerprintMatch(), isFalse);
});
testWithoutContext('fingerprint does match if identical', () {
fileSystem.file('a.dart').createSync();
fileSystem.file('b.dart').createSync();
const String fingerprintPath = 'path/to/out.fingerprint';
final Fingerprinter fingerprinter = Fingerprinter(
fingerprintPath: fingerprintPath,
paths: <String>['a.dart', 'b.dart'],
fileSystem: fileSystem,
logger: BufferLogger.test(),
);
fingerprinter.writeFingerprint();
expect(fingerprinter.doesFingerprintMatch(), isTrue);
expect(fileSystem.file(fingerprintPath), exists);
});
testWithoutContext('fails to write fingerprint if inputs are missing', () {
const String fingerprintPath = 'path/to/out.fingerprint';
final Fingerprinter fingerprinter = Fingerprinter(
fingerprintPath: fingerprintPath,
paths: <String>['a.dart'],
fileSystem: fileSystem,
logger: BufferLogger.test(),
);
fingerprinter.writeFingerprint();
expect(fileSystem.file(fingerprintPath), isNot(exists));
});
group('Fingerprint', () {
group('fromBuildInputs', () {
late MemoryFileSystem fileSystem;
setUp(() {
fileSystem = MemoryFileSystem.test();
});
testWithoutContext('throws if any input file does not exist', () {
fileSystem.file('a.dart').createSync();
expect(
() => Fingerprint.fromBuildInputs(const <String>['a.dart', 'b.dart'], fileSystem),
throwsException,
);
});
testWithoutContext('populates checksums for valid files', () {
fileSystem.file('a.dart').writeAsStringSync('This is a');
fileSystem.file('b.dart').writeAsStringSync('This is b');
final Fingerprint fingerprint = Fingerprint.fromBuildInputs(const <String>['a.dart', 'b.dart'], fileSystem);
final Map<String, dynamic>? jsonObject = castStringKeyedMap(json.decode(fingerprint.toJson()));
final Map<String, dynamic> files = jsonObject!['files'] as Map<String, dynamic>;
expect(files, hasLength(2));
expect(files['a.dart'], '8a21a15fad560b799f6731d436c1b698');
expect(files['b.dart'], '6f144e08b58cd0925328610fad7ac07c');
});
});
group('fromJson', () {
testWithoutContext('throws if JSON is invalid', () {
expect(() => Fingerprint.fromJson('<xml></xml>'), throwsA(anything));
});
testWithoutContext('creates fingerprint from valid JSON', () {
final String jsonString = json.encode(<String, dynamic>{
'files': <String, dynamic>{
'a.dart': '8a21a15fad560b799f6731d436c1b698',
'b.dart': '6f144e08b58cd0925328610fad7ac07c',
},
});
final Fingerprint fingerprint = Fingerprint.fromJson(jsonString);
final Map<String, dynamic>? content = castStringKeyedMap(json.decode(fingerprint.toJson()));
final Map<String, dynamic> files = content!['files'] as Map<String, dynamic>;
expect(content, hasLength(1));
expect(files, hasLength(2));
expect(files['a.dart'], '8a21a15fad560b799f6731d436c1b698');
expect(files['b.dart'], '6f144e08b58cd0925328610fad7ac07c');
});
testWithoutContext('treats missing properties and files entries as if empty', () {
final String jsonString = json.encode(<String, dynamic>{});
expect(Fingerprint.fromJson(jsonString), Fingerprint.fromBuildInputs(const <String>[], fileSystem));
});
});
group('operator ==', () {
testWithoutContext('reports not equal if file checksums do not match', () {
final Map<String, dynamic> a = <String, dynamic>{
'files': <String, dynamic>{
'a.dart': '8a21a15fad560b799f6731d436c1b698',
'b.dart': '6f144e08b58cd0925328610fad7ac07c',
},
};
final Map<String, dynamic> b = Map<String, dynamic>.of(a);
b['files'] = <String, dynamic>{
'a.dart': '8a21a15fad560b799f6731d436c1b698',
'b.dart': '6f144e08b58cd0925328610fad7ac07d',
};
expect(Fingerprint.fromJson(json.encode(a)) == Fingerprint.fromJson(json.encode(b)), isFalse);
});
testWithoutContext('reports not equal if file paths do not match', () {
final Map<String, dynamic> a = <String, dynamic>{
'files': <String, dynamic>{
'a.dart': '8a21a15fad560b799f6731d436c1b698',
'b.dart': '6f144e08b58cd0925328610fad7ac07c',
},
};
final Map<String, dynamic> b = Map<String, dynamic>.of(a);
b['files'] = <String, dynamic>{
'a.dart': '8a21a15fad560b799f6731d436c1b698',
'c.dart': '6f144e08b58cd0925328610fad7ac07d',
};
expect(Fingerprint.fromJson(json.encode(a)) == Fingerprint.fromJson(json.encode(b)), isFalse);
});
testWithoutContext('reports equal if properties and file checksums match', () {
final Map<String, dynamic> a = <String, dynamic>{
'files': <String, dynamic>{
'a.dart': '8a21a15fad560b799f6731d436c1b698',
'b.dart': '6f144e08b58cd0925328610fad7ac07c',
},
};
expect(Fingerprint.fromJson(json.encode(a)) == Fingerprint.fromJson(json.encode(a)), isTrue);
});
});
group('hashCode', () {
testWithoutContext('is consistent with equals, even if map entries are reordered', () {
final Fingerprint a = Fingerprint.fromJson('{"properties":{"a":"A","b":"B"},"files":{}}');
final Fingerprint b = Fingerprint.fromJson('{"properties":{"b":"B","a":"A"},"files":{}}');
expect(a, b);
expect(a.hashCode, b.hashCode);
});
});
});
});
}
| flutter/packages/flutter_tools/test/general.shard/base/fingerprint_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/base/fingerprint_test.dart",
"repo_id": "flutter",
"token_count": 3255
} | 831 |
// Copyright 2014 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.
import 'package:file/memory.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/build_system/depfile.dart';
import '../../src/common.dart';
void main() {
late FileSystem fileSystem;
late DepfileService depfileService;
setUp(() {
fileSystem = MemoryFileSystem.test();
depfileService = DepfileService(
logger: BufferLogger.test(),
fileSystem: fileSystem,
);
});
testWithoutContext('Can parse depfile from file', () {
final File depfileSource = fileSystem.file('example.d')..writeAsStringSync('''
a.txt: b.txt
''');
final Depfile depfile = depfileService.parse(depfileSource);
expect(depfile.inputs.single.path, 'b.txt');
expect(depfile.outputs.single.path, 'a.txt');
});
testWithoutContext('Can parse depfile with multiple inputs', () {
final File depfileSource = fileSystem.file('example.d')..writeAsStringSync('''
a.txt: b.txt c.txt d.txt
''');
final Depfile depfile = depfileService.parse(depfileSource);
expect(depfile.inputs.map((File file) => file.path), <String>[
'b.txt',
'c.txt',
'd.txt',
]);
expect(depfile.outputs.single.path, 'a.txt');
});
testWithoutContext('Can parse depfile with multiple outputs', () {
final File depfileSource = fileSystem.file('example.d')..writeAsStringSync('''
a.txt c.txt d.txt: b.txt
''');
final Depfile depfile = depfileService.parse(depfileSource);
expect(depfile.inputs.single.path, 'b.txt');
expect(depfile.outputs.map((File file) => file.path), <String>[
'a.txt',
'c.txt',
'd.txt',
]);
});
testWithoutContext('Can parse depfile with windows file paths', () {
fileSystem = MemoryFileSystem.test(style: FileSystemStyle.windows);
depfileService = DepfileService(
logger: BufferLogger.test(),
fileSystem: fileSystem,
);
final File depfileSource = fileSystem.file('example.d')..writeAsStringSync(r'''
C:\\a.txt: C:\\b.txt
''');
final Depfile depfile = depfileService.parse(depfileSource);
expect(depfile.inputs.single.path, r'C:\b.txt');
expect(depfile.outputs.single.path, r'C:\a.txt');
});
testWithoutContext('Can escape depfile with windows file paths and spaces in directory names', () {
fileSystem = MemoryFileSystem.test(style: FileSystemStyle.windows);
depfileService = DepfileService(
logger: BufferLogger.test(),
fileSystem: fileSystem,
);
final File inputFile = fileSystem.directory(r'Hello Flutter').childFile('a.txt').absolute
..createSync(recursive: true);
final File outputFile = fileSystem.directory(r'Hello Flutter').childFile('b.txt').absolute
..createSync();
final Depfile depfile = Depfile(<File>[inputFile], <File>[outputFile]);
final File outputDepfile = fileSystem.file('depfile');
depfileService.writeToFile(depfile, outputDepfile);
expect(outputDepfile.readAsStringSync(), contains(r'C:\\Hello\ Flutter\\a.txt'));
expect(outputDepfile.readAsStringSync(), contains(r'C:\\Hello\ Flutter\\b.txt'));
});
testWithoutContext('Can escape depfile with spaces in directory names', () {
final File inputFile = fileSystem.directory(r'Hello Flutter').childFile('a.txt').absolute
..createSync(recursive: true);
final File outputFile = fileSystem.directory(r'Hello Flutter').childFile('b.txt').absolute
..createSync();
final Depfile depfile = Depfile(<File>[inputFile], <File>[outputFile]);
final File outputDepfile = fileSystem.file('depfile');
depfileService.writeToFile(depfile, outputDepfile);
expect(outputDepfile.readAsStringSync(), contains(r'/Hello\ Flutter/a.txt'));
expect(outputDepfile.readAsStringSync(), contains(r'/Hello\ Flutter/b.txt'));
});
testWithoutContext('Resilient to weird whitespace', () {
final File depfileSource = fileSystem.file('example.d')..writeAsStringSync(r'''
a.txt
: b.txt c.txt
''');
final Depfile depfile = depfileService.parse(depfileSource);
expect(depfile.inputs, hasLength(2));
expect(depfile.outputs.single.path, 'a.txt');
});
testWithoutContext('Resilient to duplicate files', () {
final File depfileSource = fileSystem.file('example.d')..writeAsStringSync(r'''
a.txt: b.txt b.txt
''');
final Depfile depfile = depfileService.parse(depfileSource);
expect(depfile.inputs.single.path, 'b.txt');
expect(depfile.outputs.single.path, 'a.txt');
});
testWithoutContext('Resilient to malformed file, missing :', () {
final File depfileSource = fileSystem.file('example.d')..writeAsStringSync(r'''
a.text b.txt
''');
final Depfile depfile = depfileService.parse(depfileSource);
expect(depfile.inputs, isEmpty);
expect(depfile.outputs, isEmpty);
});
testWithoutContext('Can parse dart2js output format', () {
final File dart2jsDependencyFile = fileSystem.file('main.dart.js.deps')..writeAsStringSync(r'''
file:///Users/foo/collection.dart
file:///Users/foo/algorithms.dart
file:///Users/foo/canonicalized_map.dart
''');
final Depfile depfile = depfileService.parseDart2js(dart2jsDependencyFile, fileSystem.file('foo.dart.js'));
expect(depfile.inputs.map((File file) => file.path), <String>[
fileSystem.path.absolute(fileSystem.path.join('Users', 'foo', 'collection.dart')),
fileSystem.path.absolute(fileSystem.path.join('Users', 'foo', 'algorithms.dart')),
fileSystem.path.absolute(fileSystem.path.join('Users', 'foo', 'canonicalized_map.dart')),
]);
expect(depfile.outputs.single.path, 'foo.dart.js');
});
testWithoutContext('Can parse handle invalid uri', () {
final File dart2jsDependencyFile = fileSystem.file('main.dart.js.deps')..writeAsStringSync('''
file:///Users/foo/collection.dart
abcdevf
file:///Users/foo/canonicalized_map.dart
''');
final Depfile depfile = depfileService.parseDart2js(dart2jsDependencyFile, fileSystem.file('foo.dart.js'));
expect(depfile.inputs.map((File file) => file.path), <String>[
fileSystem.path.absolute(fileSystem.path.join('Users', 'foo', 'collection.dart')),
fileSystem.path.absolute(fileSystem.path.join('Users', 'foo', 'canonicalized_map.dart')),
]);
expect(depfile.outputs.single.path, 'foo.dart.js');
});
}
| flutter/packages/flutter_tools/test/general.shard/build_system/depfile_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/build_system/depfile_test.dart",
"repo_id": "flutter",
"token_count": 2305
} | 832 |
// Copyright 2014 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.
import 'package:file/memory.dart';
import 'package:flutter_tools/src/artifacts.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/build_system/build_system.dart';
import 'package:flutter_tools/src/build_system/targets/localizations.dart';
import 'package:flutter_tools/src/localizations/localizations_utils.dart';
import '../../../src/common.dart';
import '../../../src/fake_process_manager.dart';
void main() {
testWithoutContext('generateLocalizations is skipped if l10n.yaml does not exist.', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final Environment environment = Environment.test(
fileSystem.currentDirectory,
artifacts: Artifacts.test(),
fileSystem: fileSystem,
logger: BufferLogger.test(),
processManager: FakeProcessManager.any(),
);
expect(const GenerateLocalizationsTarget().canSkip(environment), true);
environment.projectDir.childFile('l10n.yaml').createSync();
expect(const GenerateLocalizationsTarget().canSkip(environment), false);
});
testWithoutContext('parseLocalizationsOptions handles valid yaml configuration', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final File configFile = fileSystem.file('l10n.yaml')
..writeAsStringSync('''
arb-dir: arb
template-arb-file: example.arb
output-localization-file: bar
untranslated-messages-file: untranslated
output-class: Foo
header-file: header
header: HEADER
use-deferred-loading: true
preferred-supported-locales: en_US
synthetic-package: false
required-resource-attributes: false
nullable-getter: false
''');
final LocalizationOptions options = parseLocalizationsOptionsFromYAML(
file: configFile,
logger: BufferLogger.test(),
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
);
expect(options.arbDir, Uri.parse('arb').path);
expect(options.templateArbFile, Uri.parse('example.arb').path);
expect(options.outputLocalizationFile, Uri.parse('bar').path);
expect(options.untranslatedMessagesFile, Uri.parse('untranslated').path);
expect(options.outputClass, 'Foo');
expect(options.headerFile, Uri.parse('header').path);
expect(options.header, 'HEADER');
expect(options.useDeferredLoading, true);
expect(options.preferredSupportedLocales, <String>['en_US']);
expect(options.syntheticPackage, false);
expect(options.requiredResourceAttributes, false);
expect(options.nullableGetter, false);
});
testWithoutContext('parseLocalizationsOptions handles preferredSupportedLocales as list', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final File configFile = fileSystem.file('l10n.yaml')..writeAsStringSync('''
preferred-supported-locales: ['en_US', 'de']
''');
final LocalizationOptions options = parseLocalizationsOptionsFromYAML(
file: configFile,
logger: BufferLogger.test(),
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
);
expect(options.preferredSupportedLocales, <String>['en_US', 'de']);
});
testWithoutContext(
'parseLocalizationsOptions throws exception on invalid yaml configuration',
() async {
final FileSystem fileSystem = MemoryFileSystem.test();
final File configFile = fileSystem.file('l10n.yaml')..writeAsStringSync('''
use-deferred-loading: string
''');
expect(
() => parseLocalizationsOptionsFromYAML(
file: configFile,
logger: BufferLogger.test(),
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
),
throwsException,
);
});
testWithoutContext('parseLocalizationsOptions tool exits on malformed Yaml', () async {
final FileSystem fileSystem = MemoryFileSystem.test();
final File configFile = fileSystem.file('l10n.yaml')..writeAsStringSync('''
template-arb-file: {name}_en.arb
''');
expect(
() => parseLocalizationsOptionsFromYAML(
file: configFile,
logger: BufferLogger.test(),
defaultArbDir: fileSystem.path.join('lib', 'l10n'),
),
throwsToolExit(),
);
});
}
| flutter/packages/flutter_tools/test/general.shard/build_system/targets/localizations_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/build_system/targets/localizations_test.dart",
"repo_id": "flutter",
"token_count": 1454
} | 833 |
// Copyright 2014 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.
import 'dart:async';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/artifacts.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/build_info.dart';
import 'package:flutter_tools/src/compile.dart';
import 'package:package_config/package_config.dart';
import '../src/common.dart';
import '../src/fake_process_manager.dart';
void main() {
testWithoutContext('StdoutHandler can parse output for successful batch compilation', () async {
final BufferLogger logger = BufferLogger.test();
final StdoutHandler stdoutHandler = StdoutHandler(logger: logger, fileSystem: MemoryFileSystem.test());
stdoutHandler.reset();
'result abc\nline1\nline2\nabc\nabc /path/to/main.dart.dill 0'.split('\n').forEach(stdoutHandler.handler);
final CompilerOutput? output = await stdoutHandler.compilerOutput?.future;
expect(logger.errorText, equals('line1\nline2\n'));
expect(output?.outputFilename, equals('/path/to/main.dart.dill'));
});
testWithoutContext('StdoutHandler can parse output for failed batch compilation', () async {
final BufferLogger logger = BufferLogger.test();
final StdoutHandler stdoutHandler = StdoutHandler(logger: logger, fileSystem: MemoryFileSystem.test());
stdoutHandler.reset();
'result abc\nline1\nline2\nabc\nabc'.split('\n').forEach(stdoutHandler.handler);
final CompilerOutput? output = await stdoutHandler.compilerOutput?.future;
expect(logger.errorText, equals('line1\nline2\n'));
expect(output, equals(null));
});
testWithoutContext('KernelCompiler passes correct configuration to frontend server process', () async {
final BufferLogger logger = BufferLogger.test();
final StdoutHandler stdoutHandler = StdoutHandler(logger: logger, fileSystem: MemoryFileSystem.test());
final Completer<void> completer = Completer<void>();
final KernelCompiler kernelCompiler = KernelCompiler(
artifacts: Artifacts.test(),
fileSystem: MemoryFileSystem.test(),
fileSystemRoots: <String>[],
fileSystemScheme: '',
logger: logger,
processManager: FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: const <String>[
'Artifact.engineDartAotRuntime',
'--disable-dart-dev',
'Artifact.frontendServerSnapshotForEngineDartSdk',
'--sdk-root',
'/path/to/sdkroot/',
'--target=flutter',
'--no-print-incremental-dependencies',
'-Ddart.vm.profile=false',
'-Ddart.vm.product=false',
'--enable-asserts',
'--no-link-platform',
'--packages',
'.packages',
'--verbosity=error',
'file:///path/to/main.dart',
], completer: completer),
]),
stdoutHandler: stdoutHandler,
);
final Future<CompilerOutput?> output = kernelCompiler.compile(sdkRoot: '/path/to/sdkroot',
mainPath: '/path/to/main.dart',
buildMode: BuildMode.debug,
trackWidgetCreation: false,
dartDefines: const <String>[],
packageConfig: PackageConfig.empty,
packagesPath: '.packages',
);
stdoutHandler.compilerOutput?.complete(const CompilerOutput('', 0, <Uri>[]));
completer.complete();
expect((await output)?.outputFilename, '');
});
testWithoutContext('KernelCompiler returns null if StdoutHandler returns null', () async {
final BufferLogger logger = BufferLogger.test();
final StdoutHandler stdoutHandler = StdoutHandler(logger: logger, fileSystem: MemoryFileSystem.test());
final Completer<void> completer = Completer<void>();
final KernelCompiler kernelCompiler = KernelCompiler(
artifacts: Artifacts.test(),
fileSystem: MemoryFileSystem.test(),
fileSystemRoots: <String>[],
fileSystemScheme: '',
logger: logger,
processManager: FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: const <String>[
'Artifact.engineDartAotRuntime',
'--disable-dart-dev',
'Artifact.frontendServerSnapshotForEngineDartSdk',
'--sdk-root',
'/path/to/sdkroot/',
'--target=flutter',
'--no-print-incremental-dependencies',
'-Ddart.vm.profile=false',
'-Ddart.vm.product=false',
'--enable-asserts',
'--no-link-platform',
'--packages',
'.packages',
'--verbosity=error',
'file:///path/to/main.dart',
], completer: completer),
]),
stdoutHandler: stdoutHandler,
);
final Future<CompilerOutput?> output = kernelCompiler.compile(sdkRoot: '/path/to/sdkroot',
mainPath: '/path/to/main.dart',
buildMode: BuildMode.debug,
trackWidgetCreation: false,
dartDefines: const <String>[],
packageConfig: PackageConfig.empty,
packagesPath: '.packages',
);
stdoutHandler.compilerOutput?.complete();
completer.complete();
expect(await output, null);
});
testWithoutContext('KernelCompiler returns null if frontend_server process exits with non-zero code', () async {
final BufferLogger logger = BufferLogger.test();
final StdoutHandler stdoutHandler = StdoutHandler(logger: logger, fileSystem: MemoryFileSystem.test());
final Completer<void> completer = Completer<void>();
final KernelCompiler kernelCompiler = KernelCompiler(
artifacts: Artifacts.test(),
fileSystem: MemoryFileSystem.test(),
fileSystemRoots: <String>[],
fileSystemScheme: '',
logger: logger,
processManager: FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: const <String>[
'Artifact.engineDartAotRuntime',
'--disable-dart-dev',
'Artifact.frontendServerSnapshotForEngineDartSdk',
'--sdk-root',
'/path/to/sdkroot/',
'--target=flutter',
'--no-print-incremental-dependencies',
'-Ddart.vm.profile=false',
'-Ddart.vm.product=false',
'--enable-asserts',
'--no-link-platform',
'--packages',
'.packages',
'--verbosity=error',
'file:///path/to/main.dart',
], completer: completer, exitCode: 127),
]),
stdoutHandler: stdoutHandler,
);
final Future<CompilerOutput?> output = kernelCompiler.compile(sdkRoot: '/path/to/sdkroot',
mainPath: '/path/to/main.dart',
buildMode: BuildMode.debug,
trackWidgetCreation: false,
dartDefines: const <String>[],
packageConfig: PackageConfig.empty,
packagesPath: '.packages',
);
stdoutHandler.compilerOutput?.complete(const CompilerOutput('', 0, <Uri>[]));
completer.complete();
expect(await output, null);
});
testWithoutContext('KernelCompiler passes correct AOT config to frontend_server in aot/profile mode', () async {
final BufferLogger logger = BufferLogger.test();
final StdoutHandler stdoutHandler = StdoutHandler(logger: logger, fileSystem: MemoryFileSystem.test());
final Completer<void> completer = Completer<void>();
final KernelCompiler kernelCompiler = KernelCompiler(
artifacts: Artifacts.test(),
fileSystem: MemoryFileSystem.test(),
fileSystemRoots: <String>[],
fileSystemScheme: '',
logger: logger,
processManager: FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: const <String>[
'Artifact.engineDartAotRuntime',
'--disable-dart-dev',
'Artifact.frontendServerSnapshotForEngineDartSdk',
'--sdk-root',
'/path/to/sdkroot/',
'--target=flutter',
'--no-print-incremental-dependencies',
'-Ddart.vm.profile=true',
'-Ddart.vm.product=false',
'--delete-tostring-package-uri=dart:ui',
'--delete-tostring-package-uri=package:flutter',
'--no-link-platform',
'--aot',
'--tfa',
'--packages',
'.packages',
'--verbosity=error',
'file:///path/to/main.dart',
], completer: completer),
]),
stdoutHandler: stdoutHandler,
);
final Future<CompilerOutput?> output = kernelCompiler.compile(sdkRoot: '/path/to/sdkroot',
mainPath: '/path/to/main.dart',
buildMode: BuildMode.profile,
trackWidgetCreation: false,
aot: true,
dartDefines: const <String>[],
packageConfig: PackageConfig.empty,
packagesPath: '.packages',
);
stdoutHandler.compilerOutput?.complete(const CompilerOutput('', 0, <Uri>[]));
completer.complete();
expect((await output)?.outputFilename, '');
});
testWithoutContext('passes correct AOT config to kernel compiler in aot/release mode', () async {
final BufferLogger logger = BufferLogger.test();
final StdoutHandler stdoutHandler = StdoutHandler(logger: logger, fileSystem: MemoryFileSystem.test());
final Completer<void> completer = Completer<void>();
final KernelCompiler kernelCompiler = KernelCompiler(
artifacts: Artifacts.test(),
fileSystem: MemoryFileSystem.test(),
fileSystemRoots: <String>[],
fileSystemScheme: '',
logger: logger,
processManager: FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: const <String>[
'Artifact.engineDartAotRuntime',
'--disable-dart-dev',
'Artifact.frontendServerSnapshotForEngineDartSdk',
'--sdk-root',
'/path/to/sdkroot/',
'--target=flutter',
'--no-print-incremental-dependencies',
'-Ddart.vm.profile=false',
'-Ddart.vm.product=true',
'--delete-tostring-package-uri=dart:ui',
'--delete-tostring-package-uri=package:flutter',
'--no-link-platform',
'--aot',
'--tfa',
'--packages',
'.packages',
'--verbosity=error',
'file:///path/to/main.dart',
], completer: completer),
]),
stdoutHandler: stdoutHandler,
);
final Future<CompilerOutput?> output = kernelCompiler.compile(sdkRoot: '/path/to/sdkroot',
mainPath: '/path/to/main.dart',
buildMode: BuildMode.release,
trackWidgetCreation: false,
aot: true,
dartDefines: const <String>[],
packageConfig: PackageConfig.empty,
packagesPath: '.packages',
);
stdoutHandler.compilerOutput?.complete(const CompilerOutput('', 0, <Uri>[]));
completer.complete();
expect((await output)?.outputFilename, '');
});
testWithoutContext('KernelCompiler passes dartDefines to the frontend_server', () async {
final BufferLogger logger = BufferLogger.test();
final StdoutHandler stdoutHandler = StdoutHandler(logger: logger, fileSystem: MemoryFileSystem.test());
final Completer<void> completer = Completer<void>();
final KernelCompiler kernelCompiler = KernelCompiler(
artifacts: Artifacts.test(),
fileSystem: MemoryFileSystem.test(),
fileSystemRoots: <String>[],
fileSystemScheme: '',
logger: logger,
processManager: FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: const <String>[
'Artifact.engineDartAotRuntime',
'--disable-dart-dev',
'Artifact.frontendServerSnapshotForEngineDartSdk',
'--sdk-root',
'/path/to/sdkroot/',
'--target=flutter',
'--no-print-incremental-dependencies',
'-DFOO=bar',
'-DBAZ=qux',
'-Ddart.vm.profile=false',
'-Ddart.vm.product=false',
'--enable-asserts',
'--no-link-platform',
'--packages',
'.packages',
'--verbosity=error',
'file:///path/to/main.dart',
], completer: completer),
]),
stdoutHandler: stdoutHandler,
);
final Future<CompilerOutput?> output = kernelCompiler.compile(sdkRoot: '/path/to/sdkroot',
mainPath: '/path/to/main.dart',
buildMode: BuildMode.debug,
trackWidgetCreation: false,
dartDefines: const <String>['FOO=bar', 'BAZ=qux'],
packageConfig: PackageConfig.empty,
packagesPath: '.packages',
);
stdoutHandler.compilerOutput?.complete(const CompilerOutput('', 0, <Uri>[]));
completer.complete();
expect((await output)?.outputFilename, '');
});
testWithoutContext('KernelCompiler maps a file to a multi-root scheme if provided', () async {
final BufferLogger logger = BufferLogger.test();
final StdoutHandler stdoutHandler = StdoutHandler(logger: logger, fileSystem: MemoryFileSystem.test());
final Completer<void> completer = Completer<void>();
final KernelCompiler kernelCompiler = KernelCompiler(
artifacts: Artifacts.test(),
fileSystem: MemoryFileSystem.test(),
fileSystemRoots: <String>[
'/foo/bar/fizz',
],
fileSystemScheme: 'scheme',
logger: logger,
processManager: FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: const <String>[
'Artifact.engineDartAotRuntime',
'--disable-dart-dev',
'Artifact.frontendServerSnapshotForEngineDartSdk',
'--sdk-root',
'/path/to/sdkroot/',
'--target=flutter',
'--no-print-incremental-dependencies',
'-Ddart.vm.profile=false',
'-Ddart.vm.product=false',
'--enable-asserts',
'--no-link-platform',
'--packages',
'.packages',
'--verbosity=error',
'scheme:///main.dart',
], completer: completer),
]),
stdoutHandler: stdoutHandler,
);
final Future<CompilerOutput?> output = kernelCompiler.compile(sdkRoot: '/path/to/sdkroot',
mainPath: '/foo/bar/fizz/main.dart',
buildMode: BuildMode.debug,
trackWidgetCreation: false,
dartDefines: const <String>[],
packageConfig: PackageConfig.empty,
packagesPath: '.packages',
);
stdoutHandler.compilerOutput?.complete(const CompilerOutput('', 0, <Uri>[]));
completer.complete();
expect((await output)?.outputFilename, '');
});
testWithoutContext('KernelCompiler uses generated entrypoint', () async {
final BufferLogger logger = BufferLogger.test();
final StdoutHandler stdoutHandler = StdoutHandler(logger: logger, fileSystem: MemoryFileSystem.test());
final Completer<void> completer = Completer<void>();
final MemoryFileSystem fs = MemoryFileSystem.test();
final KernelCompiler kernelCompiler = KernelCompiler(
artifacts: Artifacts.test(),
fileSystem: fs,
fileSystemRoots: <String>[
'/foo/bar/fizz',
],
fileSystemScheme: 'scheme',
logger: logger,
processManager: FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: const <String>[
'Artifact.engineDartAotRuntime',
'--disable-dart-dev',
'Artifact.frontendServerSnapshotForEngineDartSdk',
'--sdk-root',
'/path/to/sdkroot/',
'--target=flutter',
'--no-print-incremental-dependencies',
'-Ddart.vm.profile=false',
'-Ddart.vm.product=false',
'--enable-asserts',
'--no-link-platform',
'--packages',
'.packages',
'--source',
'.dart_tools/flutter_build/dart_plugin_registrant.dart',
'--source',
'package:flutter/src/dart_plugin_registrant.dart',
'-Dflutter.dart_plugin_registrant=.dart_tools/flutter_build/dart_plugin_registrant.dart',
'--verbosity=error',
'scheme:///main.dart',
], completer: completer),
]),
stdoutHandler: stdoutHandler,
);
final Directory buildDir = fs.directory('.dart_tools')
.childDirectory('flutter_build')
.childDirectory('test');
buildDir.parent.childFile('dart_plugin_registrant.dart').createSync(recursive: true);
final Future<CompilerOutput?> output = kernelCompiler.compile(sdkRoot: '/path/to/sdkroot',
mainPath: '/foo/bar/fizz/main.dart',
buildMode: BuildMode.debug,
trackWidgetCreation: false,
dartDefines: const <String>[],
packageConfig: PackageConfig.empty,
packagesPath: '.packages',
buildDir: buildDir,
checkDartPluginRegistry: true,
);
stdoutHandler.compilerOutput?.complete(const CompilerOutput('', 0, <Uri>[]));
completer.complete();
await output;
});
testWithoutContext('KernelCompiler passes native assets', () async {
final BufferLogger logger = BufferLogger.test();
final StdoutHandler stdoutHandler = StdoutHandler(logger: logger, fileSystem: MemoryFileSystem.test());
final Completer<void> completer = Completer<void>();
final KernelCompiler kernelCompiler = KernelCompiler(
artifacts: Artifacts.test(),
fileSystem: MemoryFileSystem.test(),
fileSystemRoots: <String>[],
fileSystemScheme: '',
logger: logger,
processManager: FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: const <String>[
'Artifact.engineDartAotRuntime',
'--disable-dart-dev',
'Artifact.frontendServerSnapshotForEngineDartSdk',
'--sdk-root',
'/path/to/sdkroot/',
'--target=flutter',
'--no-print-incremental-dependencies',
'-Ddart.vm.profile=false',
'-Ddart.vm.product=false',
'--enable-asserts',
'--no-link-platform',
'--packages',
'.packages',
'--native-assets',
'path/to/native_assets.yaml',
'--verbosity=error',
'file:///path/to/main.dart',
], completer: completer),
]),
stdoutHandler: stdoutHandler,
);
final Future<CompilerOutput?> output = kernelCompiler.compile(
sdkRoot: '/path/to/sdkroot',
mainPath: '/path/to/main.dart',
buildMode: BuildMode.debug,
trackWidgetCreation: false,
dartDefines: const <String>[],
packageConfig: PackageConfig.empty,
packagesPath: '.packages',
nativeAssets: 'path/to/native_assets.yaml',
);
stdoutHandler.compilerOutput
?.complete(const CompilerOutput('', 0, <Uri>[]));
completer.complete();
expect((await output)?.outputFilename, '');
});
}
| flutter/packages/flutter_tools/test/general.shard/compile_batch_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/compile_batch_test.dart",
"repo_id": "flutter",
"token_count": 7669
} | 834 |
// Copyright 2014 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.
import 'dart:async';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/artifacts.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/build_system/build_system.dart';
import 'package:flutter_tools/src/build_system/build_targets.dart';
import 'package:flutter_tools/src/build_system/targets/localizations.dart';
import 'package:flutter_tools/src/dart/generate_synthetic_packages.dart';
import 'package:flutter_tools/src/isolated/build_targets.dart';
import '../../src/common.dart';
import '../../src/fake_process_manager.dart';
import '../../src/test_build_system.dart';
void main() {
testWithoutContext('calls buildSystem.build with blank l10n.yaml file', () async {
// Project directory setup for gen_l10n logic
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
// Add generate:true to pubspec.yaml.
final File pubspecFile = fileSystem.file('pubspec.yaml')..createSync();
final String content = pubspecFile.readAsStringSync().replaceFirst(
'\nflutter:\n',
'\nflutter:\n generate: true\n',
);
pubspecFile.writeAsStringSync(content);
// Create an l10n.yaml file
fileSystem.file('l10n.yaml').createSync();
final BufferLogger mockBufferLogger = BufferLogger.test();
final Artifacts artifacts = Artifacts.test();
final Environment environment = Environment.test(
fileSystem.currentDirectory,
fileSystem: fileSystem,
logger: mockBufferLogger,
artifacts: artifacts,
processManager: FakeProcessManager.any(),
);
final Completer<void> completer = Completer<void>();
final BuildResult exception = BuildResult(success: false, exceptions: <String, ExceptionMeasurement>{
'hello': ExceptionMeasurement('hello', const FormatException('illegal character in input string'), StackTrace.current),
});
final TestBuildSystem buildSystem = TestBuildSystem.all(exception, (Target target, Environment environment) {
expect(target, const GenerateLocalizationsTarget());
expect(environment, environment);
completer.complete();
});
await expectLater(
() => generateLocalizationsSyntheticPackage(
environment: environment,
buildSystem: buildSystem,
buildTargets: const BuildTargetsImpl(),
),
throwsToolExit(message:
'Generating synthetic localizations package failed with 1 error:'
'\n\n'
'FormatException: illegal character in input string',
),
);
await completer.future;
});
testWithoutContext('calls buildSystem.build with l10n.yaml synthetic-package: true', () async {
// Project directory setup for gen_l10n logic
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
// Add generate:true to pubspec.yaml.
final File pubspecFile = fileSystem.file('pubspec.yaml')..createSync();
final String content = pubspecFile.readAsStringSync().replaceFirst(
'\nflutter:\n',
'\nflutter:\n generate: true\n',
);
pubspecFile.writeAsStringSync(content);
// Create an l10n.yaml file
fileSystem.file('l10n.yaml').writeAsStringSync('synthetic-package: true');
final FakeProcessManager fakeProcessManager = FakeProcessManager.any();
final BufferLogger mockBufferLogger = BufferLogger.test();
final Artifacts artifacts = Artifacts.test();
final Environment environment = Environment.test(
fileSystem.currentDirectory,
fileSystem: fileSystem,
logger: mockBufferLogger,
artifacts: artifacts,
processManager: fakeProcessManager,
);
final Completer<void> completer = Completer<void>();
final BuildResult exception = BuildResult(success: false, exceptions: <String, ExceptionMeasurement>{
'hello': ExceptionMeasurement('hello', const FormatException('illegal character in input string'), StackTrace.current),
});
final TestBuildSystem buildSystem = TestBuildSystem.all(exception, (Target target, Environment environment) {
expect(target, const GenerateLocalizationsTarget());
expect(environment, environment);
completer.complete();
});
await expectLater(
() => generateLocalizationsSyntheticPackage(
environment: environment,
buildSystem: buildSystem,
buildTargets: const BuildTargetsImpl(),
),
throwsToolExit(message:
'Generating synthetic localizations package failed with 1 error:'
'\n\n'
'FormatException: illegal character in input string',
),
);
await completer.future;
});
testWithoutContext('calls buildSystem.build with l10n.yaml synthetic-package: null', () async {
// Project directory setup for gen_l10n logic
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
// Add generate:true to pubspec.yaml.
final File pubspecFile = fileSystem.file('pubspec.yaml')..createSync();
final String content = pubspecFile.readAsStringSync().replaceFirst(
'\nflutter:\n',
'\nflutter:\n generate: true\n',
);
pubspecFile.writeAsStringSync(content);
// Create an l10n.yaml file
fileSystem.file('l10n.yaml').writeAsStringSync('synthetic-package: null');
final BufferLogger mockBufferLogger = BufferLogger.test();
final Environment environment = Environment.test(
fileSystem.currentDirectory,
fileSystem: fileSystem,
logger: mockBufferLogger,
artifacts: Artifacts.test(),
processManager: FakeProcessManager.any(),
);
final Completer<void> completer = Completer<void>();
final BuildResult exception = BuildResult(success: false, exceptions: <String, ExceptionMeasurement>{
'hello': ExceptionMeasurement('hello', const FormatException('illegal character in input string'), StackTrace.current),
});
final TestBuildSystem buildSystem = TestBuildSystem.all(exception, (Target target, Environment environment) {
expect(target, const GenerateLocalizationsTarget());
expect(environment, environment);
completer.complete();
});
await expectLater(
() => generateLocalizationsSyntheticPackage(
environment: environment,
buildSystem: buildSystem,
buildTargets: const BuildTargetsImpl(),
),
throwsToolExit(message:
'Generating synthetic localizations package failed with 1 error:'
'\n\n'
'FormatException: illegal character in input string',
),
);
await completer.future;
});
testWithoutContext('does not call buildSystem.build when l10n.yaml is not present', () async {
// Project directory setup for gen_l10n logic
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
// Add generate:true to pubspec.yaml.
final File pubspecFile = fileSystem.file('pubspec.yaml')..createSync();
final String content = pubspecFile.readAsStringSync().replaceFirst(
'\nflutter:\n',
'\nflutter:\n generate: true\n',
);
pubspecFile.writeAsStringSync(content);
final BufferLogger mockBufferLogger = BufferLogger.test();
final Environment environment = Environment.test(
fileSystem.currentDirectory,
fileSystem: fileSystem,
logger: mockBufferLogger,
artifacts: Artifacts.test(),
processManager: FakeProcessManager.any(),
);
// Will throw if build is called.
final TestBuildSystem buildSystem = TestBuildSystem.all(null);
await generateLocalizationsSyntheticPackage(
environment: environment,
buildSystem: buildSystem,
buildTargets: const NoOpBuildTargets(),
);
});
testWithoutContext('does not call buildSystem.build with incorrect l10n.yaml format', () async {
// Project directory setup for gen_l10n logic
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
// Add generate:true to pubspec.yaml.
final File pubspecFile = fileSystem.file('pubspec.yaml')..createSync();
final String content = pubspecFile.readAsStringSync().replaceFirst(
'\nflutter:\n',
'\nflutter:\n generate: true\n',
);
pubspecFile.writeAsStringSync(content);
// Create an l10n.yaml file
fileSystem.file('l10n.yaml').writeAsStringSync('helloWorld');
final BufferLogger mockBufferLogger = BufferLogger.test();
final Environment environment = Environment.test(
fileSystem.currentDirectory,
fileSystem: fileSystem,
logger: mockBufferLogger,
artifacts: Artifacts.test(),
processManager: FakeProcessManager.any(),
);
// Will throw if build is called.
final TestBuildSystem buildSystem = TestBuildSystem.all(null);
await expectLater(
() => generateLocalizationsSyntheticPackage(
environment: environment,
buildSystem: buildSystem,
buildTargets: const NoOpBuildTargets(),
),
throwsToolExit(message: 'to contain a map, instead was helloWorld'),
);
});
testWithoutContext('does not call buildSystem.build with non-bool "synthetic-package" value', () async {
// Project directory setup for gen_l10n logic
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
// Add generate:true to pubspec.yaml.
final File pubspecFile = fileSystem.file('pubspec.yaml')..createSync();
final String content = pubspecFile.readAsStringSync().replaceFirst(
'\nflutter:\n',
'\nflutter:\n generate: true\n',
);
pubspecFile.writeAsStringSync(content);
// Create an l10n.yaml file
fileSystem.file('l10n.yaml').writeAsStringSync('synthetic-package: nonBoolValue');
final BufferLogger mockBufferLogger = BufferLogger.test();
final Environment environment = Environment.test(
fileSystem.currentDirectory,
fileSystem: fileSystem,
logger: mockBufferLogger,
artifacts: Artifacts.test(),
processManager: FakeProcessManager.any(),
);
// Will throw if build is called.
final TestBuildSystem buildSystem = TestBuildSystem.all(null);
await expectLater(
() => generateLocalizationsSyntheticPackage(
environment: environment,
buildSystem: buildSystem,
buildTargets: const NoOpBuildTargets(),
),
throwsToolExit(message: 'to have a bool value, instead was "nonBoolValue"'),
);
});
}
| flutter/packages/flutter_tools/test/general.shard/dart/generate_synthetic_packages_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/dart/generate_synthetic_packages_test.dart",
"repo_id": "flutter",
"token_count": 3536
} | 835 |
// Copyright 2014 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.
import 'package:file/file.dart';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/base/deferred_component.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/cache.dart';
import 'package:flutter_tools/src/flutter_manifest.dart';
import '../src/common.dart';
void main() {
late BufferLogger logger;
setUpAll(() {
Cache.flutterRoot = getFlutterRoot();
});
setUp(() {
logger = BufferLogger.test();
});
testWithoutContext('FlutterManifest is empty when the pubspec.yaml file is empty', () async {
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
'',
logger: logger,
)!;
expect(flutterManifest.isEmpty, true);
expect(flutterManifest.appName, '');
expect(flutterManifest.usesMaterialDesign, false);
expect(flutterManifest.fontsDescriptor, isEmpty);
expect(flutterManifest.fonts, isEmpty);
expect(flutterManifest.assets, isEmpty);
expect(flutterManifest.additionalLicenses, isEmpty);
});
testWithoutContext('FlutterManifest is null when the pubspec.yaml file is not a map', () async {
expect(FlutterManifest.createFromString(
'Not a map',
logger: logger,
), isNull);
expect(logger.errorText, contains('Expected YAML map'));
});
testWithoutContext('FlutterManifest has no fonts or assets when the "flutter" section is empty', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest, isNotNull);
expect(flutterManifest.isEmpty, false);
expect(flutterManifest.appName, 'test');
expect(flutterManifest.usesMaterialDesign, false);
expect(flutterManifest.fontsDescriptor, isEmpty);
expect(flutterManifest.fonts, isEmpty);
expect(flutterManifest.assets, isEmpty);
});
testWithoutContext('FlutterManifest knows if Material Design is used', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
uses-material-design: true
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.usesMaterialDesign, true);
});
testWithoutContext('FlutterManifest knows if generate is provided', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
generate: true
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.generateSyntheticPackage, true);
});
testWithoutContext('FlutterManifest can parse invalid generate key', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
generate: "invalid"
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.generateSyntheticPackage, false);
});
testWithoutContext('FlutterManifest knows if generate is disabled', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
generate: false
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.generateSyntheticPackage, false);
});
testWithoutContext('FlutterManifest has one font family with one asset', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
uses-material-design: true
fonts:
- family: foo
fonts:
- asset: a/bar
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.fonts, hasLength(1));
expect(flutterManifest.fonts.single, matchesFont(
familyName: 'foo',
descriptor: <String, Object>{
'family': 'foo',
'fonts': <Object>[
<String, Object>{'asset': 'a/bar'},
],
},
fontAssets: <Matcher>[
matchesFontAsset(assetUri: Uri.parse('a/bar')),
],
));
});
testWithoutContext('FlutterManifest has one font family with a simple asset '
'and one with weight', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
uses-material-design: true
fonts:
- family: foo
fonts:
- asset: a/bar
- asset: a/bar
weight: 400
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.fonts, hasLength(1));
expect(flutterManifest.fonts.single, matchesFont(
familyName: 'foo',
descriptor: <String, Object>{
'family': 'foo',
'fonts': <Object>[
<String, Object>{'asset': 'a/bar'},
<String, Object>{'weight': 400, 'asset': 'a/bar'},
],
},
fontAssets: <Matcher>[
matchesFontAsset(assetUri: Uri.parse('a/bar')),
matchesFontAsset(assetUri: Uri.parse('a/bar'), weight: 400),
])
);
});
testWithoutContext('FlutterManifest has one font family with a simple asset '
'and one with weight and style', () {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
uses-material-design: true
fonts:
- family: foo
fonts:
- asset: a/bar
- asset: a/bar
weight: 400
style: italic
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.fonts, hasLength(1));
expect(flutterManifest.fonts.single, matchesFont(
familyName: 'foo',
descriptor: <String, Object>{
'family': 'foo',
'fonts': <Object>[
<String, Object>{'asset': 'a/bar'},
<String, Object>{'weight': 400, 'style': 'italic', 'asset': 'a/bar'},
],
},
fontAssets: <Matcher>[
matchesFontAsset(assetUri: Uri.parse('a/bar')),
matchesFontAsset(assetUri: Uri.parse('a/bar'), weight: 400, style: 'italic'),
],
));
});
testWithoutContext('FlutterManifest has two font families, each with one '
'simple asset and one with weight and style', () {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
uses-material-design: true
fonts:
- family: foo
fonts:
- asset: a/bar
- asset: a/bar
weight: 400
style: italic
- family: bar
fonts:
- asset: a/baz
- weight: 400
asset: a/baz
style: italic
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.fonts, hasLength(2));
expect(flutterManifest.fonts, containsAll(<Matcher>[
matchesFont(
familyName: 'foo',
descriptor: <String, Object>{
'family': 'foo',
'fonts': <Object>[
<String, Object>{'asset': 'a/bar'},
<String, Object>{'weight': 400, 'style': 'italic', 'asset': 'a/bar'},
],
},
fontAssets: <Matcher>[
matchesFontAsset(assetUri: Uri.parse('a/bar')),
matchesFontAsset(assetUri: Uri.parse('a/bar'), weight: 400, style: 'italic'),
],
),
matchesFont(
familyName: 'bar',
descriptor: <String, Object>{
'family': 'bar',
'fonts': <Object>[
<String, Object>{'asset': 'a/baz'},
<String, Object>{'weight': 400, 'style': 'italic', 'asset': 'a/baz'},
],
},
fontAssets: <Matcher>[
matchesFontAsset(assetUri: Uri.parse('a/baz')),
matchesFontAsset(assetUri: Uri.parse('a/baz'), weight: 400, style: 'italic'),
],
),
]));
});
testWithoutContext('FlutterManifest.fontsDescriptor combines descriptors from '
'individual fonts', () {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
uses-material-design: true
fonts:
- family: foo
fonts:
- asset: a/bar
- asset: a/bar
weight: 400
style: italic
- family: bar
fonts:
- asset: a/baz
- weight: 400
asset: a/baz
style: italic
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.fontsDescriptor, <Object>[
<String, Object>{
'family': 'foo',
'fonts': <Object>[
<String, Object>{'asset': 'a/bar'},
<String, Object>{'weight': 400, 'style': 'italic', 'asset': 'a/bar'},
],
},
<String, Object>{
'family': 'bar',
'fonts': <Object>[
<String, Object>{'asset': 'a/baz'},
<String, Object>{'weight': 400, 'style': 'italic', 'asset': 'a/baz'},
],
},
]);
});
testWithoutContext('FlutterManifest has only one of two font families when '
'one declaration is missing the "family" option', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
uses-material-design: true
fonts:
- family: foo
fonts:
- asset: a/bar
- asset: a/bar
weight: 400
style: italic
- fonts:
- asset: a/baz
- asset: a/baz
weight: 400
style: italic
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.fonts, hasLength(1));
expect(flutterManifest.fonts, containsAll(<Matcher>[
matchesFont(
familyName: 'foo',
descriptor: <String, Object>{
'family': 'foo',
'fonts': <Object>[
<String, Object>{'asset': 'a/bar'},
<String, Object>{'weight': 400, 'style': 'italic', 'asset': 'a/bar'},
],
},
fontAssets: <Matcher>[
matchesFontAsset(assetUri: Uri.parse('a/bar')),
matchesFontAsset(assetUri: Uri.parse('a/bar'), weight: 400, style: 'italic'),
],
),
]));
});
testWithoutContext('FlutterManifest has only one of two font families when '
'one declaration is missing the "fonts" option', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
uses-material-design: true
fonts:
- family: foo
fonts:
- asset: a/bar
- asset: a/bar
weight: 400
style: italic
- family: bar
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.fonts, hasLength(1));
expect(flutterManifest.fonts, containsAll(<Matcher>[
matchesFont(
familyName: 'foo',
descriptor: <String, Object>{
'family': 'foo',
'fonts': <Object>[
<String, Object>{'asset': 'a/bar'},
<String, Object>{'weight': 400, 'style': 'italic', 'asset': 'a/bar'},
],
},
fontAssets: <Matcher>[
matchesFontAsset(assetUri: Uri.parse('a/bar')),
matchesFontAsset(assetUri: Uri.parse('a/bar'), weight: 400, style: 'italic'),
],
),
]));
});
testWithoutContext('FlutterManifest has no font family when declaration is '
'missing the "asset" option', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
uses-material-design: true
fonts:
- family: foo
fonts:
- weight: 400
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.fontsDescriptor, isEmpty);
expect(flutterManifest.fonts, isEmpty);
});
testWithoutContext('FlutterManifest allows a blank flutter section', () {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.isEmpty, false);
expect(flutterManifest.isModule, false);
expect(flutterManifest.isPlugin, false);
expect(flutterManifest.androidPackage, null);
expect(flutterManifest.usesAndroidX, false);
});
testWithoutContext('FlutterManifest allows a module declaration', () {
const String manifest = '''
name: test
flutter:
module:
androidPackage: com.example
androidX: true
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.isModule, true);
expect(flutterManifest.androidPackage, 'com.example');
expect(flutterManifest.usesAndroidX, true);
});
testWithoutContext('FlutterManifest allows a legacy plugin declaration', () {
const String manifest = '''
name: test
flutter:
plugin:
androidPackage: com.example
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.isPlugin, true);
expect(flutterManifest.androidPackage, 'com.example');
});
testWithoutContext('FlutterManifest allows a multi-plat plugin declaration '
'with android only', () {
const String manifest = '''
name: test
flutter:
plugin:
platforms:
android:
package: com.example
pluginClass: TestPlugin
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.isPlugin, true);
expect(flutterManifest.androidPackage, 'com.example');
});
testWithoutContext('FlutterManifest allows a multi-plat plugin declaration '
'with ios only', () {
const String manifest = '''
name: test
flutter:
plugin:
platforms:
ios:
pluginClass: HelloPlugin
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.isPlugin, true);
expect(flutterManifest.androidPackage, isNull);
});
testWithoutContext('FlutterManifest handles an invalid plugin declaration', () {
const String manifest = '''
name: test
flutter:
plugin:
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText,
contains('Expected "plugin" to be an object, but got null'));
});
testWithoutContext('FlutterManifest parses major.minor.patch+build version clause 1', () {
const String manifest = '''
name: test
version: 1.0.0+2
dependencies:
flutter:
sdk: flutter
flutter:
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, matchesManifest(
appVersion: '1.0.0+2',
buildName: '1.0.0',
buildNumber: '2',
));
});
testWithoutContext('FlutterManifest parses major.minor.patch with no build version', () {
const String manifest = '''
name: test
version: 0.0.1
dependencies:
flutter:
sdk: flutter
flutter:
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, matchesManifest(
appVersion: '0.0.1',
buildName: '0.0.1',
));
});
testWithoutContext('FlutterManifest parses major.minor.patch+build version clause 2', () {
const String manifest = '''
name: test
version: 1.0.0-beta+exp.sha.5114f85
dependencies:
flutter:
sdk: flutter
flutter:
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, matchesManifest(
appVersion: '1.0.0-beta+exp.sha.5114f85',
buildName: '1.0.0-beta',
buildNumber: 'exp.sha.5114f85',
));
});
testWithoutContext('FlutterManifest parses major.minor+build version clause', () {
const String manifest = '''
name: test
version: 1.0.0+2
dependencies:
flutter:
sdk: flutter
flutter:
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, matchesManifest(
appVersion: '1.0.0+2',
buildName: '1.0.0',
buildNumber: '2',
));
});
testWithoutContext('FlutterManifest parses empty version clause', () {
const String manifest = '''
name: test
version:
dependencies:
flutter:
sdk: flutter
flutter:
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, matchesManifest());
});
testWithoutContext('FlutterManifest parses no version clause', () {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, matchesManifest());
});
// Regression test for https://github.com/flutter/flutter/issues/31764
testWithoutContext('FlutterManifest returns proper error when font detail is malformed', () {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
fonts:
- family: foo
fonts:
-asset: a/bar
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText,
contains('Expected "fonts" to either be null or a list.'));
});
testWithoutContext('FlutterManifest ignores empty list of fonts', () {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
fonts: []
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, isNotNull);
expect(flutterManifest!.fonts.length, 0);
});
testWithoutContext('FlutterManifest returns proper error when font detail is '
'not a list of maps', () {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
fonts:
- family: foo
fonts:
- asset
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText,
contains('Expected "fonts" to be a list of maps.'));
});
testWithoutContext('FlutterManifest returns proper error when font is a map '
'instead of a list', () {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
fonts:
family: foo
fonts:
-asset: a/bar
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText, contains('Expected "fonts" to be a list'));
});
testWithoutContext('FlutterManifest returns proper error when second font '
'family is invalid', () {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
uses-material-design: true
fonts:
- family: foo
fonts:
- asset: a/bar
- string
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText, contains('Expected a map.'));
});
testWithoutContext('FlutterManifest returns proper error when flutter is a '
'list instead of a map', () {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
- uses-material-design: true
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText,
contains(
'Expected "flutter" section to be an object or null, but got '
'[{uses-material-design: true}].',
),
);
});
testWithoutContext('FlutterManifest can parse manifest on posix filesystem', () {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
''';
final FileSystem fileSystem = MemoryFileSystem.test();
fileSystem.file('pubspec.yaml').writeAsStringSync(manifest);
final FlutterManifest flutterManifest = FlutterManifest.createFromPath(
'pubspec.yaml',
fileSystem: fileSystem,
logger: logger,
)!;
expect(flutterManifest.isEmpty, false);
});
testWithoutContext('FlutterManifest can parse manifest on windows filesystem', () {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
''';
final FileSystem fileSystem = MemoryFileSystem.test(style: FileSystemStyle.windows);
fileSystem.file('pubspec.yaml').writeAsStringSync(manifest);
final FlutterManifest flutterManifest = FlutterManifest.createFromPath(
'pubspec.yaml',
fileSystem: fileSystem,
logger: logger,
)!;
expect(flutterManifest.isEmpty, false);
});
testWithoutContext('FlutterManifest getSupportedPlatforms return null if runs on legacy format', () {
const String manifest = '''
name: test
flutter:
plugin:
androidPackage: com.example
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.isPlugin, true);
expect(flutterManifest.supportedPlatforms, null);
});
testWithoutContext('FlutterManifest validSupportedPlatforms return null if the platform keys are not valid', () {
const String manifest = '''
name: test
flutter:
plugin:
platforms:
some_platform:
pluginClass: SomeClass
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.isPlugin, true);
expect(flutterManifest.validSupportedPlatforms, null);
});
testWithoutContext('FlutterManifest validSupportedPlatforms only returns valid platforms', () {
const String manifest = '''
name: test
flutter:
plugin:
platforms:
some_platform:
pluginClass: SomeClass
ios:
pluginClass: SomeClass
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.isPlugin, true);
final Map<String, dynamic> validSupportedPlatforms = flutterManifest.validSupportedPlatforms!;
expect(validSupportedPlatforms['ios'],
<String, dynamic>{'pluginClass': 'SomeClass'});
expect(validSupportedPlatforms['some_platform'],
isNull);
});
testWithoutContext('FlutterManifest getSupportedPlatforms returns valid platforms.', () {
const String manifest = '''
name: test
flutter:
plugin:
platforms:
android:
package: com.example
pluginClass: SomeClass
ios:
pluginClass: SomeClass
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.isPlugin, true);
final Map<String, dynamic> validSupportedPlatforms = flutterManifest.validSupportedPlatforms!;
expect(validSupportedPlatforms['ios'], <String, dynamic>{'pluginClass': 'SomeClass'});
expect(validSupportedPlatforms['android'], <String, dynamic>{
'pluginClass': 'SomeClass',
'package': 'com.example',
});
});
testWithoutContext('FlutterManifest validates a platform section that is a list '
'instead of a map', () {
const String manifest = '''
name: test
flutter:
plugin:
platforms:
- android
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText,
contains('flutter.plugin.platforms should be a map with the platform name as the key'));
});
testWithoutContext('FlutterManifest validates plugin format not support.', () {
const String manifest = '''
name: test
flutter:
plugin:
android:
package: com.example
pluginClass: SomeClass
ios:
pluginClass: SomeClass
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText,
contains('Cannot find the `flutter.plugin.platforms` key in the `pubspec.yaml` file. '));
});
testWithoutContext('FlutterManifest handles empty licenses list', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
licenses: []
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, isNotNull);
expect(flutterManifest!.additionalLicenses.length, 0);
});
testWithoutContext('FlutterManifest can specify additional LICENSE files', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
licenses:
- foo.txt
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest.additionalLicenses, <String>['foo.txt']);
});
testWithoutContext('FlutterManifest can validate incorrect licenses key', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
licenses: foo.txt
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText, 'Expected "licenses" to be a list of files, but got foo.txt (String).\n');
});
testWithoutContext('FlutterManifest validates individual list items', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
licenses:
- foo.txt
- bar: fizz
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText, 'Expected "licenses" to be a list of files, but '
'element at index 1 was a YamlMap.\n');
});
testWithoutContext('FlutterManifest parses single deferred components', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
deferred-components:
- name: component1
libraries:
- lib1
assets:
- path/to/asset.jpg
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest, isNotNull);
final List<DeferredComponent> deferredComponents = flutterManifest.deferredComponents!;
expect(deferredComponents.length, 1);
expect(deferredComponents[0].name, 'component1');
expect(deferredComponents[0].libraries.length, 1);
expect(deferredComponents[0].libraries[0], 'lib1');
expect(deferredComponents[0].assets.length, 1);
expect(deferredComponents[0].assets[0].uri.path, 'path/to/asset.jpg');
});
testWithoutContext('FlutterManifest parses multiple deferred components', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
deferred-components:
- name: component1
libraries:
- lib1
assets:
- path/to/asset.jpg
- name: component2
libraries:
- lib2
- lib3
assets:
- path/to/asset2.jpg
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest, isNotNull);
final List<DeferredComponent> deferredComponents = flutterManifest.deferredComponents!;
expect(deferredComponents.length, 2);
expect(deferredComponents[0].name, 'component1');
expect(deferredComponents[0].libraries.length, 1);
expect(deferredComponents[0].libraries[0], 'lib1');
expect(deferredComponents[0].assets.length, 1);
expect(deferredComponents[0].assets[0].uri.path, 'path/to/asset.jpg');
expect(deferredComponents[1].name, 'component2');
expect(deferredComponents[1].libraries.length, 2);
expect(deferredComponents[1].libraries[0], 'lib2');
expect(deferredComponents[1].libraries[1], 'lib3');
expect(deferredComponents[1].assets.length, 1);
expect(deferredComponents[1].assets[0].uri.path, 'path/to/asset2.jpg');
});
testWithoutContext('FlutterManifest parses empty deferred components', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
deferred-components:
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest, isNotNull);
expect(flutterManifest.deferredComponents!.length, 0);
});
testWithoutContext('FlutterManifest deferred component requires name', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
deferred-components:
- libraries:
- lib1
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText, 'Expected the 0 element in "deferred-components" to have required key "name" of type String\n');
});
testWithoutContext('FlutterManifest deferred component is list', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
deferred-components: blah
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText, 'Expected "deferred-components" to be a list, but got blah (String).\n');
});
testWithoutContext('FlutterManifest deferred component libraries is list', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
deferred-components:
- name: blah
libraries: blah
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText, 'Expected "libraries" key in the element at '
'index 0 of "deferred-components" to be a list of String, but '
'got blah (String).\n');
});
testWithoutContext('FlutterManifest deferred component libraries is string', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
deferred-components:
- name: blah
libraries:
- not-a-string:
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText, 'Expected "libraries" key in the element at '
'index 0 of "deferred-components" to be a list of String, but '
'element at index 0 was a YamlMap.\n');
});
testWithoutContext('FlutterManifest deferred component assets is string', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
deferred-components:
- name: blah
assets:
- not-a-string:
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText, 'Asset manifest entry is malformed. Expected asset entry to be either a string or a map containing a "path" entry. Got Null instead.\n');
});
testWithoutContext('FlutterManifest deferred component multiple assets is string', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
deferred-components:
- name: blah
assets:
- path/to/file.so
- also-not-a-string:
- woo
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText, 'Asset manifest entry is malformed. Expected asset entry to be either a string or a map containing a "path" entry. Got Null instead.\n');
});
testWithoutContext('FlutterManifest multiple deferred components assets is string', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
deferred-components:
- name: blah
assets:
- path/to/file.so
- name: blah2
assets:
- path/to/other/file.so
- not-a-string:
- woo
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText, 'Asset manifest entry is malformed. Expected asset entry to be either a string or a map containing a "path" entry. Got Null instead.\n');
});
testWithoutContext('FlutterManifest deferred component assets is list', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
deferred-components:
- name: blah
assets: blah
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
);
expect(flutterManifest, null);
expect(logger.errorText, 'Expected "assets" to be a list, but got blah (String).\n');
});
testWithoutContext('FlutterManifest parses asset-only deferred components', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
deferred-components:
- name: component1
assets:
- path/to/asset1.jpg
- path/to/asset2.jpg
- path/to/asset3.jpg
''';
final FlutterManifest flutterManifest = FlutterManifest.createFromString(
manifest,
logger: logger,
)!;
expect(flutterManifest, isNotNull);
final List<DeferredComponent> deferredComponents = flutterManifest.deferredComponents!;
expect(deferredComponents.length, 1);
expect(deferredComponents[0].name, 'component1');
expect(deferredComponents[0].libraries.length, 0);
expect(deferredComponents[0].assets.length, 3);
expect(deferredComponents[0].assets[0].uri.path, 'path/to/asset1.jpg');
expect(deferredComponents[0].assets[1].uri.path, 'path/to/asset2.jpg');
expect(deferredComponents[0].assets[2].uri.path, 'path/to/asset3.jpg');
});
testWithoutContext('FlutterManifest can parse empty dependencies', () async {
const String manifest = '''
name: test
''';
final FlutterManifest? flutterManifest = FlutterManifest.createFromString(
manifest,
logger: BufferLogger.test(),
);
expect(flutterManifest, isNotNull);
expect(flutterManifest!.dependencies, isEmpty);
});
}
Matcher matchesManifest({
String? appVersion,
String? buildName,
String? buildNumber,
}) {
return isA<FlutterManifest>()
.having((FlutterManifest manifest) => manifest.appVersion, 'appVersion', appVersion)
.having((FlutterManifest manifest) => manifest.buildName, 'buildName', buildName)
.having((FlutterManifest manifest) => manifest.buildNumber, 'buildNumber', buildNumber);
}
Matcher matchesFontAsset({
required Uri assetUri,
int? weight,
String? style,
}) {
return isA<FontAsset>()
.having((FontAsset fontAsset) => fontAsset.assetUri, 'assetUri', assetUri)
.having((FontAsset fontAsset) => fontAsset.weight, 'weight', weight)
.having((FontAsset fontAsset) => fontAsset.style, 'style', style);
}
Matcher matchesFont({
required Map<String, Object> descriptor,
required String familyName,
required List<Matcher> fontAssets,
}) {
return isA<Font>()
.having((Font font) => font.descriptor, 'descriptor', descriptor)
.having((Font font) => font.familyName, 'familyName', familyName)
.having((Font font) => font.fontAssets, 'fontAssets', containsAll(fontAssets));
}
| flutter/packages/flutter_tools/test/general.shard/flutter_manifest_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/flutter_manifest_test.dart",
"repo_id": "flutter",
"token_count": 14337
} | 836 |
// Copyright 2014 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.
import 'dart:convert';
import 'package:archive/archive.dart';
import 'package:file/file.dart';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/doctor_validator.dart';
import 'package:flutter_tools/src/intellij/intellij.dart';
import '../../src/common.dart';
void main() {
late FileSystem fileSystem;
void writeFileCreatingDirectories(String path, List<int> bytes) {
final File file = fileSystem.file(path);
file.parent.createSync(recursive: true);
file.writeAsBytesSync(bytes);
}
setUp(() {
fileSystem = MemoryFileSystem.test();
});
testWithoutContext('IntelliJPlugins found', () async {
final IntelliJPlugins plugins = IntelliJPlugins(_kPluginsPath, fileSystem: fileSystem);
final Archive dartJarArchive =
buildSingleFileArchive('META-INF/plugin.xml', r'''
<idea-plugin version="2">
<name>Dart</name>
<version>162.2485</version>
</idea-plugin>
''');
writeFileCreatingDirectories(
fileSystem.path.join(_kPluginsPath, 'Dart', 'lib', 'Dart.jar'),
ZipEncoder().encode(dartJarArchive)!,
);
final Archive flutterJarArchive = buildSingleFileArchive('META-INF/plugin.xml', r'''
<idea-plugin version="2">
<name>Flutter</name>
<version>0.1.3</version>
</idea-plugin>
''');
writeFileCreatingDirectories(
fileSystem.path.join(_kPluginsPath, 'flutter-intellij.jar'),
ZipEncoder().encode(flutterJarArchive)!,
);
final List<ValidationMessage> messages = <ValidationMessage>[];
plugins.validatePackage(messages, <String>['Dart'], 'Dart', 'download-Dart');
plugins.validatePackage(messages,
<String>['flutter-intellij', 'flutter-intellij.jar'], 'Flutter', 'download-Flutter',
minVersion: IntelliJPlugins.kMinFlutterPluginVersion,
);
ValidationMessage message = messages
.firstWhere((ValidationMessage m) => m.message.startsWith('Dart '));
expect(message.message, 'Dart plugin version 162.2485');
message = messages.firstWhere(
(ValidationMessage m) => m.message.startsWith('Flutter '));
expect(message.message, contains('Flutter plugin version 0.1.3'));
expect(message.message, contains('recommended minimum version'));
});
testWithoutContext('IntelliJPlugins can read the package version of the flutter-intellij 50.0+/IntelliJ 2020.2+ layout', () async {
final IntelliJPlugins plugins = IntelliJPlugins(_kPluginsPath, fileSystem: fileSystem);
final Archive flutterIdeaJarArchive = buildSingleFileArchive('META-INF/plugin.xml', r'''
<idea-plugin version="2">
<name>Flutter</name>
<version>50.0</version>
</idea-plugin>
''');
writeFileCreatingDirectories(
fileSystem.path.join(_kPluginsPath, 'flutter-intellij', 'lib', 'flutter-idea-50.0.jar'),
ZipEncoder().encode(flutterIdeaJarArchive)!,
);
final Archive flutterIntellijJarArchive = buildSingleFileArchive('META-INF/MANIFEST.MF', r'''
Manifest-Version: 1.0
''');
writeFileCreatingDirectories(
fileSystem.path.join(_kPluginsPath, 'flutter-intellij', 'lib', 'flutter-intellij-50.0.jar'),
ZipEncoder().encode(flutterIntellijJarArchive)!,
);
final List<ValidationMessage> messages = <ValidationMessage>[];
plugins.validatePackage(messages,
<String>[
'flutter-intellij',
'flutter-intellij.jar',
],
'Flutter', 'download-Flutter',
minVersion: IntelliJPlugins.kMinFlutterPluginVersion,
);
final ValidationMessage message = messages.firstWhere(
(ValidationMessage m) => m.message.startsWith('Flutter '));
expect(message.message, contains('Flutter plugin version 50.0'));
});
testWithoutContext('IntelliJPlugins can read the package version of the flutter-intellij 50.0+/IntelliJ 2020.2+ layout(priority is given to packages with the same prefix as packageName)', () async {
final IntelliJPlugins plugins = IntelliJPlugins(_kPluginsPath, fileSystem: fileSystem);
final Archive flutterIdeaJarArchive = buildSingleFileArchive('META-INF/plugin.xml', r'''
<idea-plugin version="2">
<name>Flutter</name>
<version>50.0</version>
</idea-plugin>
''');
writeFileCreatingDirectories(
fileSystem.path.join(_kPluginsPath, 'flutter-intellij', 'lib', 'flutter-idea-50.0.jar'),
ZipEncoder().encode(flutterIdeaJarArchive)!,
);
final Archive flutterIntellijJarArchive = buildSingleFileArchive('META-INF/plugin.xml', r'''
<idea-plugin version="2">
<name>Flutter</name>
<version>51.0</version>
</idea-plugin>
''');
writeFileCreatingDirectories(
fileSystem.path.join(_kPluginsPath, 'flutter-intellij', 'lib', 'flutter-intellij-50.0.jar'),
ZipEncoder().encode(flutterIntellijJarArchive)!,
);
final List<ValidationMessage> messages = <ValidationMessage>[];
plugins.validatePackage(messages,
<String>[
'flutter-intellij',
'flutter-intellij.jar',
],
'Flutter', 'download-Flutter',
minVersion: IntelliJPlugins.kMinFlutterPluginVersion,
);
final ValidationMessage message = messages.firstWhere(
(ValidationMessage m) => m.message.startsWith('Flutter '));
expect(message.message, contains('Flutter plugin version 51.0'));
});
testWithoutContext('IntelliJPlugins not found displays a link to their download site', () async {
final IntelliJPlugins plugins = IntelliJPlugins(_kPluginsPath, fileSystem: fileSystem);
final List<ValidationMessage> messages = <ValidationMessage>[];
plugins.validatePackage(messages, <String>['Dart'], 'Dart', 'download-Dart');
plugins.validatePackage(messages,
<String>['flutter-intellij', 'flutter-intellij.jar'], 'Flutter', 'download-Flutter',
minVersion: IntelliJPlugins.kMinFlutterPluginVersion,
);
ValidationMessage message = messages
.firstWhere((ValidationMessage m) => m.message.startsWith('Dart '));
expect(message.message, contains('Dart plugin can be installed from'));
expect(message.contextUrl, isNotNull);
message = messages.firstWhere(
(ValidationMessage m) => m.message.startsWith('Flutter '));
expect(message.message, contains('Flutter plugin can be installed from'));
expect(message.contextUrl, isNotNull);
});
testWithoutContext('IntelliJPlugins does not crash if no plugin file found', () async {
final IntelliJPlugins plugins = IntelliJPlugins(_kPluginsPath, fileSystem: fileSystem);
final Archive dartJarArchive =
buildSingleFileArchive('META-INF/MANIFEST.MF', r'''
Manifest-Version: 1.0
''');
writeFileCreatingDirectories(
fileSystem.path.join(_kPluginsPath, 'Dart', 'lib', 'Other.jar'),
ZipEncoder().encode(dartJarArchive)!,
);
expect(
() => plugins.validatePackage(<ValidationMessage>[], <String>['Dart'], 'Dart', 'download-Dart'),
returnsNormally,
);
});
}
const String _kPluginsPath = '/data/intellij/plugins';
Archive buildSingleFileArchive(String path, String content) {
final Archive archive = Archive();
final List<int> bytes = utf8.encode(content);
archive.addFile(ArchiveFile(path, bytes.length, bytes));
return archive;
}
| flutter/packages/flutter_tools/test/general.shard/intellij/intellij_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/intellij/intellij_test.dart",
"repo_id": "flutter",
"token_count": 2641
} | 837 |
// Copyright 2014 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.
import 'dart:io' as io;
import 'package:file/memory.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/io.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/base/version.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/ios/xcode_debug.dart';
import 'package:flutter_tools/src/ios/xcodeproj.dart';
import 'package:flutter_tools/src/macos/xcode.dart';
import 'package:test/fake.dart';
import '../../src/common.dart';
import '../../src/context.dart';
import '../../src/fake_process_manager.dart';
void main() {
group('Debug project through Xcode', () {
late MemoryFileSystem fileSystem;
late BufferLogger logger;
late FakeProcessManager fakeProcessManager;
const String flutterRoot = '/path/to/flutter';
const String pathToXcodeAutomationScript = '$flutterRoot/packages/flutter_tools/bin/xcode_debug.js';
setUp(() {
fileSystem = MemoryFileSystem.test();
logger = BufferLogger.test();
fakeProcessManager = FakeProcessManager.empty();
});
group('debugApp', () {
const String pathToXcodeApp = '/Applications/Xcode.app';
const String deviceId = '0000001234';
late Xcode xcode;
late Directory xcodeproj;
late Directory xcworkspace;
late XcodeDebugProject project;
setUp(() {
xcode = setupXcode(
fakeProcessManager: fakeProcessManager,
fileSystem: fileSystem,
flutterRoot: flutterRoot,
);
xcodeproj = fileSystem.directory('Runner.xcodeproj');
xcworkspace = fileSystem.directory('Runner.xcworkspace');
project = XcodeDebugProject(
scheme: 'Runner',
xcodeProject: xcodeproj,
xcodeWorkspace: xcworkspace,
hostAppProjectName: 'Runner',
);
});
testWithoutContext('succeeds in opening and debugging with launch options, expectedConfigurationBuildDir, and verbose logging', () async {
fakeProcessManager.addCommands(<FakeCommand>[
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'check-workspace-opened',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
'--verbose',
],
stdout: '''
{"status":false,"errorMessage":"Xcode is not running","debugResult":null}
''',
),
FakeCommand(
command: <String>[
'open',
'-a',
pathToXcodeApp,
'-g',
'-j',
'-F',
xcworkspace.path
],
),
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'debug',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
'--project-name',
project.hostAppProjectName,
'--expected-configuration-build-dir',
'/build/ios/iphoneos',
'--device-id',
deviceId,
'--scheme',
project.scheme,
'--skip-building',
'--launch-args',
r'["--enable-dart-profiling","--trace-allowlist=\"foo,bar\""]',
'--verbose',
],
stdout: '''
{"status":true,"errorMessage":null,"debugResult":{"completed":false,"status":"running","errorMessage":null}}
''',
),
]);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
project = XcodeDebugProject(
scheme: 'Runner',
xcodeProject: xcodeproj,
xcodeWorkspace: xcworkspace,
hostAppProjectName: 'Runner',
expectedConfigurationBuildDir: '/build/ios/iphoneos',
verboseLogging: true,
);
final bool status = await xcodeDebug.debugApp(
project: project,
deviceId: deviceId,
launchArguments: <String>[
'--enable-dart-profiling',
'--trace-allowlist="foo,bar"'
],
);
expect(logger.errorText, isEmpty);
expect(logger.traceText, contains('Error checking if project opened in Xcode'));
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(xcodeDebug.startDebugActionProcess, isNull);
expect(status, true);
});
testWithoutContext('succeeds in opening and debugging without launch options, expectedConfigurationBuildDir, and verbose logging', () async {
fakeProcessManager.addCommands(<FakeCommand>[
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'check-workspace-opened',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
],
stdout: '''
{"status":false,"errorMessage":"Xcode is not running","debugResult":null}
''',
),
FakeCommand(
command: <String>[
'open',
'-a',
pathToXcodeApp,
'-g',
'-j',
'-F',
xcworkspace.path
],
),
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'debug',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
'--project-name',
project.hostAppProjectName,
'--device-id',
deviceId,
'--scheme',
project.scheme,
'--skip-building',
'--launch-args',
'[]'
],
stdout: '''
{"status":true,"errorMessage":null,"debugResult":{"completed":false,"status":"running","errorMessage":null}}
''',
),
]);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
final bool status = await xcodeDebug.debugApp(
project: project,
deviceId: deviceId,
launchArguments: <String>[],
);
expect(logger.errorText, isEmpty);
expect(logger.traceText, contains('Error checking if project opened in Xcode'));
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(xcodeDebug.startDebugActionProcess, isNull);
expect(status, true);
});
testWithoutContext('fails if project fails to open', () async {
fakeProcessManager.addCommands(<FakeCommand>[
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'check-workspace-opened',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
],
stdout: '''
{"status":false,"errorMessage":"Xcode is not running","debugResult":null}
''',
),
FakeCommand(
command: <String>[
'open',
'-a',
pathToXcodeApp,
'-g',
'-j',
'-F',
xcworkspace.path
],
exception: ProcessException(
'open',
<String>[
'-a',
'/non_existent_path',
'-g',
'-j',
'-F',
xcworkspace.path,
],
'The application /non_existent_path cannot be opened for an unexpected reason',
),
),
]);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
final bool status = await xcodeDebug.debugApp(
project: project,
deviceId: deviceId,
launchArguments: <String>[
'--enable-dart-profiling',
'--trace-allowlist="foo,bar"',
],
);
expect(
logger.errorText,
contains('The application /non_existent_path cannot be opened for an unexpected reason'),
);
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(status, false);
});
testWithoutContext('fails if osascript errors', () async {
fakeProcessManager.addCommands(<FakeCommand>[
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'check-workspace-opened',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
],
stdout: '''
{"status":true,"errorMessage":"","debugResult":null}
''',
),
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'debug',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
'--project-name',
project.hostAppProjectName,
'--device-id',
deviceId,
'--scheme',
project.scheme,
'--skip-building',
'--launch-args',
r'["--enable-dart-profiling","--trace-allowlist=\"foo,bar\""]'
],
exitCode: 1,
stderr: "/flutter/packages/flutter_tools/bin/xcode_debug.js: execution error: Error: ReferenceError: Can't find variable: y (-2700)",
),
]);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
final bool status = await xcodeDebug.debugApp(
project: project,
deviceId: deviceId,
launchArguments: <String>[
'--enable-dart-profiling',
'--trace-allowlist="foo,bar"',
],
);
expect(logger.errorText, contains('Error executing osascript'));
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(status, false);
});
testWithoutContext('fails if osascript output returns false status', () async {
fakeProcessManager.addCommands(<FakeCommand>[
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'check-workspace-opened',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
],
stdout: '''
{"status":true,"errorMessage":null,"debugResult":null}
''',
),
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'debug',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
'--project-name',
project.hostAppProjectName,
'--device-id',
deviceId,
'--scheme',
project.scheme,
'--skip-building',
'--launch-args',
r'["--enable-dart-profiling","--trace-allowlist=\"foo,bar\""]'
],
stdout: '''
{"status":false,"errorMessage":"Unable to find target device.","debugResult":null}
''',
),
]);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
final bool status = await xcodeDebug.debugApp(
project: project,
deviceId: deviceId,
launchArguments: <String>[
'--enable-dart-profiling',
'--trace-allowlist="foo,bar"',
],
);
expect(
logger.errorText,
contains('Error starting debug session in Xcode'),
);
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(status, false);
});
testWithoutContext('fails if missing debug results', () async {
fakeProcessManager.addCommands(<FakeCommand>[
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'check-workspace-opened',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
],
stdout: '''
{"status":true,"errorMessage":null,"debugResult":null}
''',
),
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'debug',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
'--project-name',
project.hostAppProjectName,
'--device-id',
deviceId,
'--scheme',
project.scheme,
'--skip-building',
'--launch-args',
r'["--enable-dart-profiling","--trace-allowlist=\"foo,bar\""]'
],
stdout: '''
{"status":true,"errorMessage":null,"debugResult":null}
''',
),
]);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
final bool status = await xcodeDebug.debugApp(
project: project,
deviceId: deviceId,
launchArguments: <String>[
'--enable-dart-profiling',
'--trace-allowlist="foo,bar"'
],
);
expect(
logger.errorText,
contains('Unable to get debug results from response'),
);
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(status, false);
});
testWithoutContext('fails if debug results status is not running', () async {
fakeProcessManager.addCommands(<FakeCommand>[
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'check-workspace-opened',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
],
stdout: '''
{"status":true,"errorMessage":null,"debugResult":null}
''',
),
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'debug',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
'--project-name',
project.hostAppProjectName,
'--device-id',
deviceId,
'--scheme',
project.scheme,
'--skip-building',
'--launch-args',
r'["--enable-dart-profiling","--trace-allowlist=\"foo,bar\""]'
],
stdout: '''
{"status":true,"errorMessage":null,"debugResult":{"completed":false,"status":"not yet started","errorMessage":null}}
''',
),
]);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
final bool status = await xcodeDebug.debugApp(
project: project,
deviceId: deviceId,
launchArguments: <String>[
'--enable-dart-profiling',
'--trace-allowlist="foo,bar"',
],
);
expect(logger.errorText, contains('Unexpected debug results'));
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(status, false);
});
});
group('parse script response', () {
testWithoutContext('fails if osascript output returns non-json output', () async {
final Xcode xcode = setupXcode(
fakeProcessManager: FakeProcessManager.any(),
fileSystem: fileSystem,
flutterRoot: flutterRoot,
);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
final XcodeAutomationScriptResponse? response = xcodeDebug.parseScriptResponse('not json');
expect(
logger.errorText,
contains('osascript returned non-JSON response'),
);
expect(response, isNull);
});
testWithoutContext('fails if osascript output returns unexpected json', () async {
final Xcode xcode = setupXcode(
fakeProcessManager: FakeProcessManager.any(),
fileSystem: fileSystem,
flutterRoot: flutterRoot,
);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
final XcodeAutomationScriptResponse? response = xcodeDebug.parseScriptResponse('[]');
expect(
logger.errorText,
contains('osascript returned unexpected JSON response'),
);
expect(response, isNull);
});
testWithoutContext('fails if osascript output is missing status field', () async {
final Xcode xcode = setupXcode(
fakeProcessManager: FakeProcessManager.any(),
fileSystem: fileSystem,
flutterRoot: flutterRoot,
);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
final XcodeAutomationScriptResponse? response = xcodeDebug.parseScriptResponse('{}');
expect(
logger.errorText,
contains('osascript returned unexpected JSON response'),
);
expect(response, isNull);
});
});
group('exit', () {
const String pathToXcodeApp = '/Applications/Xcode.app';
late Directory projectDirectory;
late Directory xcodeproj;
late Directory xcworkspace;
setUp(() {
projectDirectory = fileSystem.directory('FlutterApp');
xcodeproj = projectDirectory.childDirectory('Runner.xcodeproj');
xcworkspace = projectDirectory.childDirectory('Runner.xcworkspace');
});
testWithoutContext('exits when waiting for debug session to start', () async {
final Xcode xcode = setupXcode(
fakeProcessManager: fakeProcessManager,
fileSystem: fileSystem,
flutterRoot: flutterRoot,
);
final XcodeDebugProject project = XcodeDebugProject(
scheme: 'Runner',
xcodeProject: xcodeproj,
xcodeWorkspace: xcworkspace,
hostAppProjectName: 'Runner',
);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
fakeProcessManager.addCommands(<FakeCommand>[
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'stop',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
],
stdout: '''
{"status":true,"errorMessage":null,"debugResult":null}
''',
),
]);
xcodeDebug.startDebugActionProcess = FakeProcess();
xcodeDebug.currentDebuggingProject = project;
expect(xcodeDebug.startDebugActionProcess, isNotNull);
expect(xcodeDebug.currentDebuggingProject, isNotNull);
final bool exitStatus = await xcodeDebug.exit();
expect((xcodeDebug.startDebugActionProcess! as FakeProcess).killed, isTrue);
expect(xcodeDebug.currentDebuggingProject, isNull);
expect(logger.errorText, isEmpty);
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(exitStatus, isTrue);
});
testWithoutContext('exits and deletes temporary directory', () async {
final Xcode xcode = setupXcode(
fakeProcessManager: fakeProcessManager,
fileSystem: fileSystem,
flutterRoot: flutterRoot,
);
xcodeproj.createSync(recursive: true);
xcworkspace.createSync(recursive: true);
final XcodeDebugProject project = XcodeDebugProject(
scheme: 'Runner',
xcodeProject: xcodeproj,
xcodeWorkspace: xcworkspace,
hostAppProjectName: 'Runner',
isTemporaryProject: true,
);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
fakeProcessManager.addCommands(<FakeCommand>[
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'stop',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
'--close-window'
],
stdout: '''
{"status":true,"errorMessage":null,"debugResult":null}
''',
),
]);
xcodeDebug.startDebugActionProcess = FakeProcess();
xcodeDebug.currentDebuggingProject = project;
expect(xcodeDebug.startDebugActionProcess, isNotNull);
expect(xcodeDebug.currentDebuggingProject, isNotNull);
expect(projectDirectory.existsSync(), isTrue);
expect(xcodeproj.existsSync(), isTrue);
expect(xcworkspace.existsSync(), isTrue);
final bool status = await xcodeDebug.exit(skipDelay: true);
expect((xcodeDebug.startDebugActionProcess! as FakeProcess).killed, isTrue);
expect(xcodeDebug.currentDebuggingProject, isNull);
expect(projectDirectory.existsSync(), isFalse);
expect(xcodeproj.existsSync(), isFalse);
expect(xcworkspace.existsSync(), isFalse);
expect(logger.errorText, isEmpty);
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(status, isTrue);
});
testWithoutContext('prints error message when deleting temporary directory that is nonexistent', () async {
final Xcode xcode = setupXcode(
fakeProcessManager: fakeProcessManager,
fileSystem: fileSystem,
flutterRoot: flutterRoot,
);
final XcodeDebugProject project = XcodeDebugProject(
scheme: 'Runner',
xcodeProject: xcodeproj,
xcodeWorkspace: xcworkspace,
hostAppProjectName: 'Runner',
isTemporaryProject: true,
);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
fakeProcessManager.addCommands(<FakeCommand>[
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'stop',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
'--close-window'
],
stdout: '''
{"status":true,"errorMessage":null,"debugResult":null}
''',
),
]);
xcodeDebug.startDebugActionProcess = FakeProcess();
xcodeDebug.currentDebuggingProject = project;
expect(xcodeDebug.startDebugActionProcess, isNotNull);
expect(xcodeDebug.currentDebuggingProject, isNotNull);
expect(projectDirectory.existsSync(), isFalse);
expect(xcodeproj.existsSync(), isFalse);
expect(xcworkspace.existsSync(), isFalse);
final bool status = await xcodeDebug.exit(skipDelay: true);
expect((xcodeDebug.startDebugActionProcess! as FakeProcess).killed, isTrue);
expect(xcodeDebug.currentDebuggingProject, isNull);
expect(projectDirectory.existsSync(), isFalse);
expect(xcodeproj.existsSync(), isFalse);
expect(xcworkspace.existsSync(), isFalse);
expect(logger.errorText, contains('Failed to delete temporary Xcode project'));
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(status, isTrue);
});
testWithoutContext('kill Xcode when force exit', () async {
final Xcode xcode = setupXcode(
fakeProcessManager: FakeProcessManager.any(),
fileSystem: fileSystem,
flutterRoot: flutterRoot,
);
final XcodeDebugProject project = XcodeDebugProject(
scheme: 'Runner',
xcodeProject: xcodeproj,
xcodeWorkspace: xcworkspace,
hostAppProjectName: 'Runner',
);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
fakeProcessManager.addCommands(<FakeCommand>[
const FakeCommand(
command: <String>[
'killall',
'-9',
'Xcode',
],
),
]);
xcodeDebug.startDebugActionProcess = FakeProcess();
xcodeDebug.currentDebuggingProject = project;
expect(xcodeDebug.startDebugActionProcess, isNotNull);
expect(xcodeDebug.currentDebuggingProject, isNotNull);
final bool exitStatus = await xcodeDebug.exit(force: true);
expect((xcodeDebug.startDebugActionProcess! as FakeProcess).killed, isTrue);
expect(xcodeDebug.currentDebuggingProject, isNull);
expect(logger.errorText, isEmpty);
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(exitStatus, isTrue);
});
testWithoutContext('does not crash when deleting temporary directory that is nonexistent when force exiting', () async {
final Xcode xcode = setupXcode(
fakeProcessManager: FakeProcessManager.any(),
fileSystem: fileSystem,
flutterRoot: flutterRoot,
);
final XcodeDebugProject project = XcodeDebugProject(
scheme: 'Runner',
xcodeProject: xcodeproj,
xcodeWorkspace: xcworkspace,
hostAppProjectName: 'Runner',
isTemporaryProject: true,
);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager:FakeProcessManager.any(),
xcode: xcode,
fileSystem: fileSystem,
);
xcodeDebug.startDebugActionProcess = FakeProcess();
xcodeDebug.currentDebuggingProject = project;
expect(xcodeDebug.startDebugActionProcess, isNotNull);
expect(xcodeDebug.currentDebuggingProject, isNotNull);
expect(projectDirectory.existsSync(), isFalse);
expect(xcodeproj.existsSync(), isFalse);
expect(xcworkspace.existsSync(), isFalse);
final bool status = await xcodeDebug.exit(force: true);
expect((xcodeDebug.startDebugActionProcess! as FakeProcess).killed, isTrue);
expect(xcodeDebug.currentDebuggingProject, isNull);
expect(projectDirectory.existsSync(), isFalse);
expect(xcodeproj.existsSync(), isFalse);
expect(xcworkspace.existsSync(), isFalse);
expect(logger.errorText, isEmpty);
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(status, isTrue);
});
});
group('stop app', () {
const String pathToXcodeApp = '/Applications/Xcode.app';
late Xcode xcode;
late Directory xcodeproj;
late Directory xcworkspace;
late XcodeDebugProject project;
setUp(() {
xcode = setupXcode(
fakeProcessManager: fakeProcessManager,
fileSystem: fileSystem,
flutterRoot: flutterRoot,
);
xcodeproj = fileSystem.directory('Runner.xcodeproj');
xcworkspace = fileSystem.directory('Runner.xcworkspace');
project = XcodeDebugProject(
scheme: 'Runner',
xcodeProject: xcodeproj,
xcodeWorkspace: xcworkspace,
hostAppProjectName: 'Runner',
);
});
testWithoutContext('succeeds with all optional flags', () async {
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
fakeProcessManager.addCommands(<FakeCommand>[
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'stop',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
'--close-window',
'--prompt-to-save'
],
stdout: '''
{"status":true,"errorMessage":null,"debugResult":null}
''',
),
]);
final bool status = await xcodeDebug.stopDebuggingApp(
project: project,
closeXcode: true,
promptToSaveOnClose: true,
);
expect(logger.errorText, isEmpty);
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(status, isTrue);
});
testWithoutContext('fails if osascript output returns false status', () async {
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
fakeProcessManager.addCommands(<FakeCommand>[
FakeCommand(
command: <String>[
'xcrun',
'osascript',
'-l',
'JavaScript',
pathToXcodeAutomationScript,
'stop',
'--xcode-path',
pathToXcodeApp,
'--project-path',
project.xcodeProject.path,
'--workspace-path',
project.xcodeWorkspace.path,
'--close-window',
'--prompt-to-save'
],
stdout: '''
{"status":false,"errorMessage":"Failed to stop app","debugResult":null}
''',
),
]);
final bool status = await xcodeDebug.stopDebuggingApp(
project: project,
closeXcode: true,
promptToSaveOnClose: true,
);
expect(logger.errorText, contains('Error stopping app in Xcode'));
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(status, isFalse);
});
});
group('ensureXcodeDebuggerLaunchAction', () {
late Xcode xcode;
setUp(() {
xcode = setupXcode(
fakeProcessManager: fakeProcessManager,
fileSystem: fileSystem,
flutterRoot: flutterRoot,
);
});
testWithoutContext('succeeds', () async {
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
final File schemeFile = fileSystem.file('ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme');
schemeFile.createSync(recursive: true);
schemeFile.writeAsStringSync(validSchemeXml);
xcodeDebug.ensureXcodeDebuggerLaunchAction(schemeFile);
expect(logger.errorText, isEmpty);
});
testWithoutContext('prints error if scheme file not found', () async {
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
final File schemeFile = fileSystem.file('ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme');
xcodeDebug.ensureXcodeDebuggerLaunchAction(schemeFile);
expect(logger.errorText.contains('Failed to find'), isTrue);
});
testWithoutContext('throws error if launch action is missing debugger info', () async {
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
final File schemeFile = fileSystem.file('ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme');
schemeFile.createSync(recursive: true);
schemeFile.writeAsStringSync(disabledDebugExecutableSchemeXml);
expect(() => xcodeDebug.ensureXcodeDebuggerLaunchAction(schemeFile),
throwsToolExit(message: 'Your Xcode project is not setup to start a debugger.'));
});
testWithoutContext('prints error if unable to find launch action', () async {
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
final File schemeFile = fileSystem.file('ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme');
schemeFile.createSync(recursive: true);
schemeFile.writeAsStringSync('<?xml version="1.0" encoding="UTF-8"?><Scheme></Scheme>');
xcodeDebug.ensureXcodeDebuggerLaunchAction(schemeFile);
expect(logger.errorText.contains('Failed to find LaunchAction for the Scheme'), isTrue);
});
testWithoutContext('prints error if invalid xml', () async {
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: fileSystem,
);
final File schemeFile = fileSystem.file('ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme');
schemeFile.createSync(recursive: true);
schemeFile.writeAsStringSync('<?xml version="1.0" encoding="UTF-8"?><Scheme>');
xcodeDebug.ensureXcodeDebuggerLaunchAction(schemeFile);
expect(logger.errorText.contains('Failed to parse'), isTrue);
});
});
});
group('Debug project through Xcode with app bundle', () {
late BufferLogger logger;
late FakeProcessManager fakeProcessManager;
late MemoryFileSystem fileSystem;
const String flutterRoot = '/path/to/flutter';
setUp(() {
logger = BufferLogger.test();
fakeProcessManager = FakeProcessManager.empty();
fileSystem = MemoryFileSystem.test();
});
testUsingContext('creates temporary xcode project', () async {
final Xcode xcode = setupXcode(
fakeProcessManager: fakeProcessManager,
fileSystem: fileSystem,
flutterRoot: flutterRoot,
);
final XcodeDebug xcodeDebug = XcodeDebug(
logger: logger,
processManager: fakeProcessManager,
xcode: xcode,
fileSystem: globals.fs,
);
final Directory projectDirectory = globals.fs.systemTempDirectory.createTempSync('flutter_empty_xcode.');
try {
final XcodeDebugProject project = await xcodeDebug.createXcodeProjectWithCustomBundle(
'/path/to/bundle',
templateRenderer: globals.templateRenderer,
projectDestination: projectDirectory,
);
final File schemeFile = projectDirectory
.childDirectory('Runner.xcodeproj')
.childDirectory('xcshareddata')
.childDirectory('xcschemes')
.childFile('Runner.xcscheme');
expect(project.scheme, 'Runner');
expect(project.xcodeProject.existsSync(), isTrue);
expect(project.xcodeWorkspace.existsSync(), isTrue);
expect(project.isTemporaryProject, isTrue);
expect(projectDirectory.childDirectory('Runner.xcodeproj').existsSync(), isTrue);
expect(projectDirectory.childDirectory('Runner.xcworkspace').existsSync(), isTrue);
expect(schemeFile.existsSync(), isTrue);
expect(schemeFile.readAsStringSync(), contains('FilePath = "/path/to/bundle"'));
} catch (err) { // ignore: avoid_catches_without_on_clauses
fail(err.toString());
} finally {
projectDirectory.deleteSync(recursive: true);
}
});
});
}
Xcode setupXcode({
required FakeProcessManager fakeProcessManager,
required FileSystem fileSystem,
required String flutterRoot,
bool xcodeSelect = true,
}) {
fakeProcessManager.addCommand(const FakeCommand(
command: <String>['/usr/bin/xcode-select', '--print-path'],
stdout: '/Applications/Xcode.app/Contents/Developer',
));
fileSystem.file('$flutterRoot/packages/flutter_tools/bin/xcode_debug.js').createSync(recursive: true);
final XcodeProjectInterpreter xcodeProjectInterpreter = XcodeProjectInterpreter.test(
processManager: FakeProcessManager.any(),
version: Version(14, 0, 0),
);
return Xcode.test(
processManager: fakeProcessManager,
xcodeProjectInterpreter: xcodeProjectInterpreter,
fileSystem: fileSystem,
flutterRoot: flutterRoot,
);
}
class FakeProcess extends Fake implements Process {
bool killed = false;
@override
bool kill([io.ProcessSignal signal = io.ProcessSignal.sigterm]) {
killed = true;
return true;
}
}
const String validSchemeXml = '''
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
''';
const String disabledDebugExecutableSchemeXml = '''
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
''';
| flutter/packages/flutter_tools/test/general.shard/ios/xcode_debug_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/ios/xcode_debug_test.dart",
"repo_id": "flutter",
"token_count": 20591
} | 838 |
// Copyright 2014 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.
import 'package:flutter_tools/src/base/io.dart';
import 'package:flutter_tools/src/base/user_messages.dart';
import 'package:flutter_tools/src/doctor_validator.dart';
import 'package:flutter_tools/src/linux/linux_doctor.dart';
import '../../src/common.dart';
import '../../src/fake_process_manager.dart';
// A command that will return typical-looking 'clang++ --version' output with
// the given version number.
FakeCommand _clangPresentCommand(String version) {
return FakeCommand(
command: const <String>['clang++', '--version'],
stdout: '''
clang version $version-6+build1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
''',
);
}
// A command that will return typical-looking 'cmake --version' output with the
// given version number.
FakeCommand _cmakePresentCommand(String version) {
return FakeCommand(
command: const <String>['cmake', '--version'],
stdout: '''
cmake version $version
CMake suite maintained and supported by Kitware (kitware.com/cmake).
''',
);
}
// A command that will return typical-looking 'ninja --version' output with the
// given version number.
FakeCommand _ninjaPresentCommand(String version) {
return FakeCommand(
command: const <String>['ninja', '--version'],
stdout: version,
);
}
// A command that will return typical-looking 'pkg-config --version' output with
// the given version number.
FakeCommand _pkgConfigPresentCommand(String version) {
return FakeCommand(
command: const <String>['pkg-config', '--version'],
stdout: version,
);
}
/// A command that returns either success or failure for a pkg-config query
/// for [library], depending on [exists].
FakeCommand _libraryCheckCommand(String library, {bool exists = true}) {
return FakeCommand(
command: <String>['pkg-config', '--exists', library],
exitCode: exists ? 0 : 1,
);
}
// Commands that give positive replies for all the GTK library pkg-config queries.
List<FakeCommand> _gtkLibrariesPresentCommands() {
return <FakeCommand>[
_libraryCheckCommand('gtk+-3.0'),
_libraryCheckCommand('glib-2.0'),
_libraryCheckCommand('gio-2.0'),
];
}
// Commands that give some failures for the GTK library pkg-config queries.
List<FakeCommand> _gtkLibrariesMissingCommands() {
return <FakeCommand>[
_libraryCheckCommand('gtk+-3.0'),
_libraryCheckCommand('glib-2.0', exists: false),
// No more entries, since the first missing GTK library stops the
// checks.
];
}
// A command that will failure when running '[binary] --version'.
FakeCommand _missingBinaryCommand(String binary) {
return FakeCommand(
command: <String>[binary, '--version'],
exitCode: 1,
);
}
FakeCommand _missingBinaryException(String binary) {
return FakeCommand(
command: <String>[binary, '--version'],
exitCode: 1,
exception: ProcessException(binary, <String>[])
);
}
void main() {
testWithoutContext('Full validation when everything is available at the necessary version',() async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: UserMessages(),
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.success);
expect(result.messages, const <ValidationMessage>[
ValidationMessage('clang version 4.0.1-6+build1'),
ValidationMessage('cmake version 3.16.3'),
ValidationMessage('ninja version 1.10.0'),
ValidationMessage('pkg-config version 0.29'),
]);
});
testWithoutContext('Partial validation when clang++ version is too old', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('2.0.1'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: UserMessages(),
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.partial);
expect(result.messages, const <ValidationMessage>[
ValidationMessage('clang version 2.0.1-6+build1'),
ValidationMessage.error('clang++ 3.4.0 or later is required.'),
ValidationMessage('cmake version 3.16.3'),
ValidationMessage('ninja version 1.10.0'),
ValidationMessage('pkg-config version 0.29'),
]);
});
testWithoutContext('Partial validation when CMake version is too old', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.2.0'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: UserMessages(),
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.partial);
expect(result.messages, const <ValidationMessage>[
ValidationMessage('clang version 4.0.1-6+build1'),
ValidationMessage('cmake version 3.2.0'),
ValidationMessage.error('cmake 3.10.0 or later is required.'),
ValidationMessage('ninja version 1.10.0'),
ValidationMessage('pkg-config version 0.29'),
]);
});
testWithoutContext('Partial validation when ninja version is too old', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('0.8.1'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: UserMessages(),
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.partial);
expect(result.messages, const <ValidationMessage>[
ValidationMessage('clang version 4.0.1-6+build1'),
ValidationMessage('cmake version 3.16.3'),
ValidationMessage('ninja version 0.8.1'),
ValidationMessage.error('ninja 1.8.0 or later is required.'),
ValidationMessage('pkg-config version 0.29'),
]);
});
testWithoutContext('Partial validation when pkg-config version is too old', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.27.0'),
..._gtkLibrariesPresentCommands(),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: UserMessages(),
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.partial);
expect(result.messages, const <ValidationMessage>[
ValidationMessage('clang version 4.0.1-6+build1'),
ValidationMessage('cmake version 3.16.3'),
ValidationMessage('ninja version 1.10.0'),
ValidationMessage('pkg-config version 0.27.0'),
ValidationMessage.error('pkg-config 0.29.0 or later is required.'),
]);
});
testWithoutContext('Missing validation when pkg-config is missing', () async {
final UserMessages userMessages = UserMessages();
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('1.10.0'),
_missingBinaryException('pkg-config'),
// We never check libraries because pkg-config is not present
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: userMessages,
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.missing);
expect(result.messages, <ValidationMessage>[
const ValidationMessage('clang version 4.0.1-6+build1'),
const ValidationMessage('cmake version 3.16.3'),
const ValidationMessage('ninja version 1.10.0'),
ValidationMessage.error(userMessages.pkgConfigMissing),
]);
});
testWithoutContext('Missing validation when CMake is not available', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_missingBinaryCommand('cmake'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: userMessages,
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.missing);
expect(result.messages, <ValidationMessage>[
const ValidationMessage('clang version 4.0.1-6+build1'),
ValidationMessage.error(userMessages.cmakeMissing),
const ValidationMessage('ninja version 1.10.0'),
const ValidationMessage('pkg-config version 0.29'),
]);
});
testWithoutContext('Missing validation when CMake version is unparsable', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('bogus'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: userMessages,
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.missing);
expect(result.messages, <ValidationMessage>[
const ValidationMessage('clang version 4.0.1-6+build1'),
ValidationMessage.error(userMessages.cmakeMissing),
const ValidationMessage('ninja version 1.10.0'),
const ValidationMessage('pkg-config version 0.29'),
]);
});
testWithoutContext('Missing validation when clang++ is not available', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_missingBinaryException('clang++'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: userMessages,
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.missing);
expect(result.messages, <ValidationMessage>[
ValidationMessage.error(userMessages.clangMissing),
const ValidationMessage('cmake version 3.16.3'),
const ValidationMessage('ninja version 1.10.0'),
const ValidationMessage('pkg-config version 0.29'),
]);
});
testWithoutContext('Missing validation when clang++ version is unparsable', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('bogus'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: userMessages,
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.missing);
expect(result.messages, <ValidationMessage>[
ValidationMessage.error(userMessages.clangMissing),
const ValidationMessage('cmake version 3.16.3'),
const ValidationMessage('ninja version 1.10.0'),
const ValidationMessage('pkg-config version 0.29'),
]);
});
testWithoutContext('Missing validation when ninja is not available', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.16.3'),
_missingBinaryCommand('ninja'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: userMessages,
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.missing);
expect(result.messages, <ValidationMessage>[
const ValidationMessage('clang version 4.0.1-6+build1'),
const ValidationMessage('cmake version 3.16.3'),
ValidationMessage.error(userMessages.ninjaMissing),
const ValidationMessage('pkg-config version 0.29'),
]);
});
testWithoutContext('Missing validation when ninja version is unparsable', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('bogus'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: userMessages,
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.missing);
expect(result.messages, <ValidationMessage>[
const ValidationMessage('clang version 4.0.1-6+build1'),
const ValidationMessage('cmake version 3.16.3'),
ValidationMessage.error(userMessages.ninjaMissing),
const ValidationMessage('pkg-config version 0.29'),
]);
});
testWithoutContext('Missing validation when pkg-config is not available', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('1.10.0'),
_missingBinaryCommand('pkg-config'),
..._gtkLibrariesPresentCommands(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: userMessages,
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.missing);
expect(result.messages, <ValidationMessage>[
const ValidationMessage('clang version 4.0.1-6+build1'),
const ValidationMessage('cmake version 3.16.3'),
const ValidationMessage('ninja version 1.10.0'),
ValidationMessage.error(userMessages.pkgConfigMissing),
]);
});
testWithoutContext('Missing validation when pkg-config version is unparsable', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('bogus'),
..._gtkLibrariesPresentCommands(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: userMessages,
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.missing);
expect(result.messages, <ValidationMessage>[
const ValidationMessage('clang version 4.0.1-6+build1'),
const ValidationMessage('cmake version 3.16.3'),
const ValidationMessage('ninja version 1.10.0'),
ValidationMessage.error(userMessages.pkgConfigMissing),
]);
});
testWithoutContext('Missing validation when GTK libraries are not available', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_clangPresentCommand('4.0.1'),
_cmakePresentCommand('3.16.3'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesMissingCommands(),
]);
final UserMessages userMessages = UserMessages();
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: userMessages,
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.missing);
expect(result.messages, <ValidationMessage>[
const ValidationMessage('clang version 4.0.1-6+build1'),
const ValidationMessage('cmake version 3.16.3'),
const ValidationMessage('ninja version 1.10.0'),
const ValidationMessage('pkg-config version 0.29'),
ValidationMessage.error(userMessages.gtkLibrariesMissing),
]);
});
testWithoutContext('Missing validation when multiple dependencies are not available', () async {
final ProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
_missingBinaryCommand('clang++'),
_missingBinaryCommand('cmake'),
_ninjaPresentCommand('1.10.0'),
_pkgConfigPresentCommand('0.29'),
..._gtkLibrariesPresentCommands(),
]);
final DoctorValidator linuxDoctorValidator = LinuxDoctorValidator(
processManager: processManager,
userMessages: UserMessages(),
);
final ValidationResult result = await linuxDoctorValidator.validate();
expect(result.type, ValidationType.missing);
});
}
| flutter/packages/flutter_tools/test/general.shard/linux/linux_doctor_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/linux/linux_doctor_test.dart",
"repo_id": "flutter",
"token_count": 6314
} | 839 |
// Copyright 2014 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.
import 'dart:convert';
import 'package:file/file.dart';
import 'package:file/memory.dart';
import 'package:file_testing/file_testing.dart';
import 'package:flutter_tools/src/base/os.dart';
import 'package:flutter_tools/src/base/platform.dart';
import 'package:flutter_tools/src/base/time.dart';
import 'package:flutter_tools/src/base/utils.dart';
import 'package:flutter_tools/src/features.dart';
import 'package:flutter_tools/src/flutter_manifest.dart';
import 'package:flutter_tools/src/flutter_plugins.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/ios/xcodeproj.dart';
import 'package:flutter_tools/src/plugins.dart';
import 'package:flutter_tools/src/preview_device.dart';
import 'package:flutter_tools/src/project.dart';
import 'package:flutter_tools/src/version.dart';
import 'package:test/fake.dart';
import 'package:yaml/yaml.dart';
import '../src/common.dart';
import '../src/context.dart';
import '../src/fakes.dart' hide FakeOperatingSystemUtils;
import '../src/pubspec_schema.dart';
/// Information for a platform entry in the 'platforms' section of a plugin's
/// pubspec.yaml.
class _PluginPlatformInfo {
const _PluginPlatformInfo({
this.pluginClass,
this.dartPluginClass,
this.androidPackage,
this.sharedDarwinSource = false,
this.fileName
}) : assert(pluginClass != null || dartPluginClass != null),
assert(androidPackage == null || pluginClass != null);
/// The pluginClass entry, if any.
final String? pluginClass;
/// The dartPluginClass entry, if any.
final String? dartPluginClass;
/// The package entry for an Android plugin implementation using pluginClass.
final String? androidPackage;
final bool sharedDarwinSource;
/// The fileName entry for a web plugin implementation.
final String? fileName;
/// Returns the body of a platform section for a plugin's pubspec, properly
/// indented.
String get indentedPubspecSection {
const String indentation = ' ';
return <String>[
if (pluginClass != null)
'${indentation}pluginClass: $pluginClass',
if (dartPluginClass != null)
'${indentation}dartPluginClass: $dartPluginClass',
if (androidPackage != null)
'${indentation}package: $androidPackage',
if (sharedDarwinSource)
'${indentation}sharedDarwinSource: true',
if (fileName != null)
'${indentation}fileName: $fileName',
].join('\n');
}
}
void main() {
group('plugins', () {
late FileSystem fs;
late FakeFlutterProject flutterProject;
late FakeFlutterManifest flutterManifest;
late FakeIosProject iosProject;
late FakeMacOSProject macosProject;
late FakeAndroidProject androidProject;
late FakeWebProject webProject;
late FakeWindowsProject windowsProject;
late FakeLinuxProject linuxProject;
late FakeSystemClock systemClock;
late FlutterVersion flutterVersion;
// A Windows-style filesystem. This is not populated by default, so tests
// using it instead of fs must re-run any necessary setup (e.g.,
// setUpProject).
late FileSystem fsWindows;
const String pubCachePath = '/path/to/.pub-cache/hosted/pub.dartlang.org/foo-1.2.3';
const String ephemeralPackagePath = '/path/to/app/linux/flutter/ephemeral/foo-1.2.3';
// Adds basic properties to the flutterProject and its subprojects.
void setUpProject(FileSystem fileSystem) {
flutterProject = FakeFlutterProject();
flutterManifest = FakeFlutterManifest();
flutterProject
..manifest = flutterManifest
..directory = fileSystem.systemTempDirectory.childDirectory('app')
..flutterPluginsFile = flutterProject.directory.childFile('.flutter-plugins')
..flutterPluginsDependenciesFile = flutterProject.directory.childFile('.flutter-plugins-dependencies');
iosProject = FakeIosProject();
flutterProject.ios = iosProject;
final Directory iosDirectory = flutterProject.directory.childDirectory('ios');
iosProject
..pluginRegistrantHost = flutterProject.directory.childDirectory('Runner')
..podfile = iosDirectory.childFile('Podfile')
..podManifestLock = iosDirectory.childFile('Podfile.lock')
..testExists = false;
macosProject = FakeMacOSProject();
flutterProject.macos = macosProject;
final Directory macosDirectory = flutterProject.directory.childDirectory('macos');
final Directory macosManagedDirectory = macosDirectory.childDirectory('Flutter');
macosProject
..podfile = macosDirectory.childFile('Podfile')
..podManifestLock = macosDirectory.childFile('Podfile.lock')
..managedDirectory = macosManagedDirectory
..exists = false;
androidProject = FakeAndroidProject();
flutterProject.android = androidProject;
final Directory androidDirectory = flutterProject.directory.childDirectory('android');
androidProject
..pluginRegistrantHost = androidDirectory.childDirectory('app')
..hostAppGradleRoot = androidDirectory
..exists = false
..embeddingVersion = AndroidEmbeddingVersion.v2;
webProject = FakeWebProject();
flutterProject.web = webProject;
webProject
..libDirectory = flutterProject.directory.childDirectory('lib')
..exists = false;
windowsProject = FakeWindowsProject();
flutterProject.windows = windowsProject;
final Directory windowsManagedDirectory = flutterProject.directory.childDirectory('windows').childDirectory('flutter');
windowsProject
..managedDirectory = windowsManagedDirectory
..cmakeFile = windowsManagedDirectory.parent.childFile('CMakeLists.txt')
..generatedPluginCmakeFile = windowsManagedDirectory.childFile('generated_plugins.mk')
..pluginSymlinkDirectory = windowsManagedDirectory.childDirectory('ephemeral').childDirectory('.plugin_symlinks')
..exists = false;
linuxProject = FakeLinuxProject();
flutterProject.linux = linuxProject;
final Directory linuxManagedDirectory = flutterProject.directory.childDirectory('linux').childDirectory('flutter');
final Directory linuxEphemeralDirectory = linuxManagedDirectory.childDirectory('ephemeral');
linuxProject
..managedDirectory = linuxManagedDirectory
..ephemeralDirectory = linuxEphemeralDirectory
..pluginSymlinkDirectory = linuxEphemeralDirectory.childDirectory('.plugin_symlinks')
..cmakeFile = linuxManagedDirectory.parent.childFile('CMakeLists.txt')
..generatedPluginCmakeFile = linuxManagedDirectory.childFile('generated_plugins.mk')
..exists = false;
}
setUp(() async {
fs = MemoryFileSystem.test();
fsWindows = MemoryFileSystem(style: FileSystemStyle.windows);
systemClock = FakeSystemClock()
..currentTime = DateTime(1970);
flutterVersion = FakeFlutterVersion(frameworkVersion: '1.0.0');
// Add basic properties to the Flutter project and subprojects
setUpProject(fs);
flutterProject.directory.childFile('.packages').createSync(recursive: true);
});
// Makes fake plugin packages for each plugin, adds them to flutterProject,
// and returns their directories.
//
// If an entry contains a path separator, it will be treated as a path for
// the location of the package, with the name being the last component.
// Otherwise it will be treated as a name, and put in a default location
// (a fake pub cache).
List<Directory> createFakePlugins(FileSystem fileSystem, List<String> pluginNamesOrPaths) {
const String pluginYamlTemplate = '''
flutter:
plugin:
platforms:
ios:
pluginClass: PLUGIN_CLASS
macos:
pluginClass: PLUGIN_CLASS
windows:
pluginClass: PLUGIN_CLASS
linux:
pluginClass: PLUGIN_CLASS
web:
pluginClass: PLUGIN_CLASS
fileName: lib/PLUGIN_CLASS.dart
android:
pluginClass: PLUGIN_CLASS
package: AndroidPackage
''';
final List<Directory> directories = <Directory>[];
final Directory fakePubCache = fileSystem.systemTempDirectory.childDirectory('cache');
final File packagesFile = flutterProject.directory.childFile('.packages')
..createSync(recursive: true);
for (final String nameOrPath in pluginNamesOrPaths) {
final String name = fileSystem.path.basename(nameOrPath);
final Directory pluginDirectory = (nameOrPath == name)
? fakePubCache.childDirectory(name)
: fileSystem.directory(nameOrPath);
packagesFile.writeAsStringSync(
'$name:${pluginDirectory.childFile('lib').uri}\n',
mode: FileMode.writeOnlyAppend);
pluginDirectory.childFile('pubspec.yaml')
..createSync(recursive: true)
..writeAsStringSync(pluginYamlTemplate.replaceAll('PLUGIN_CLASS', sentenceCase(camelCase(name))));
directories.add(pluginDirectory);
}
return directories;
}
// Makes a fake plugin package, adds it to flutterProject, and returns its directory.
Directory createFakePlugin(FileSystem fileSystem) {
return createFakePlugins(fileSystem, <String>['some_plugin'])[0];
}
void createNewJavaPlugin1() {
final Directory pluginUsingJavaAndNewEmbeddingDir =
fs.systemTempDirectory.createTempSync('flutter_plugin_using_java_and_new_embedding_dir.');
pluginUsingJavaAndNewEmbeddingDir
.childFile('pubspec.yaml')
.writeAsStringSync('''
flutter:
plugin:
androidPackage: plugin1
pluginClass: UseNewEmbedding
''');
pluginUsingJavaAndNewEmbeddingDir
.childDirectory('android')
.childDirectory('src')
.childDirectory('main')
.childDirectory('java')
.childDirectory('plugin1')
.childFile('UseNewEmbedding.java')
..createSync(recursive: true)
..writeAsStringSync('import io.flutter.embedding.engine.plugins.FlutterPlugin;');
flutterProject.directory
.childFile('.packages')
.writeAsStringSync(
'plugin1:${pluginUsingJavaAndNewEmbeddingDir.childDirectory('lib').uri}\n',
mode: FileMode.append,
);
}
Directory createPluginWithInvalidAndroidPackage() {
final Directory pluginUsingJavaAndNewEmbeddingDir =
fs.systemTempDirectory.createTempSync('flutter_plugin_invalid_package.');
pluginUsingJavaAndNewEmbeddingDir
.childFile('pubspec.yaml')
.writeAsStringSync('''
flutter:
plugin:
androidPackage: plugin1.invalid
pluginClass: UseNewEmbedding
''');
pluginUsingJavaAndNewEmbeddingDir
.childDirectory('android')
.childDirectory('src')
.childDirectory('main')
.childDirectory('java')
.childDirectory('plugin1')
.childDirectory('correct')
.childFile('UseNewEmbedding.java')
..createSync(recursive: true)
..writeAsStringSync('import io.flutter.embedding.engine.plugins.FlutterPlugin;');
flutterProject.directory
.childFile('.packages')
.writeAsStringSync(
'plugin1:${pluginUsingJavaAndNewEmbeddingDir.childDirectory('lib').uri}\n',
mode: FileMode.append,
);
return pluginUsingJavaAndNewEmbeddingDir;
}
void createDualSupportJavaPlugin4() {
final Directory pluginUsingJavaAndNewEmbeddingDir =
fs.systemTempDirectory.createTempSync('flutter_plugin_using_java_and_new_embedding_dir.');
pluginUsingJavaAndNewEmbeddingDir
.childFile('pubspec.yaml')
.writeAsStringSync('''
flutter:
plugin:
androidPackage: plugin4
pluginClass: UseBothEmbedding
''');
pluginUsingJavaAndNewEmbeddingDir
.childDirectory('android')
.childDirectory('src')
.childDirectory('main')
.childDirectory('java')
.childDirectory('plugin4')
.childFile('UseBothEmbedding.java')
..createSync(recursive: true)
..writeAsStringSync(
'import io.flutter.embedding.engine.plugins.FlutterPlugin;\n'
'PluginRegistry\n'
'registerWith(Irrelevant registrar)\n'
);
flutterProject.directory
.childFile('.packages')
.writeAsStringSync(
'plugin4:${pluginUsingJavaAndNewEmbeddingDir.childDirectory('lib').uri}',
mode: FileMode.append,
);
}
Directory createLegacyPluginWithDependencies({
required String name,
required List<String> dependencies,
}) {
final Directory pluginDirectory = fs.systemTempDirectory.createTempSync('flutter_plugin.');
pluginDirectory
.childFile('pubspec.yaml')
.writeAsStringSync('''
name: $name
flutter:
plugin:
androidPackage: plugin2
pluginClass: UseNewEmbedding
dependencies:
''');
for (final String dependency in dependencies) {
pluginDirectory
.childFile('pubspec.yaml')
.writeAsStringSync(' $dependency:\n', mode: FileMode.append);
}
flutterProject.directory
.childFile('.packages')
.writeAsStringSync(
'$name:${pluginDirectory.childDirectory('lib').uri}\n',
mode: FileMode.append,
);
return pluginDirectory;
}
Directory createPlugin({
required String name,
required Map<String, _PluginPlatformInfo> platforms,
List<String> dependencies = const <String>[],
}) {
final Iterable<String> platformSections = platforms.entries.map((MapEntry<String, _PluginPlatformInfo> entry) => '''
${entry.key}:
${entry.value.indentedPubspecSection}
''');
final Directory pluginDirectory = fs.systemTempDirectory.createTempSync('flutter_plugin.');
pluginDirectory
.childFile('pubspec.yaml')
.writeAsStringSync('''
name: $name
flutter:
plugin:
platforms:
${platformSections.join('\n')}
dependencies:
''');
for (final String dependency in dependencies) {
pluginDirectory
.childFile('pubspec.yaml')
.writeAsStringSync(' $dependency:\n', mode: FileMode.append);
}
flutterProject.directory
.childFile('.packages')
.writeAsStringSync(
'$name:${pluginDirectory.childDirectory('lib').uri}\n',
mode: FileMode.append,
);
return pluginDirectory;
}
// Creates the files that would indicate that pod install has run for the
// given project.
void simulatePodInstallRun(XcodeBasedProject project) {
project.podManifestLock.createSync(recursive: true);
}
group('refreshPlugins', () {
testUsingContext('Refreshing the plugin list is a no-op when the plugins list stays empty', () async {
await refreshPluginsList(flutterProject);
expect(flutterProject.flutterPluginsFile.existsSync(), false);
expect(flutterProject.flutterPluginsDependenciesFile.existsSync(), false);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Refreshing the plugin list deletes the plugin file when there were plugins but no longer are', () async {
flutterProject.flutterPluginsFile.createSync();
flutterProject.flutterPluginsDependenciesFile.createSync();
await refreshPluginsList(flutterProject);
expect(flutterProject.flutterPluginsFile.existsSync(), false);
expect(flutterProject.flutterPluginsDependenciesFile.existsSync(), false);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Refreshing the plugin list creates a sorted plugin directory when there are plugins', () async {
createFakePlugins(fs, <String>[
'plugin_d',
'plugin_a',
'/local_plugins/plugin_c',
'/local_plugins/plugin_b',
]);
iosProject.testExists = true;
await refreshPluginsList(flutterProject);
expect(flutterProject.flutterPluginsFile.existsSync(), true);
expect(flutterProject.flutterPluginsDependenciesFile.existsSync(), true);
final String pluginsFileContents = flutterProject.flutterPluginsFile.readAsStringSync();
expect(pluginsFileContents.indexOf('plugin_a'), lessThan(pluginsFileContents.indexOf('plugin_b')));
expect(pluginsFileContents.indexOf('plugin_b'), lessThan(pluginsFileContents.indexOf('plugin_c')));
expect(pluginsFileContents.indexOf('plugin_c'), lessThan(pluginsFileContents.indexOf('plugin_d')));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext(
'Refreshing the plugin list modifies .flutter-plugins '
'and .flutter-plugins-dependencies when there are plugins', () async {
final Directory pluginA = createLegacyPluginWithDependencies(name: 'plugin-a', dependencies: const <String>['plugin-b', 'plugin-c', 'random-package']);
final Directory pluginB = createLegacyPluginWithDependencies(name: 'plugin-b', dependencies: const <String>['plugin-c']);
final Directory pluginC = createLegacyPluginWithDependencies(name: 'plugin-c', dependencies: const <String>[]);
iosProject.testExists = true;
final DateTime dateCreated = DateTime(1970);
systemClock.currentTime = dateCreated;
await refreshPluginsList(flutterProject);
// Verify .flutter-plugins-dependencies is configured correctly.
expect(flutterProject.flutterPluginsFile.existsSync(), true);
expect(flutterProject.flutterPluginsDependenciesFile.existsSync(), true);
expect(flutterProject.flutterPluginsFile.readAsStringSync(),
'# This is a generated file; do not edit or check into version control.\n'
'plugin-a=${pluginA.path}/\n'
'plugin-b=${pluginB.path}/\n'
'plugin-c=${pluginC.path}/\n'
);
final String pluginsString = flutterProject.flutterPluginsDependenciesFile.readAsStringSync();
final Map<String, dynamic> jsonContent = json.decode(pluginsString) as Map<String, dynamic>;
expect(jsonContent['info'], 'This is a generated file; do not edit or check into version control.');
final Map<String, dynamic> plugins = jsonContent['plugins'] as Map<String, dynamic>;
final List<dynamic> expectedPlugins = <dynamic>[
<String, dynamic> {
'name': 'plugin-a',
'path': '${pluginA.path}/',
'native_build': true,
'dependencies': <String>[
'plugin-b',
'plugin-c',
],
},
<String, dynamic> {
'name': 'plugin-b',
'path': '${pluginB.path}/',
'native_build': true,
'dependencies': <String>[
'plugin-c',
],
},
<String, dynamic> {
'name': 'plugin-c',
'path': '${pluginC.path}/',
'native_build': true,
'dependencies': <String>[],
},
];
expect(plugins['ios'], expectedPlugins);
expect(plugins['android'], expectedPlugins);
expect(plugins['macos'], <dynamic>[]);
expect(plugins['windows'], <dynamic>[]);
expect(plugins['linux'], <dynamic>[]);
expect(plugins['web'], <dynamic>[]);
final List<dynamic> expectedDependencyGraph = <dynamic>[
<String, dynamic> {
'name': 'plugin-a',
'dependencies': <String>[
'plugin-b',
'plugin-c',
],
},
<String, dynamic> {
'name': 'plugin-b',
'dependencies': <String>[
'plugin-c',
],
},
<String, dynamic> {
'name': 'plugin-c',
'dependencies': <String>[],
},
];
expect(jsonContent['dependencyGraph'], expectedDependencyGraph);
expect(jsonContent['date_created'], dateCreated.toString());
expect(jsonContent['version'], '1.0.0');
// Make sure tests are updated if a new object is added/removed.
final List<String> expectedKeys = <String>[
'info',
'plugins',
'dependencyGraph',
'date_created',
'version',
];
expect(jsonContent.keys, expectedKeys);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
SystemClock: () => systemClock,
FlutterVersion: () => flutterVersion,
});
testUsingContext(
'.flutter-plugins-dependencies contains plugin platform info', () async {
createPlugin(
name: 'plugin-a',
platforms: const <String, _PluginPlatformInfo>{
// Native-only; should include native build.
'android': _PluginPlatformInfo(pluginClass: 'Foo', androidPackage: 'bar.foo'),
// Hybrid native and Dart; should include native build.
'ios': _PluginPlatformInfo(pluginClass: 'Foo', dartPluginClass: 'Bar', sharedDarwinSource: true),
// Web; should not have the native build key at all since it doesn't apply.
'web': _PluginPlatformInfo(pluginClass: 'Foo', fileName: 'lib/foo.dart'),
// Dart-only; should not include native build.
'windows': _PluginPlatformInfo(dartPluginClass: 'Foo'),
});
iosProject.testExists = true;
final DateTime dateCreated = DateTime(1970);
systemClock.currentTime = dateCreated;
await refreshPluginsList(flutterProject);
expect(flutterProject.flutterPluginsDependenciesFile.existsSync(), true);
final String pluginsString = flutterProject.flutterPluginsDependenciesFile.readAsStringSync();
final Map<String, dynamic> jsonContent = json.decode(pluginsString) as Map<String, dynamic>;
final Map<String, dynamic>? actualPlugins = jsonContent['plugins'] as Map<String, dynamic>?;
final Map<String, Object> expectedPlugins = <String, Object>{
'ios': <Map<String, Object>>[
<String, Object>{
'name': 'plugin-a',
'path': '/.tmp_rand0/flutter_plugin.rand0/',
'shared_darwin_source': true,
'native_build': true,
'dependencies': <String>[]
}
],
'android': <Map<String, Object>>[
<String, Object>{
'name': 'plugin-a',
'path': '/.tmp_rand0/flutter_plugin.rand0/',
'native_build': true,
'dependencies': <String>[]
}
],
'macos': <Map<String, Object>>[],
'linux': <Map<String, Object>>[],
'windows': <Map<String, Object>>[
<String, Object>{
'name': 'plugin-a',
'path': '/.tmp_rand0/flutter_plugin.rand0/',
'native_build': false,
'dependencies': <String>[]
}
],
'web': <Map<String, Object>>[
<String, Object>{
'name': 'plugin-a',
'path': '/.tmp_rand0/flutter_plugin.rand0/',
'dependencies': <String>[]
}
]
};
expect(actualPlugins, expectedPlugins);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
SystemClock: () => systemClock,
FlutterVersion: () => flutterVersion,
});
testUsingContext('Changes to the plugin list invalidates the Cocoapod lockfiles', () async {
simulatePodInstallRun(iosProject);
simulatePodInstallRun(macosProject);
createFakePlugin(fs);
iosProject.testExists = true;
macosProject.exists = true;
await refreshPluginsList(flutterProject, iosPlatform: true, macOSPlatform: true);
expect(iosProject.podManifestLock.existsSync(), false);
expect(macosProject.podManifestLock.existsSync(), false);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
SystemClock: () => systemClock,
FlutterVersion: () => flutterVersion,
});
testUsingContext('No changes to the plugin list does not invalidate the Cocoapod lockfiles', () async {
createFakePlugin(fs);
iosProject.testExists = true;
macosProject.exists = true;
// First call will create the .flutter-plugins-dependencies and the legacy .flutter-plugins file.
// Since there was no plugins list, the lock files will be invalidated.
// The second call is where the plugins list is compared to the existing one, and if there is no change,
// the podfiles shouldn't be invalidated.
await refreshPluginsList(flutterProject, iosPlatform: true, macOSPlatform: true);
simulatePodInstallRun(iosProject);
simulatePodInstallRun(macosProject);
await refreshPluginsList(flutterProject);
expect(iosProject.podManifestLock.existsSync(), true);
expect(macosProject.podManifestLock.existsSync(), true);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
SystemClock: () => systemClock,
FlutterVersion: () => flutterVersion,
});
});
group('injectPlugins', () {
FakeXcodeProjectInterpreter? xcodeProjectInterpreter;
setUp(() {
xcodeProjectInterpreter = FakeXcodeProjectInterpreter();
});
testUsingContext('Registrant uses new embedding if app uses new embedding', () async {
androidProject.embeddingVersion = AndroidEmbeddingVersion.v2;
await injectPlugins(flutterProject, androidPlatform: true);
final File registrant = flutterProject.directory
.childDirectory(fs.path.join('android', 'app', 'src', 'main', 'java', 'io', 'flutter', 'plugins'))
.childFile('GeneratedPluginRegistrant.java');
expect(registrant.existsSync(), isTrue);
expect(registrant.readAsStringSync(), contains('package io.flutter.plugins'));
expect(registrant.readAsStringSync(), contains('class GeneratedPluginRegistrant'));
expect(registrant.readAsStringSync(), contains('public static void registerWith(@NonNull FlutterEngine flutterEngine)'));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
// Issue: https://github.com/flutter/flutter/issues/47803
testUsingContext('exits the tool if a plugin sets an invalid android package in pubspec.yaml', () async {
androidProject.embeddingVersion = AndroidEmbeddingVersion.v1;
final Directory pluginDir = createPluginWithInvalidAndroidPackage();
await expectLater(
() async {
await injectPlugins(flutterProject, androidPlatform: true);
},
throwsToolExit(
message: "The plugin `plugin1` doesn't have a main class defined in "
'${pluginDir.path}/android/src/main/java/plugin1/invalid/UseNewEmbedding.java or '
'${pluginDir.path}/android/src/main/kotlin/plugin1/invalid/UseNewEmbedding.kt. '
"This is likely to due to an incorrect `androidPackage: plugin1.invalid` or `mainClass` entry in the plugin's pubspec.yaml.\n"
'If you are the author of this plugin, fix the `androidPackage` entry or move the main class to any of locations used above. '
'Otherwise, please contact the author of this plugin and consider using a different plugin in the meanwhile.',
),
);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
XcodeProjectInterpreter: () => xcodeProjectInterpreter,
});
testUsingContext('new embedding app uses a plugin that supports v1 and v2 embedding', () async {
androidProject.embeddingVersion = AndroidEmbeddingVersion.v2;
createDualSupportJavaPlugin4();
await injectPlugins(flutterProject, androidPlatform: true);
final File registrant = flutterProject.directory
.childDirectory(fs.path.join('android', 'app', 'src', 'main', 'java', 'io', 'flutter', 'plugins'))
.childFile('GeneratedPluginRegistrant.java');
expect(registrant.existsSync(), isTrue);
expect(registrant.readAsStringSync(), contains('package io.flutter.plugins'));
expect(registrant.readAsStringSync(), contains('class GeneratedPluginRegistrant'));
expect(registrant.readAsStringSync(),
contains('flutterEngine.getPlugins().add(new plugin4.UseBothEmbedding());'));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
XcodeProjectInterpreter: () => xcodeProjectInterpreter,
});
testUsingContext('Modules use new embedding', () async {
flutterProject.isModule = true;
androidProject.embeddingVersion = AndroidEmbeddingVersion.v2;
await injectPlugins(flutterProject, androidPlatform: true);
final File registrant = flutterProject.directory
.childDirectory(fs.path.join('android', 'app', 'src', 'main', 'java', 'io', 'flutter', 'plugins'))
.childFile('GeneratedPluginRegistrant.java');
expect(registrant.existsSync(), isTrue);
expect(registrant.readAsStringSync(), contains('package io.flutter.plugins'));
expect(registrant.readAsStringSync(), contains('class GeneratedPluginRegistrant'));
expect(registrant.readAsStringSync(), contains('public static void registerWith(@NonNull FlutterEngine flutterEngine)'));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Module using new plugin shows no warnings', () async {
flutterProject.isModule = true;
androidProject.embeddingVersion = AndroidEmbeddingVersion.v2;
createNewJavaPlugin1();
await injectPlugins(flutterProject, androidPlatform: true);
final File registrant = flutterProject.directory
.childDirectory(fs.path.join('android', 'app', 'src', 'main', 'java', 'io', 'flutter', 'plugins'))
.childFile('GeneratedPluginRegistrant.java');
expect(registrant.readAsStringSync(),
contains('flutterEngine.getPlugins().add(new plugin1.UseNewEmbedding());'));
expect(testLogger.errorText, isNot(contains('go/android-plugin-migration')));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
XcodeProjectInterpreter: () => xcodeProjectInterpreter,
});
testUsingContext('Module using plugin with v1 and v2 support shows no warning', () async {
flutterProject.isModule = true;
androidProject.embeddingVersion = AndroidEmbeddingVersion.v2;
createDualSupportJavaPlugin4();
await injectPlugins(flutterProject, androidPlatform: true);
final File registrant = flutterProject.directory
.childDirectory(fs.path.join('android', 'app', 'src', 'main', 'java', 'io', 'flutter', 'plugins'))
.childFile('GeneratedPluginRegistrant.java');
expect(registrant.readAsStringSync(),
contains('flutterEngine.getPlugins().add(new plugin4.UseBothEmbedding());'));
expect(testLogger.errorText, isNot(contains('go/android-plugin-migration')));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
XcodeProjectInterpreter: () => xcodeProjectInterpreter,
});
testUsingContext('App using plugin with v1 and v2 support shows no warning', () async {
flutterProject.isModule = false;
androidProject.embeddingVersion = AndroidEmbeddingVersion.v2;
createDualSupportJavaPlugin4();
await injectPlugins(flutterProject, androidPlatform: true);
final File registrant = flutterProject.directory
.childDirectory(fs.path.join('android', 'app', 'src', 'main', 'java', 'io', 'flutter', 'plugins'))
.childFile('GeneratedPluginRegistrant.java');
expect(registrant.readAsStringSync(),
contains('flutterEngine.getPlugins().add(new plugin4.UseBothEmbedding());'));
expect(testLogger.errorText, isNot(contains('go/android-plugin-migration')));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
XcodeProjectInterpreter: () => xcodeProjectInterpreter,
});
testUsingContext('Does not throw when AndroidManifest.xml is not found', () async {
final File manifest = fs.file('AndroidManifest.xml');
androidProject.appManifestFile = manifest;
await injectPlugins(flutterProject, androidPlatform: true);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext("Registrant for web doesn't escape slashes in imports", () async {
flutterProject.isModule = true;
final Directory webPluginWithNestedFile =
fs.systemTempDirectory.createTempSync('flutter_web_plugin_with_nested.');
webPluginWithNestedFile.childFile('pubspec.yaml').writeAsStringSync('''
flutter:
plugin:
platforms:
web:
pluginClass: WebPlugin
fileName: src/web_plugin.dart
''');
webPluginWithNestedFile
.childDirectory('lib')
.childDirectory('src')
.childFile('web_plugin.dart')
.createSync(recursive: true);
flutterProject.directory
.childFile('.packages')
.writeAsStringSync('''
web_plugin_with_nested:${webPluginWithNestedFile.childDirectory('lib').uri}
''');
final Directory destination = flutterProject.directory.childDirectory('lib');
await injectBuildTimePluginFiles(flutterProject, webPlatform: true, destination: destination);
final File registrant = flutterProject.directory
.childDirectory('lib')
.childFile('web_plugin_registrant.dart');
expect(registrant.existsSync(), isTrue);
expect(registrant.readAsStringSync(), contains("import 'package:web_plugin_with_nested/src/web_plugin.dart';"));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Injecting creates generated Android registrant, but does not include Dart-only plugins', () async {
// Create a plugin without a pluginClass.
final Directory pluginDirectory = createFakePlugin(fs);
pluginDirectory.childFile('pubspec.yaml').writeAsStringSync('''
flutter:
plugin:
platforms:
android:
dartPluginClass: SomePlugin
''');
await injectPlugins(flutterProject, androidPlatform: true);
final File registrantFile = androidProject.pluginRegistrantHost
.childDirectory(fs.path.join('src', 'main', 'java', 'io', 'flutter', 'plugins'))
.childFile('GeneratedPluginRegistrant.java');
expect(registrantFile, exists);
expect(registrantFile, isNot(contains('SomePlugin')));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Injecting creates generated iOS registrant, but does not include Dart-only plugins', () async {
flutterProject.isModule = true;
// Create a plugin without a pluginClass.
final Directory pluginDirectory = createFakePlugin(fs);
pluginDirectory.childFile('pubspec.yaml').writeAsStringSync('''
flutter:
plugin:
platforms:
ios:
dartPluginClass: SomePlugin
''');
await injectPlugins(flutterProject, iosPlatform: true);
final File registrantFile = iosProject.pluginRegistrantImplementation;
expect(registrantFile, exists);
expect(registrantFile, isNot(contains('SomePlugin')));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Injecting creates generated macos registrant, but does not include Dart-only plugins', () async {
flutterProject.isModule = true;
// Create a plugin without a pluginClass.
final Directory pluginDirectory = createFakePlugin(fs);
pluginDirectory.childFile('pubspec.yaml').writeAsStringSync('''
flutter:
plugin:
platforms:
macos:
dartPluginClass: SomePlugin
''');
await injectPlugins(flutterProject, macOSPlatform: true);
final File registrantFile = macosProject.managedDirectory.childFile('GeneratedPluginRegistrant.swift');
expect(registrantFile, exists);
expect(registrantFile, isNot(contains('SomePlugin')));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext("pluginClass: none doesn't trigger registrant entry on macOS", () async {
flutterProject.isModule = true;
// Create a plugin without a pluginClass.
final Directory pluginDirectory = createFakePlugin(fs);
pluginDirectory.childFile('pubspec.yaml').writeAsStringSync('''
flutter:
plugin:
platforms:
macos:
pluginClass: none
dartPluginClass: SomePlugin
''');
await injectPlugins(flutterProject, macOSPlatform: true);
final File registrantFile = macosProject.managedDirectory.childFile('GeneratedPluginRegistrant.swift');
expect(registrantFile, exists);
expect(registrantFile, isNot(contains('SomePlugin')));
expect(registrantFile, isNot(contains('none')));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Invalid yaml does not crash plugin lookup.', () async {
flutterProject.isModule = true;
// Create a plugin without a pluginClass.
final Directory pluginDirectory = createFakePlugin(fs);
pluginDirectory.childFile('pubspec.yaml').writeAsStringSync(r'''
"aws ... \"Branch\": $BITBUCKET_BRANCH, \"Date\": $(date +"%m-%d-%y"), \"Time\": $(date +"%T")}\"
''');
await injectPlugins(flutterProject, macOSPlatform: true);
final File registrantFile = macosProject.managedDirectory.childFile('GeneratedPluginRegistrant.swift');
expect(registrantFile, exists);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Injecting creates generated Linux registrant', () async {
createFakePlugin(fs);
await injectPlugins(flutterProject, linuxPlatform: true);
final File registrantHeader = linuxProject.managedDirectory.childFile('generated_plugin_registrant.h');
final File registrantImpl = linuxProject.managedDirectory.childFile('generated_plugin_registrant.cc');
expect(registrantHeader.existsSync(), isTrue);
expect(registrantImpl.existsSync(), isTrue);
expect(registrantImpl.readAsStringSync(), contains('some_plugin_register_with_registrar'));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Injecting creates generated Linux registrant, but does not include Dart-only plugins', () async {
// Create a plugin without a pluginClass.
final Directory pluginDirectory = createFakePlugin(fs);
pluginDirectory.childFile('pubspec.yaml').writeAsStringSync('''
flutter:
plugin:
platforms:
linux:
dartPluginClass: SomePlugin
''');
await injectPlugins(flutterProject, linuxPlatform: true);
final File registrantImpl = linuxProject.managedDirectory.childFile('generated_plugin_registrant.cc');
expect(registrantImpl, exists);
expect(registrantImpl, isNot(contains('SomePlugin')));
expect(registrantImpl, isNot(contains('some_plugin')));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext("pluginClass: none doesn't trigger registrant entry on Linux", () async {
// Create a plugin without a pluginClass.
final Directory pluginDirectory = createFakePlugin(fs);
pluginDirectory.childFile('pubspec.yaml').writeAsStringSync('''
flutter:
plugin:
platforms:
linux:
pluginClass: none
dartPluginClass: SomePlugin
''');
await injectPlugins(flutterProject, linuxPlatform: true);
final File registrantImpl = linuxProject.managedDirectory.childFile('generated_plugin_registrant.cc');
expect(registrantImpl, exists);
expect(registrantImpl, isNot(contains('SomePlugin')));
expect(registrantImpl, isNot(contains('none')));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Injecting creates generated Linux plugin Cmake file', () async {
createFakePlugin(fs);
await injectPlugins(flutterProject, linuxPlatform: true);
final File pluginMakefile = linuxProject.generatedPluginCmakeFile;
expect(pluginMakefile.existsSync(), isTrue);
final String contents = pluginMakefile.readAsStringSync();
expect(contents, contains('some_plugin'));
expect(contents, contains(r'target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)'));
expect(contents, contains(r'list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)'));
expect(contents, contains(r'list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})'));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Generated Linux plugin files sorts by plugin name', () async {
createFakePlugins(fs, <String>[
'plugin_d',
'plugin_a',
'/local_plugins/plugin_c',
'/local_plugins/plugin_b',
]);
await injectPlugins(flutterProject, linuxPlatform: true);
final File pluginCmakeFile = linuxProject.generatedPluginCmakeFile;
final File pluginRegistrant = linuxProject.managedDirectory.childFile('generated_plugin_registrant.cc');
for (final File file in <File>[pluginCmakeFile, pluginRegistrant]) {
final String contents = file.readAsStringSync();
expect(contents.indexOf('plugin_a'), lessThan(contents.indexOf('plugin_b')));
expect(contents.indexOf('plugin_b'), lessThan(contents.indexOf('plugin_c')));
expect(contents.indexOf('plugin_c'), lessThan(contents.indexOf('plugin_d')));
}
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Injecting creates generated Windows registrant', () async {
createFakePlugin(fs);
await injectPlugins(flutterProject, windowsPlatform: true);
final File registrantHeader = windowsProject.managedDirectory.childFile('generated_plugin_registrant.h');
final File registrantImpl = windowsProject.managedDirectory.childFile('generated_plugin_registrant.cc');
expect(registrantHeader.existsSync(), isTrue);
expect(registrantImpl.existsSync(), isTrue);
expect(registrantImpl.readAsStringSync(), contains('SomePluginRegisterWithRegistrar'));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Injecting creates generated Windows registrant, but does not include Dart-only plugins', () async {
// Create a plugin without a pluginClass.
final Directory pluginDirectory = createFakePlugin(fs);
pluginDirectory.childFile('pubspec.yaml').writeAsStringSync('''
flutter:
plugin:
platforms:
windows:
dartPluginClass: SomePlugin
''');
await injectPlugins(flutterProject, windowsPlatform: true);
final File registrantImpl = windowsProject.managedDirectory.childFile('generated_plugin_registrant.cc');
expect(registrantImpl, exists);
expect(registrantImpl, isNot(contains('SomePlugin')));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext("pluginClass: none doesn't trigger registrant entry on Windows", () async {
// Create a plugin without a pluginClass.
final Directory pluginDirectory = createFakePlugin(fs);
pluginDirectory.childFile('pubspec.yaml').writeAsStringSync('''
flutter:
plugin:
platforms:
windows:
pluginClass: none
dartPluginClass: SomePlugin
''');
await injectPlugins(flutterProject, windowsPlatform: true);
final File registrantImpl = windowsProject.managedDirectory.childFile('generated_plugin_registrant.cc');
expect(registrantImpl, exists);
expect(registrantImpl, isNot(contains('SomePlugin')));
expect(registrantImpl, isNot(contains('none')));
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Generated Windows plugin files sorts by plugin name', () async {
createFakePlugins(fs, <String>[
'plugin_d',
'plugin_a',
'/local_plugins/plugin_c',
'/local_plugins/plugin_b',
]);
await injectPlugins(flutterProject, windowsPlatform: true);
final File pluginCmakeFile = windowsProject.generatedPluginCmakeFile;
final File pluginRegistrant = windowsProject.managedDirectory.childFile('generated_plugin_registrant.cc');
for (final File file in <File>[pluginCmakeFile, pluginRegistrant]) {
final String contents = file.readAsStringSync();
expect(contents.indexOf('plugin_a'), lessThan(contents.indexOf('plugin_b')));
expect(contents.indexOf('plugin_b'), lessThan(contents.indexOf('plugin_c')));
expect(contents.indexOf('plugin_c'), lessThan(contents.indexOf('plugin_d')));
}
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Generated plugin CMake files always use posix-style paths', () async {
// Re-run the setup using the Windows filesystem.
setUpProject(fsWindows);
createFakePlugin(fsWindows);
await injectPlugins(flutterProject, linuxPlatform: true, windowsPlatform: true);
for (final CmakeBasedProject? project in <CmakeBasedProject?>[linuxProject, windowsProject]) {
final File pluginCmakefile = project!.generatedPluginCmakeFile;
expect(pluginCmakefile.existsSync(), isTrue);
final String contents = pluginCmakefile.readAsStringSync();
expect(contents, contains('add_subdirectory(flutter/ephemeral/.plugin_symlinks'));
}
}, overrides: <Type, Generator>{
FileSystem: () => fsWindows,
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('injectPlugins will validate if all plugins in the project are part of the passed allowedPlugins', () async {
// Re-run the setup using the Windows filesystem.
setUpProject(fsWindows);
createFakePlugins(fsWindows, const <String>['plugin_one', 'plugin_two']);
expect(
() => injectPlugins(
flutterProject,
linuxPlatform: true,
windowsPlatform: true,
allowedPlugins: PreviewDevice.supportedPubPlugins,
),
throwsToolExit(message: '''
The Flutter Preview device does not support the following plugins from your pubspec.yaml:
[plugin_one, plugin_two]
'''),
);
}, overrides: <Type, Generator>{
FileSystem: () => fsWindows,
ProcessManager: () => FakeProcessManager.empty(),
});
});
group('createPluginSymlinks', () {
FeatureFlags? featureFlags;
setUp(() {
featureFlags = TestFeatureFlags(isLinuxEnabled: true, isWindowsEnabled: true);
});
testUsingContext('Symlinks are created for Linux plugins', () async {
linuxProject.exists = true;
createFakePlugin(fs);
// refreshPluginsList should call createPluginSymlinks.
await refreshPluginsList(flutterProject);
expect(linuxProject.pluginSymlinkDirectory.childLink('some_plugin').existsSync(), true);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
FeatureFlags: () => featureFlags,
});
testUsingContext('Symlinks are created for Windows plugins', () async {
windowsProject.exists = true;
createFakePlugin(fs);
// refreshPluginsList should call createPluginSymlinks.
await refreshPluginsList(flutterProject);
expect(windowsProject.pluginSymlinkDirectory.childLink('some_plugin').existsSync(), true);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
FeatureFlags: () => featureFlags,
});
testUsingContext('Existing symlinks are removed when no longer in use with force', () {
linuxProject.exists = true;
windowsProject.exists = true;
final List<File> dummyFiles = <File>[
flutterProject.linux.pluginSymlinkDirectory.childFile('dummy'),
flutterProject.windows.pluginSymlinkDirectory.childFile('dummy'),
];
for (final File file in dummyFiles) {
file.createSync(recursive: true);
}
createPluginSymlinks(flutterProject, force: true);
for (final File file in dummyFiles) {
expect(file.existsSync(), false);
}
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
FeatureFlags: () => featureFlags,
});
testUsingContext('Existing symlinks are removed automatically on refresh when no longer in use', () async {
linuxProject.exists = true;
windowsProject.exists = true;
final List<File> dummyFiles = <File>[
flutterProject.linux.pluginSymlinkDirectory.childFile('dummy'),
flutterProject.windows.pluginSymlinkDirectory.childFile('dummy'),
];
for (final File file in dummyFiles) {
file.createSync(recursive: true);
}
// refreshPluginsList should remove existing links and recreate on changes.
createFakePlugin(fs);
await refreshPluginsList(flutterProject);
for (final File file in dummyFiles) {
expect(file.existsSync(), false);
}
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
FeatureFlags: () => featureFlags,
});
testUsingContext('createPluginSymlinks is a no-op without force when up to date', () {
linuxProject.exists = true;
windowsProject.exists = true;
final List<File> dummyFiles = <File>[
flutterProject.linux.pluginSymlinkDirectory.childFile('dummy'),
flutterProject.windows.pluginSymlinkDirectory.childFile('dummy'),
];
for (final File file in dummyFiles) {
file.createSync(recursive: true);
}
// Without force, this should do nothing to existing files.
createPluginSymlinks(flutterProject);
for (final File file in dummyFiles) {
expect(file.existsSync(), true);
}
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
FeatureFlags: () => featureFlags,
});
testUsingContext('createPluginSymlinks repairs missing links', () async {
linuxProject.exists = true;
windowsProject.exists = true;
createFakePlugin(fs);
await refreshPluginsList(flutterProject);
final List<Link> links = <Link>[
linuxProject.pluginSymlinkDirectory.childLink('some_plugin'),
windowsProject.pluginSymlinkDirectory.childLink('some_plugin'),
];
for (final Link link in links) {
link.deleteSync();
}
createPluginSymlinks(flutterProject);
for (final Link link in links) {
expect(link.existsSync(), true);
}
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
FeatureFlags: () => featureFlags,
});
});
group('pubspec', () {
late Directory projectDir;
late Directory tempDir;
setUp(() {
tempDir = globals.fs.systemTempDirectory.createTempSync('flutter_plugin_test.');
projectDir = tempDir.childDirectory('flutter_project');
});
tearDown(() {
tryToDelete(tempDir);
});
void createPubspecFile(String yamlString) {
projectDir.childFile('pubspec.yaml')..createSync(recursive: true)..writeAsStringSync(yamlString);
}
testUsingContext('validatePubspecForPlugin works', () async {
const String pluginYaml = '''
flutter:
plugin:
platforms:
ios:
pluginClass: SomePlugin
macos:
pluginClass: SomePlugin
windows:
pluginClass: SomePlugin
linux:
pluginClass: SomePlugin
web:
pluginClass: SomePlugin
fileName: lib/SomeFile.dart
android:
pluginClass: SomePlugin
package: AndroidPackage
''';
createPubspecFile(pluginYaml);
validatePubspecForPlugin(projectDir: projectDir.absolute.path, pluginClass: 'SomePlugin', expectedPlatforms: <String>[
'ios', 'macos', 'windows', 'linux', 'android', 'web',
], androidIdentifier: 'AndroidPackage', webFileName: 'lib/SomeFile.dart');
});
testUsingContext('createPlatformsYamlMap should create the correct map', () async {
final YamlMap map = Plugin.createPlatformsYamlMap(<String>['ios', 'android', 'linux'], 'PluginClass', 'some.android.package');
expect(map['ios'], <String, String> {
'pluginClass' : 'PluginClass',
});
expect(map['android'], <String, String> {
'pluginClass' : 'PluginClass',
'package': 'some.android.package',
});
expect(map['linux'], <String, String> {
'pluginClass' : 'PluginClass',
});
});
testUsingContext('createPlatformsYamlMap should create empty map', () async {
final YamlMap map = Plugin.createPlatformsYamlMap(<String>[], 'foo', 'bar');
expect(map.isEmpty, true);
});
});
testWithoutContext('Symlink failures give developer mode instructions on recent versions of Windows', () async {
final Platform platform = FakePlatform(operatingSystem: 'windows');
final FakeOperatingSystemUtils os = FakeOperatingSystemUtils('Microsoft Windows [Version 10.0.14972.1]');
const FileSystemException e = FileSystemException('', '', OSError('', 1314));
expect(
() => handleSymlinkException(
e,
platform: platform,
os: os,
source: pubCachePath,
destination: ephemeralPackagePath,
),
throwsToolExit(message: 'start ms-settings:developers'),
);
});
testWithoutContext('Symlink ERROR_ACCESS_DENIED failures show developers paths that were used', () async {
final Platform platform = FakePlatform(operatingSystem: 'windows');
final FakeOperatingSystemUtils os = FakeOperatingSystemUtils('Microsoft Windows [Version 10.0.14972.1]');
const FileSystemException e = FileSystemException('', '', OSError('', 5));
expect(
() => handleSymlinkException(
e,
platform: platform,
os: os,
source: pubCachePath,
destination: ephemeralPackagePath,
),
throwsToolExit(
message: 'ERROR_ACCESS_DENIED file system exception thrown while trying to create a symlink from $pubCachePath to $ephemeralPackagePath',
),
);
});
testWithoutContext('Symlink failures instruct developers to run as administrator on older versions of Windows', () async {
final Platform platform = FakePlatform(operatingSystem: 'windows');
final FakeOperatingSystemUtils os = FakeOperatingSystemUtils('Microsoft Windows [Version 10.0.14393]');
const FileSystemException e = FileSystemException('', '', OSError('', 1314));
expect(
() => handleSymlinkException(
e,
platform: platform,
os: os,
source: pubCachePath,
destination: ephemeralPackagePath,
),
throwsToolExit(message: 'administrator'),
);
});
testWithoutContext('Symlink failures instruct developers to have their project on the same drive as their SDK', () async {
final Platform platform = FakePlatform(operatingSystem: 'windows');
final FakeOperatingSystemUtils os = FakeOperatingSystemUtils('Microsoft Windows [Version 10.0.14972]');
const FileSystemException e = FileSystemException('', '', OSError('', 1));
expect(
() => handleSymlinkException(
e,
platform: platform,
os: os,
source: pubCachePath,
destination: ephemeralPackagePath,
),
throwsToolExit(message: 'Try moving your Flutter project to the same drive as your Flutter SDK'),
);
});
testWithoutContext('Symlink failures only give instructions for specific errors', () async {
final Platform platform = FakePlatform(operatingSystem: 'windows');
final FakeOperatingSystemUtils os = FakeOperatingSystemUtils('Microsoft Windows [Version 10.0.14393]');
const FileSystemException e = FileSystemException('', '', OSError('', 999));
expect(
() => handleSymlinkException(
e,
platform: platform,
os: os,
source: pubCachePath,
destination: ephemeralPackagePath,
),
returnsNormally,
);
});
});
}
class FakeFlutterManifest extends Fake implements FlutterManifest {
@override
Set<String> get dependencies => <String>{};
}
class FakeXcodeProjectInterpreter extends Fake implements XcodeProjectInterpreter {
@override
bool get isInstalled => false;
}
class FakeFlutterProject extends Fake implements FlutterProject {
@override
bool isModule = false;
@override
late FlutterManifest manifest;
@override
late Directory directory;
@override
late File flutterPluginsFile;
@override
late File flutterPluginsDependenciesFile;
@override
late IosProject ios;
@override
late AndroidProject android;
@override
late WebProject web;
@override
late MacOSProject macos;
@override
late LinuxProject linux;
@override
late WindowsProject windows;
}
class FakeMacOSProject extends Fake implements MacOSProject {
@override
String pluginConfigKey = 'macos';
bool exists = false;
@override
late File podfile;
@override
late File podManifestLock;
@override
late Directory managedDirectory;
@override
bool existsSync() => exists;
}
class FakeIosProject extends Fake implements IosProject {
@override
String pluginConfigKey = 'ios';
bool testExists = false;
@override
bool existsSync() => testExists;
@override
bool get exists => testExists;
@override
late Directory pluginRegistrantHost;
@override
File get pluginRegistrantHeader => pluginRegistrantHost.childFile('GeneratedPluginRegistrant.h');
@override
File get pluginRegistrantImplementation => pluginRegistrantHost.childFile('GeneratedPluginRegistrant.m');
@override
late File podfile;
@override
late File podManifestLock;
}
class FakeAndroidProject extends Fake implements AndroidProject {
@override
String pluginConfigKey = 'android';
bool exists = false;
@override
late Directory pluginRegistrantHost;
@override
late Directory hostAppGradleRoot;
@override
late File appManifestFile;
late AndroidEmbeddingVersion embeddingVersion;
@override
bool existsSync() => exists;
@override
AndroidEmbeddingVersion getEmbeddingVersion() {
return embeddingVersion;
}
@override
AndroidEmbeddingVersionResult computeEmbeddingVersion() {
return AndroidEmbeddingVersionResult(embeddingVersion, 'reasons for version');
}
}
class FakeWebProject extends Fake implements WebProject {
@override
String pluginConfigKey = 'web';
@override
late Directory libDirectory;
bool exists = false;
@override
bool existsSync() => exists;
}
class FakeWindowsProject extends Fake implements WindowsProject {
@override
String pluginConfigKey = 'windows';
@override
late Directory managedDirectory;
@override
late Directory ephemeralDirectory;
@override
late Directory pluginSymlinkDirectory;
@override
late File cmakeFile;
@override
late File generatedPluginCmakeFile;
bool exists = false;
@override
bool existsSync() => exists;
}
class FakeLinuxProject extends Fake implements LinuxProject {
@override
String pluginConfigKey = 'linux';
@override
late Directory managedDirectory;
@override
late Directory ephemeralDirectory;
@override
late Directory pluginSymlinkDirectory;
@override
late File cmakeFile;
@override
late File generatedPluginCmakeFile;
bool exists = false;
@override
bool existsSync() => exists;
}
class FakeOperatingSystemUtils extends Fake implements OperatingSystemUtils {
FakeOperatingSystemUtils(this.name);
@override
final String name;
}
class FakeSystemClock extends Fake implements SystemClock {
late DateTime currentTime;
@override
DateTime now() {
return currentTime;
}
}
| flutter/packages/flutter_tools/test/general.shard/plugins_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/plugins_test.dart",
"repo_id": "flutter",
"token_count": 23978
} | 840 |
// Copyright 2014 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.
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:dwds/dwds.dart';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/application_package.dart';
import 'package:flutter_tools/src/asset.dart';
import 'package:flutter_tools/src/base/dds.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/base/platform.dart';
import 'package:flutter_tools/src/base/time.dart';
import 'package:flutter_tools/src/build_info.dart';
import 'package:flutter_tools/src/build_system/tools/scene_importer.dart';
import 'package:flutter_tools/src/build_system/tools/shader_compiler.dart';
import 'package:flutter_tools/src/compile.dart';
import 'package:flutter_tools/src/devfs.dart';
import 'package:flutter_tools/src/device.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/isolated/devfs_web.dart';
import 'package:flutter_tools/src/isolated/resident_web_runner.dart';
import 'package:flutter_tools/src/project.dart';
import 'package:flutter_tools/src/reporting/reporting.dart';
import 'package:flutter_tools/src/resident_devtools_handler.dart';
import 'package:flutter_tools/src/resident_runner.dart';
import 'package:flutter_tools/src/vmservice.dart';
import 'package:flutter_tools/src/web/chrome.dart';
import 'package:flutter_tools/src/web/web_device.dart';
import 'package:package_config/package_config.dart';
import 'package:package_config/package_config_types.dart';
import 'package:test/fake.dart';
import 'package:unified_analytics/unified_analytics.dart';
import 'package:vm_service/vm_service.dart' as vm_service;
import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart';
import '../src/common.dart';
import '../src/context.dart';
import '../src/fake_process_manager.dart';
import '../src/fake_vm_services.dart';
import '../src/fakes.dart' as test_fakes;
const List<VmServiceExpectation> kAttachLogExpectations =
<VmServiceExpectation>[
FakeVmServiceRequest(
method: 'streamListen',
args: <String, Object>{
'streamId': 'Stdout',
},
),
FakeVmServiceRequest(
method: 'streamListen',
args: <String, Object>{
'streamId': 'Stderr',
},
),
];
const List<VmServiceExpectation> kAttachIsolateExpectations =
<VmServiceExpectation>[
FakeVmServiceRequest(method: 'streamListen', args: <String, Object>{
'streamId': 'Isolate',
}),
FakeVmServiceRequest(method: 'registerService', args: <String, Object>{
'service': kReloadSourcesServiceName,
'alias': kFlutterToolAlias,
}),
FakeVmServiceRequest(method: 'registerService', args: <String, Object>{
'service': kFlutterVersionServiceName,
'alias': kFlutterToolAlias,
}),
FakeVmServiceRequest(method: 'registerService', args: <String, Object>{
'service': kFlutterMemoryInfoServiceName,
'alias': kFlutterToolAlias,
}),
FakeVmServiceRequest(
method: 'streamListen',
args: <String, Object>{
'streamId': 'Extension',
},
),
];
const List<VmServiceExpectation> kAttachExpectations = <VmServiceExpectation>[
...kAttachLogExpectations,
...kAttachIsolateExpectations,
];
void main() {
late FakeDebugConnection debugConnection;
late FakeChromeDevice chromeDevice;
late FakeAppConnection appConnection;
late FakeFlutterDevice flutterDevice;
late FakeWebDevFS webDevFS;
late FakeResidentCompiler residentCompiler;
late FakeChromeConnection chromeConnection;
late FakeChromeTab chromeTab;
late FakeWebServerDevice webServerDevice;
late FakeDevice mockDevice;
late FakeVmServiceHost fakeVmServiceHost;
late FileSystem fileSystem;
late ProcessManager processManager;
late TestUsage testUsage;
late FakeAnalytics fakeAnalytics;
setUp(() {
testUsage = TestUsage();
fileSystem = MemoryFileSystem.test();
processManager = FakeProcessManager.any();
debugConnection = FakeDebugConnection();
mockDevice = FakeDevice();
appConnection = FakeAppConnection();
webDevFS = FakeWebDevFS();
residentCompiler = FakeResidentCompiler();
chromeDevice = FakeChromeDevice();
chromeConnection = FakeChromeConnection();
chromeTab = FakeChromeTab('index.html');
webServerDevice = FakeWebServerDevice();
flutterDevice = FakeFlutterDevice()
.._devFS = webDevFS
..device = mockDevice
..generator = residentCompiler;
fileSystem.file('.packages').writeAsStringSync('\n');
fakeAnalytics = getInitializedFakeAnalyticsInstance(
fs: fileSystem,
fakeFlutterVersion: test_fakes.FakeFlutterVersion(),
);
});
void setupMocks() {
fileSystem.file('pubspec.yaml').createSync();
fileSystem.file('lib/main.dart').createSync(recursive: true);
fileSystem.file('web/index.html').createSync(recursive: true);
webDevFS.report = UpdateFSReport(success: true);
debugConnection.fakeVmServiceHost = () => fakeVmServiceHost;
webDevFS.result = ConnectionResult(
appConnection,
debugConnection,
debugConnection.vmService,
);
debugConnection.uri = 'ws://127.0.0.1/abcd/';
chromeConnection.tabs.add(chromeTab);
}
testUsingContext(
'runner with web server device does not support debugging without --start-paused',
() {
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
flutterDevice.device = WebServerDevice(
logger: BufferLogger.test(),
);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
final ResidentRunner profileResidentWebRunner = ResidentWebRunner(
flutterDevice,
flutterProject:
FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
ipv6: true,
fileSystem: fileSystem,
logger: BufferLogger.test(),
usage: globals.flutterUsage,
analytics: globals.analytics,
systemClock: globals.systemClock,
);
expect(profileResidentWebRunner.debuggingEnabled, false);
flutterDevice.device = chromeDevice;
expect(residentWebRunner.debuggingEnabled, true);
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext(
'runner with web server device supports debugging with --start-paused',
() {
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
setupMocks();
flutterDevice.device = WebServerDevice(
logger: BufferLogger.test(),
);
final ResidentRunner profileResidentWebRunner = ResidentWebRunner(
flutterDevice,
flutterProject:
FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
debuggingOptions:
DebuggingOptions.enabled(BuildInfo.debug, startPaused: true),
ipv6: true,
fileSystem: fileSystem,
logger: BufferLogger.test(),
usage: globals.flutterUsage,
analytics: globals.analytics,
systemClock: globals.systemClock,
);
expect(profileResidentWebRunner.uri, webDevFS.baseUri);
expect(profileResidentWebRunner.debuggingEnabled, true);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('profile does not supportsServiceProtocol', () {
final ResidentRunner residentWebRunner = ResidentWebRunner(
flutterDevice,
flutterProject:
FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
ipv6: true,
fileSystem: fileSystem,
logger: BufferLogger.test(),
usage: globals.flutterUsage,
analytics: globals.analytics,
systemClock: globals.systemClock,
);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
flutterDevice.device = chromeDevice;
final ResidentRunner profileResidentWebRunner = ResidentWebRunner(
flutterDevice,
flutterProject:
FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
debuggingOptions: DebuggingOptions.enabled(BuildInfo.profile),
ipv6: true,
fileSystem: fileSystem,
logger: BufferLogger.test(),
usage: globals.flutterUsage,
analytics: globals.analytics,
systemClock: globals.systemClock,
);
expect(profileResidentWebRunner.supportsServiceProtocol, false);
expect(residentWebRunner.supportsServiceProtocol, true);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Can successfully run and connect to vmservice', () async {
final BufferLogger logger = BufferLogger.test();
final ResidentRunner residentWebRunner =
setUpResidentRunner(flutterDevice, logger: logger);
fakeVmServiceHost =
FakeVmServiceHost(requests: kAttachExpectations.toList());
setupMocks();
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
final DebugConnectionInfo debugConnectionInfo =
await connectionInfoCompleter.future;
expect(appConnection.ranMain, true);
expect(logger.statusText,
contains('Debug service listening on ws://127.0.0.1/abcd/'));
expect(debugConnectionInfo.wsUri.toString(), 'ws://127.0.0.1/abcd/');
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('WebRunner copies compiled app.dill to cache during startup',
() async {
final DebuggingOptions debuggingOptions = DebuggingOptions.enabled(
const BuildInfo(BuildMode.debug, null, treeShakeIcons: false),
);
final ResidentRunner residentWebRunner =
setUpResidentRunner(flutterDevice, debuggingOptions: debuggingOptions);
fakeVmServiceHost =
FakeVmServiceHost(requests: kAttachExpectations.toList());
setupMocks();
residentWebRunner.artifactDirectory
.childFile('app.dill')
.writeAsStringSync('ABC');
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
expect(
await fileSystem
.file(fileSystem.path.join('build', 'cache.dill'))
.readAsString(),
'ABC');
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext(
'WebRunner copies compiled app.dill to cache during startup with track-widget-creation',
() async {
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
fakeVmServiceHost =
FakeVmServiceHost(requests: kAttachExpectations.toList());
setupMocks();
residentWebRunner.artifactDirectory
.childFile('app.dill')
.writeAsStringSync('ABC');
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
expect(
await fileSystem
.file(fileSystem.path.join('build', 'cache.dill.track.dill'))
.readAsString(),
'ABC');
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
// Regression test for https://github.com/flutter/flutter/issues/60613
testUsingContext(
'ResidentWebRunner calls appFailedToStart if initial compilation fails',
() async {
fakeVmServiceHost =
FakeVmServiceHost(requests: kAttachExpectations.toList());
setupMocks();
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
fileSystem
.file(globals.fs.path.join('lib', 'main.dart'))
.createSync(recursive: true);
webDevFS.report = UpdateFSReport();
expect(await residentWebRunner.run(), 1);
// Completing this future ensures that the daemon can exit correctly.
expect(await residentWebRunner.waitForAppToFinish(), 1);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext(
'Can successfully run without an index.html including status warning',
() async {
final BufferLogger logger = BufferLogger.test();
fakeVmServiceHost =
FakeVmServiceHost(requests: kAttachExpectations.toList());
setupMocks();
fileSystem.directory('web').deleteSync(recursive: true);
final ResidentWebRunner residentWebRunner = ResidentWebRunner(
flutterDevice,
flutterProject:
FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
ipv6: true,
stayResident: false,
fileSystem: fileSystem,
logger: logger,
usage: globals.flutterUsage,
analytics: globals.analytics,
systemClock: globals.systemClock,
);
expect(await residentWebRunner.run(), 0);
expect(logger.statusText,
contains('This application is not configured to build on the web'));
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Can successfully run and disconnect with --no-resident',
() async {
fakeVmServiceHost =
FakeVmServiceHost(requests: kAttachExpectations.toList());
setupMocks();
final ResidentRunner residentWebRunner = ResidentWebRunner(
flutterDevice,
flutterProject:
FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
ipv6: true,
stayResident: false,
fileSystem: fileSystem,
logger: BufferLogger.test(),
usage: globals.flutterUsage,
analytics: globals.analytics,
systemClock: globals.systemClock,
);
expect(await residentWebRunner.run(), 0);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Listens to stdout and stderr streams before running main',
() async {
final BufferLogger logger = BufferLogger.test();
final ResidentRunner residentWebRunner =
setUpResidentRunner(flutterDevice, logger: logger);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[
...kAttachLogExpectations,
FakeVmServiceStreamResponse(
streamId: 'Stdout',
event: vm_service.Event(
timestamp: 0,
kind: vm_service.EventStreams.kStdout,
bytes: base64.encode(utf8.encode('THIS MESSAGE IS IMPORTANT'))),
),
FakeVmServiceStreamResponse(
streamId: 'Stderr',
event: vm_service.Event(
timestamp: 0,
kind: vm_service.EventStreams.kStderr,
bytes: base64.encode(utf8.encode('SO IS THIS'))),
),
...kAttachIsolateExpectations,
]);
setupMocks();
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
expect(logger.statusText, contains('THIS MESSAGE IS IMPORTANT'));
expect(logger.statusText, contains('SO IS THIS'));
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Listens to extension events with structured errors',
() async {
final ResidentRunner residentWebRunner =
setUpResidentRunner(flutterDevice, logger: testLogger);
final List<VmServiceExpectation> requests = <VmServiceExpectation>[
...kAttachExpectations,
// This is the first error message of a session.
FakeVmServiceStreamResponse(
streamId: 'Extension',
event: vm_service.Event(
timestamp: 0,
extensionKind: 'Flutter.Error',
extensionData: vm_service.ExtensionData.parse(<String, Object?>{
'errorsSinceReload': 0,
'renderedErrorText': 'first',
}),
kind: vm_service.EventStreams.kExtension,
),
),
// This is the second error message of a session.
FakeVmServiceStreamResponse(
streamId: 'Extension',
event: vm_service.Event(
timestamp: 0,
extensionKind: 'Flutter.Error',
extensionData: vm_service.ExtensionData.parse(<String, Object?>{
'errorsSinceReload': 1,
'renderedErrorText': 'second',
}),
kind: vm_service.EventStreams.kExtension,
),
),
// This is not Flutter.Error kind data, so it should not be logged, even though it has a renderedErrorText field.
FakeVmServiceStreamResponse(
streamId: 'Extension',
event: vm_service.Event(
timestamp: 0,
extensionKind: 'Other',
extensionData: vm_service.ExtensionData.parse(<String, Object?>{
'errorsSinceReload': 2,
'renderedErrorText': 'not an error',
}),
kind: vm_service.EventStreams.kExtension,
),
),
// This is the third error message of a session.
FakeVmServiceStreamResponse(
streamId: 'Extension',
event: vm_service.Event(
timestamp: 0,
extensionKind: 'Flutter.Error',
extensionData: vm_service.ExtensionData.parse(<String, Object?>{
'errorsSinceReload': 2,
'renderedErrorText': 'third',
}),
kind: vm_service.EventStreams.kExtension,
),
),
// This is bogus error data.
FakeVmServiceStreamResponse(
streamId: 'Extension',
event: vm_service.Event(
timestamp: 0,
extensionKind: 'Flutter.Error',
extensionData: vm_service.ExtensionData.parse(<String, Object?>{
'other': 'bad stuff',
}),
kind: vm_service.EventStreams.kExtension,
),
),
// Empty error text should not break anything.
FakeVmServiceStreamResponse(
streamId: 'Extension',
event: vm_service.Event(
timestamp: 0,
extensionKind: 'Flutter.Error',
extensionData: vm_service.ExtensionData.parse(<String, Object?>{
'test': 'data',
'renderedErrorText': '',
}),
kind: vm_service.EventStreams.kExtension,
),
),
// Messages without errorsSinceReload should act as if errorsSinceReload: 0
FakeVmServiceStreamResponse(
streamId: 'Extension',
event: vm_service.Event(
timestamp: 0,
extensionKind: 'Flutter.Error',
extensionData: vm_service.ExtensionData.parse(<String, Object?>{
'test': 'data',
'renderedErrorText': 'error text',
}),
kind: vm_service.EventStreams.kExtension,
),
),
// When adding things here, make sure the last one is supposed to output something
// to the statusLog, otherwise you won't be able to distinguish the absence of output
// due to it passing the test from absence due to it not running the test.
];
// We use requests below, so make a copy of it here (FakeVmServiceHost will
// clear its copy internally, which would affect our pumping below).
fakeVmServiceHost = FakeVmServiceHost(requests: requests.toList());
setupMocks();
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
assert(requests.length > 5, 'requests was modified');
for (final Object _ in requests) {
// pump the task queue once for each message
await null;
}
expect(testLogger.statusText,
'Launching lib/main.dart on FakeDevice in debug mode...\n'
'Waiting for connection from debug service on FakeDevice...\n'
'Debug service listening on ws://127.0.0.1/abcd/\n'
'\n'
'first\n'
'\n'
'second\n'
'third\n'
'\n'
'\n' // the empty message
'\n'
'\n'
'error text\n'
'\n'
);
expect(testLogger.errorText,
'Received an invalid Flutter.Error message from app: {other: bad stuff}\n'
);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Does not run main with --start-paused', () async {
final ResidentRunner residentWebRunner = ResidentWebRunner(
flutterDevice,
flutterProject:
FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
debuggingOptions:
DebuggingOptions.enabled(BuildInfo.debug, startPaused: true),
ipv6: true,
fileSystem: fileSystem,
logger: BufferLogger.test(),
usage: globals.flutterUsage,
analytics: globals.analytics,
systemClock: globals.systemClock,
);
fakeVmServiceHost =
FakeVmServiceHost(requests: kAttachExpectations.toList());
setupMocks();
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
expect(appConnection.ranMain, false);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Can hot reload after attaching', () async {
final BufferLogger logger = BufferLogger.test();
final ResidentRunner residentWebRunner = setUpResidentRunner(
flutterDevice,
logger: logger,
systemClock: SystemClock.fixed(DateTime(2001)),
);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[
...kAttachExpectations,
const FakeVmServiceRequest(
method: kHotRestartServiceName,
jsonResponse: <String, Object>{
'type': 'Success',
}),
const FakeVmServiceRequest(
method: 'streamListen',
args: <String, Object>{
'streamId': 'Isolate',
},
),
]);
setupMocks();
final TestChromiumLauncher chromiumLauncher = TestChromiumLauncher();
final FakeProcess process = FakeProcess();
final Chromium chrome =
Chromium(1, chromeConnection, chromiumLauncher: chromiumLauncher, process: process, logger: logger);
chromiumLauncher.setInstance(chrome);
flutterDevice.device = GoogleChromeDevice(
fileSystem: fileSystem,
chromiumLauncher: chromiumLauncher,
logger: BufferLogger.test(),
platform: FakePlatform(),
processManager: FakeProcessManager.any(),
);
webDevFS.report = UpdateFSReport(success: true);
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
final DebugConnectionInfo debugConnectionInfo =
await connectionInfoCompleter.future;
expect(debugConnectionInfo, isNotNull);
final OperationResult result = await residentWebRunner.restart();
expect(logger.statusText, contains('Restarted application in'));
expect(result.code, 0);
expect(webDevFS.mainUri.toString(), contains('entrypoint.dart'));
// ensure that analytics are sent.
expect(testUsage.events, <TestUsageEvent>[
TestUsageEvent('hot', 'restart',
parameters: CustomDimensions.fromMap(<String, String>{
'cd27': 'web-javascript',
'cd28': '',
'cd29': 'false',
'cd30': 'true',
'cd13': '0',
'cd48': 'false'
})),
]);
expect(
fakeAnalytics.sentEvents,
contains(
Event.hotRunnerInfo(
label: 'restart',
targetPlatform: 'web-javascript',
sdkName: '',
emulator: false,
fullRestart: true,
overallTimeInMs: 0,
),
),
);
expect(testUsage.timings, const <TestTimingEvent>[
TestTimingEvent('hot', 'web-incremental-restart', Duration.zero),
]);
expect(fakeAnalytics.sentEvents, contains(
Event.timing(
workflow: 'hot',
variableName: 'web-incremental-restart',
elapsedMilliseconds: 0,
),
));
}, overrides: <Type, Generator>{
Usage: () => testUsage,
Analytics: () => fakeAnalytics,
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Can hot restart after attaching', () async {
final BufferLogger logger = BufferLogger.test();
final ResidentRunner residentWebRunner = setUpResidentRunner(
flutterDevice,
logger: logger,
systemClock: SystemClock.fixed(DateTime(2001)),
);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[
...kAttachExpectations,
const FakeVmServiceRequest(
method: kHotRestartServiceName,
jsonResponse: <String, Object>{
'type': 'Success',
}),
]);
setupMocks();
final TestChromiumLauncher chromiumLauncher = TestChromiumLauncher();
final FakeProcess process = FakeProcess();
final Chromium chrome =
Chromium(1, chromeConnection, chromiumLauncher: chromiumLauncher, process: process, logger: logger);
chromiumLauncher.setInstance(chrome);
flutterDevice.device = GoogleChromeDevice(
fileSystem: fileSystem,
chromiumLauncher: chromiumLauncher,
logger: BufferLogger.test(),
platform: FakePlatform(),
processManager: FakeProcessManager.any(),
);
webDevFS.report = UpdateFSReport(success: true);
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
final OperationResult result =
await residentWebRunner.restart(fullRestart: true);
// Ensure that generated entrypoint is generated correctly.
expect(webDevFS.mainUri, isNotNull);
final String entrypointContents =
fileSystem.file(webDevFS.mainUri).readAsStringSync();
expect(entrypointContents, contains('// Flutter web bootstrap script'));
expect(entrypointContents, contains("import 'dart:ui_web' as ui_web;"));
expect(entrypointContents, contains('await ui_web.bootstrapEngine('));
expect(logger.statusText, contains('Restarted application in'));
expect(result.code, 0);
// ensure that analytics are sent.
expect(testUsage.events, <TestUsageEvent>[
TestUsageEvent('hot', 'restart',
parameters: CustomDimensions.fromMap(<String, String>{
'cd27': 'web-javascript',
'cd28': '',
'cd29': 'false',
'cd30': 'true',
'cd13': '0',
'cd48': 'false'
})),
]);
expect(
fakeAnalytics.sentEvents,
contains(
Event.hotRunnerInfo(
label: 'restart',
targetPlatform: 'web-javascript',
sdkName: '',
emulator: false,
fullRestart: true,
overallTimeInMs: 0,
),
),
);
expect(testUsage.timings, const <TestTimingEvent>[
TestTimingEvent('hot', 'web-incremental-restart', Duration.zero),
]);
expect(fakeAnalytics.sentEvents, contains(
Event.timing(
workflow: 'hot',
variableName: 'web-incremental-restart',
elapsedMilliseconds: 0,
),
));
}, overrides: <Type, Generator>{
Usage: () => testUsage,
Analytics: () => fakeAnalytics,
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Can hot restart after attaching with web-server device',
() async {
final BufferLogger logger = BufferLogger.test();
final ResidentRunner residentWebRunner = setUpResidentRunner(
flutterDevice,
logger: logger,
systemClock: SystemClock.fixed(DateTime(2001)),
);
fakeVmServiceHost = FakeVmServiceHost(requests: kAttachExpectations);
setupMocks();
flutterDevice.device = webServerDevice;
webDevFS.report = UpdateFSReport(success: true);
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
final OperationResult result =
await residentWebRunner.restart(fullRestart: true);
expect(logger.statusText, contains('Restarted application in'));
expect(result.code, 0);
// web-server device does not send restart analytics
expect(testUsage.events, isEmpty);
expect(fakeAnalytics.sentEvents, isEmpty);
expect(testUsage.timings, isEmpty);
}, overrides: <Type, Generator>{
Usage: () => testUsage,
Analytics: () => fakeAnalytics,
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('web resident runner is debuggable', () {
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
fakeVmServiceHost =
FakeVmServiceHost(requests: kAttachExpectations.toList());
expect(residentWebRunner.debuggingEnabled, true);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Exits when initial compile fails', () async {
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
setupMocks();
webDevFS.report = UpdateFSReport();
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
expect(await residentWebRunner.run(), 1);
expect(testUsage.events, isEmpty);
expect(fakeAnalytics.sentEvents, isEmpty);
expect(testUsage.timings, isEmpty);
}, overrides: <Type, Generator>{
Usage: () => testUsage,
Analytics: () => fakeAnalytics,
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext(
'Faithfully displays stdout messages with leading/trailing spaces',
() async {
final BufferLogger logger = BufferLogger.test();
final ResidentRunner residentWebRunner =
setUpResidentRunner(flutterDevice, logger: logger);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[
...kAttachLogExpectations,
FakeVmServiceStreamResponse(
streamId: 'Stdout',
event: vm_service.Event(
timestamp: 0,
kind: vm_service.EventStreams.kStdout,
bytes: base64.encode(
utf8.encode(
' This is a message with 4 leading and trailing spaces '),
),
),
),
...kAttachIsolateExpectations,
]);
setupMocks();
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
expect(
logger.statusText,
contains(
' This is a message with 4 leading and trailing spaces '));
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Fails on compilation errors in hot restart', () async {
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
fakeVmServiceHost =
FakeVmServiceHost(requests: kAttachExpectations.toList());
setupMocks();
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
webDevFS.report = UpdateFSReport();
final OperationResult result =
await residentWebRunner.restart(fullRestart: true);
expect(result.code, 1);
expect(result.message, contains('Failed to recompile application.'));
expect(testUsage.events, isEmpty);
expect(fakeAnalytics.sentEvents, isEmpty);
expect(testUsage.timings, isEmpty);
}, overrides: <Type, Generator>{
Usage: () => testUsage,
Analytics: () => fakeAnalytics,
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext(
'Fails non-fatally on vmservice response error for hot restart',
() async {
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[
...kAttachExpectations,
const FakeVmServiceRequest(
method: kHotRestartServiceName,
jsonResponse: <String, Object>{
'type': 'Failed',
},
),
]);
setupMocks();
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
final OperationResult result = await residentWebRunner.restart();
expect(result.code, 0);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Fails fatally on Vm Service error response', () async {
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[
...kAttachExpectations,
const FakeVmServiceRequest(
method: kHotRestartServiceName,
// Failed response,
error: FakeRPCError(code: RPCErrorCodes.kInternalError),
),
]);
setupMocks();
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
final OperationResult result = await residentWebRunner.restart();
expect(result.code, 1);
expect(result.message, contains(RPCErrorCodes.kInternalError.toString()));
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('printHelp without details shows hot restart help message',
() async {
final BufferLogger logger = BufferLogger.test();
final ResidentRunner residentWebRunner =
setUpResidentRunner(flutterDevice, logger: logger);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
residentWebRunner.printHelp(details: false);
expect(logger.statusText, contains('To hot restart changes'));
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('cleanup of resources is safe to call multiple times',
() async {
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
mockDevice.dds = DartDevelopmentService();
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[
...kAttachExpectations,
]);
setupMocks();
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
await residentWebRunner.exit();
await residentWebRunner.exit();
expect(debugConnection.didClose, false);
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('cleans up Chrome if tab is closed', () async {
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[
...kAttachExpectations,
]);
setupMocks();
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
final Future<int?> result = residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
);
await connectionInfoCompleter.future;
debugConnection.completer.complete();
await result;
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Prints target and device name on run', () async {
final BufferLogger logger = BufferLogger.test();
final ResidentRunner residentWebRunner =
setUpResidentRunner(flutterDevice, logger: logger);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[
...kAttachExpectations,
]);
setupMocks();
mockDevice.name = 'Chromez';
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
expect(
logger.statusText,
contains(
'Launching ${fileSystem.path.join('lib', 'main.dart')} on '
'Chromez in debug mode',
));
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Sends launched app.webLaunchUrl event for Chrome device',
() async {
final BufferLogger logger = BufferLogger.test();
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[
...kAttachLogExpectations,
...kAttachIsolateExpectations,
]);
setupMocks();
final FakeChromeConnection chromeConnection = FakeChromeConnection();
final TestChromiumLauncher chromiumLauncher = TestChromiumLauncher();
final FakeProcess process = FakeProcess();
final Chromium chrome =
Chromium(1, chromeConnection, chromiumLauncher: chromiumLauncher, process: process, logger: logger);
chromiumLauncher.setInstance(chrome);
flutterDevice.device = GoogleChromeDevice(
fileSystem: fileSystem,
chromiumLauncher: chromiumLauncher,
logger: logger,
platform: FakePlatform(),
processManager: FakeProcessManager.any(),
);
webDevFS.baseUri = Uri.parse('http://localhost:8765/app/');
final FakeChromeTab chromeTab = FakeChromeTab('index.html');
chromeConnection.tabs.add(chromeTab);
final ResidentWebRunner runner = ResidentWebRunner(
flutterDevice,
flutterProject:
FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
ipv6: true,
fileSystem: fileSystem,
logger: logger,
usage: globals.flutterUsage,
analytics: globals.analytics,
systemClock: globals.systemClock,
);
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(runner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
// Ensure we got the URL and that it was already launched.
expect(
logger.eventText,
contains(json.encode(
<String, Object>{
'name': 'app.webLaunchUrl',
'args': <String, Object>{
'url': 'http://localhost:8765/app/',
'launched': true,
},
},
)));
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext(
'Sends unlaunched app.webLaunchUrl event for Web Server device',
() async {
final BufferLogger logger = BufferLogger.test();
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
setupMocks();
flutterDevice.device = WebServerDevice(
logger: logger,
);
webDevFS.baseUri = Uri.parse('http://localhost:8765/app/');
final ResidentWebRunner runner = ResidentWebRunner(
flutterDevice,
flutterProject:
FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
ipv6: true,
fileSystem: fileSystem,
logger: logger,
usage: globals.flutterUsage,
analytics: globals.analytics,
systemClock: globals.systemClock,
);
final Completer<DebugConnectionInfo> connectionInfoCompleter =
Completer<DebugConnectionInfo>();
unawaited(runner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
await connectionInfoCompleter.future;
// Ensure we got the URL and that it was not already launched.
expect(
logger.eventText,
contains(json.encode(
<String, Object>{
'name': 'app.webLaunchUrl',
'args': <String, Object>{
'url': 'http://localhost:8765/app/',
'launched': false,
},
},
)));
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('ResidentWebRunner generates files when l10n.yaml exists', () async {
fakeVmServiceHost =
FakeVmServiceHost(requests: kAttachExpectations.toList());
setupMocks();
final ResidentRunner residentWebRunner = ResidentWebRunner(
flutterDevice,
flutterProject:
FlutterProject.fromDirectoryTest(fileSystem.currentDirectory),
debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
ipv6: true,
stayResident: false,
fileSystem: fileSystem,
logger: BufferLogger.test(),
usage: globals.flutterUsage,
analytics: globals.analytics,
systemClock: globals.systemClock,
);
// Create necessary files.
globals.fs.file(globals.fs.path.join('lib', 'main.dart'))
.createSync(recursive: true);
globals.fs.file(globals.fs.path.join('lib', 'l10n', 'app_en.arb'))
..createSync(recursive: true)
..writeAsStringSync('''
{
"helloWorld": "Hello, World!",
"@helloWorld": {
"description": "Sample description"
}
}''');
globals.fs.file('l10n.yaml').createSync();
globals.fs.file('pubspec.yaml').writeAsStringSync('''
flutter:
generate: true
''');
globals.fs.directory('.dart_tool')
.childFile('package_config.json')
..createSync(recursive: true)
..writeAsStringSync('''
{
"configVersion": 2,
"packages": [
{
"name": "path_provider_linux",
"rootUri": "../../../path_provider_linux",
"packageUri": "lib/",
"languageVersion": "2.12"
}
]
}
''');
expect(await residentWebRunner.run(), 0);
final File generatedLocalizationsFile = globals.fs.directory('.dart_tool')
.childDirectory('flutter_gen')
.childDirectory('gen_l10n')
.childFile('app_localizations.dart');
expect(generatedLocalizationsFile.existsSync(), isTrue);
// Completing this future ensures that the daemon can exit correctly.
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
// While this file should be ignored on web, generating it here will cause a
// perf regression in hot restart.
testUsingContext('Does not generate dart_plugin_registrant.dart', () async {
// Create necessary files for [DartPluginRegistrantTarget]
final File packageConfig =
globals.fs.directory('.dart_tool').childFile('package_config.json');
packageConfig.createSync(recursive: true);
packageConfig.writeAsStringSync('''
{
"configVersion": 2,
"packages": [
{
"name": "path_provider_linux",
"rootUri": "../../../path_provider_linux",
"packageUri": "lib/",
"languageVersion": "2.12"
}
]
}
''');
// Start with a dart_plugin_registrant.dart file.
globals.fs
.directory('.dart_tool')
.childDirectory('flutter_build')
.childFile('dart_plugin_registrant.dart')
.createSync(recursive: true);
final FlutterProject project =
FlutterProject.fromDirectoryTest(fileSystem.currentDirectory);
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
await residentWebRunner.runSourceGenerators();
// dart_plugin_registrant.dart should be untouched, indicating that its
// generation didn't run. If it had run, the file would have been removed as
// there are no plugins in the project.
expect(project.dartPluginRegistrant.existsSync(), true);
expect(project.dartPluginRegistrant.readAsStringSync(), '');
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Successfully turns WebSocketException into ToolExit',
() async {
final BufferLogger logger = BufferLogger.test();
final ResidentRunner residentWebRunner =
setUpResidentRunner(flutterDevice, logger: logger);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
setupMocks();
webDevFS.exception = const WebSocketException();
await expectLater(residentWebRunner.run, throwsToolExit());
expect(logger.errorText, contains('WebSocketException'));
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Successfully turns AppConnectionException into ToolExit',
() async {
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
setupMocks();
webDevFS.exception = AppConnectionException('');
await expectLater(residentWebRunner.run, throwsToolExit());
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Successfully turns ChromeDebugError into ToolExit',
() async {
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
setupMocks();
webDevFS.exception = ChromeDebugException(<String, Object?>{
'text': 'error',
});
await expectLater(residentWebRunner.run, throwsToolExit());
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Rethrows unknown Exception type from dwds', () async {
final ResidentRunner residentWebRunner = setUpResidentRunner(flutterDevice);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
setupMocks();
webDevFS.exception = Exception();
await expectLater(residentWebRunner.run, throwsException);
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('Rethrows unknown Error type from dwds tooling', () async {
final BufferLogger logger = BufferLogger.test();
final ResidentRunner residentWebRunner =
setUpResidentRunner(flutterDevice, logger: logger);
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
setupMocks();
webDevFS.exception = StateError('');
await expectLater(residentWebRunner.run, throwsStateError);
expect(fakeVmServiceHost.hasRemainingExpectations, false);
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
testUsingContext('throws when port is an integer outside the valid TCP range', () async {
final BufferLogger logger = BufferLogger.test();
DebuggingOptions debuggingOptions = DebuggingOptions.enabled(BuildInfo.debug, port: '65536');
ResidentRunner residentWebRunner =
setUpResidentRunner(flutterDevice, logger: logger, debuggingOptions: debuggingOptions);
await expectToolExitLater(residentWebRunner.run(), matches('Invalid port: 65536.*'));
debuggingOptions = DebuggingOptions.enabled(BuildInfo.debug, port: '-1');
residentWebRunner =
setUpResidentRunner(flutterDevice, logger: logger, debuggingOptions: debuggingOptions);
await expectToolExitLater(residentWebRunner.run(), matches('Invalid port: -1.*'));
}, overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,
});
}
ResidentRunner setUpResidentRunner(
FlutterDevice flutterDevice, {
Logger? logger,
SystemClock? systemClock,
DebuggingOptions? debuggingOptions,
}) {
return ResidentWebRunner(
flutterDevice,
flutterProject:
FlutterProject.fromDirectoryTest(globals.fs.currentDirectory),
debuggingOptions:
debuggingOptions ?? DebuggingOptions.enabled(BuildInfo.debug),
ipv6: true,
usage: globals.flutterUsage,
analytics: globals.analytics,
systemClock: systemClock ?? SystemClock.fixed(DateTime.now()),
fileSystem: globals.fs,
logger: logger ?? BufferLogger.test(),
devtoolsHandler: createNoOpHandler,
);
}
class FakeWebServerDevice extends FakeDevice implements WebServerDevice {}
class FakeDevice extends Fake implements Device {
@override
String name = 'FakeDevice';
int count = 0;
@override
Future<String> get sdkNameAndVersion async => 'SDK Name and Version';
@override
late DartDevelopmentService dds;
@override
Future<LaunchResult> startApp(
ApplicationPackage? package, {
String? mainPath,
String? route,
DebuggingOptions? debuggingOptions,
Map<String, dynamic>? platformArgs,
bool prebuiltApplication = false,
bool ipv6 = false,
String? userIdentifier,
}) async {
return LaunchResult.succeeded();
}
@override
Future<bool> stopApp(
ApplicationPackage? app, {
String? userIdentifier,
}) async {
if (count > 0) {
throw StateError('stopApp called more than once.');
}
count += 1;
return true;
}
}
class FakeDebugConnection extends Fake implements DebugConnection {
late FakeVmServiceHost Function() fakeVmServiceHost;
@override
vm_service.VmService get vmService =>
fakeVmServiceHost.call().vmService.service;
@override
late String uri;
final Completer<void> completer = Completer<void>();
bool didClose = false;
@override
Future<void> get onDone => completer.future;
@override
Future<void> close() async {
didClose = true;
}
}
class FakeAppConnection extends Fake implements AppConnection {
bool ranMain = false;
@override
void runMain() {
ranMain = true;
}
}
class FakeChromeDevice extends Fake implements ChromiumDevice {}
class FakeWipDebugger extends Fake implements WipDebugger {}
class FakeResidentCompiler extends Fake implements ResidentCompiler {
@override
Future<CompilerOutput> recompile(
Uri mainUri,
List<Uri>? invalidatedFiles, {
required String outputPath,
required PackageConfig packageConfig,
required FileSystem fs,
String? projectRootPath,
bool suppressErrors = false,
bool checkDartPluginRegistry = false,
File? dartPluginRegistrant,
Uri? nativeAssetsYaml,
}) async {
return const CompilerOutput('foo.dill', 0, <Uri>[]);
}
@override
void accept() {}
@override
void reset() {}
@override
Future<CompilerOutput> reject() async {
return const CompilerOutput('foo.dill', 0, <Uri>[]);
}
@override
void addFileSystemRoot(String root) {}
}
class FakeWebDevFS extends Fake implements WebDevFS {
Object? exception;
ConnectionResult? result;
late UpdateFSReport report;
Uri? mainUri;
@override
List<Uri> sources = <Uri>[];
@override
Uri baseUri = Uri.parse('http://localhost:12345');
@override
DateTime? lastCompiled = DateTime.now();
@override
PackageConfig? lastPackageConfig = PackageConfig.empty;
@override
Future<Uri> create() async {
return baseUri;
}
@override
Future<UpdateFSReport> update({
required Uri mainUri,
required ResidentCompiler generator,
required bool trackWidgetCreation,
required String pathToReload,
required List<Uri> invalidatedFiles,
required PackageConfig packageConfig,
required String dillOutputPath,
required DevelopmentShaderCompiler shaderCompiler,
DevelopmentSceneImporter? sceneImporter,
DevFSWriter? devFSWriter,
String? target,
AssetBundle? bundle,
bool bundleFirstUpload = false,
bool fullRestart = false,
String? projectRootPath,
File? dartPluginRegistrant,
}) async {
this.mainUri = mainUri;
return report;
}
@override
Future<ConnectionResult?> connect(bool useDebugExtension, {VmServiceFactory vmServiceFactory = createVmServiceDelegate}) async {
if (exception != null) {
assert(exception is Exception || exception is Error);
// ignore: only_throw_errors, exception is either Error or Exception here.
throw exception!;
}
return result;
}
}
class FakeChromeConnection extends Fake implements ChromeConnection {
final List<ChromeTab> tabs = <ChromeTab>[];
@override
Future<ChromeTab> getTab(bool Function(ChromeTab tab) accept,
{Duration? retryFor}) async {
return tabs.firstWhere(accept);
}
@override
Future<List<ChromeTab>> getTabs({Duration? retryFor}) async {
return tabs;
}
}
class FakeChromeTab extends Fake implements ChromeTab {
FakeChromeTab(this.url);
@override
final String url;
final FakeWipConnection connection = FakeWipConnection();
@override
Future<WipConnection> connect({Function? onError}) async {
return connection;
}
}
class FakeWipConnection extends Fake implements WipConnection {
@override
final WipDebugger debugger = FakeWipDebugger();
}
/// A test implementation of the [ChromiumLauncher] that launches a fixed instance.
class TestChromiumLauncher implements ChromiumLauncher {
TestChromiumLauncher();
bool _hasInstance = false;
void setInstance(Chromium chromium) {
_hasInstance = true;
currentCompleter.complete(chromium);
}
@override
Completer<Chromium> currentCompleter = Completer<Chromium>();
@override
bool canFindExecutable() {
return true;
}
@override
Future<Chromium> get connectedInstance => currentCompleter.future;
@override
String findExecutable() {
return 'chrome';
}
@override
bool get hasChromeInstance => _hasInstance;
@override
Future<Chromium> launch(
String url, {
bool headless = false,
int? debugPort,
bool skipCheck = false,
Directory? cacheDir,
List<String> webBrowserFlags = const <String>[],
}) async {
return currentCompleter.future;
}
@override
Future<Chromium> connect(Chromium chrome, bool skipCheck) {
return currentCompleter.future;
}
}
class FakeFlutterDevice extends Fake implements FlutterDevice {
Uri? testUri;
UpdateFSReport report = UpdateFSReport(
success: true,
invalidatedSourcesCount: 1,
);
Exception? reportError;
@override
ResidentCompiler? generator;
@override
Stream<Uri?> get vmServiceUris => Stream<Uri?>.value(testUri);
@override
DevelopmentShaderCompiler get developmentShaderCompiler => const FakeShaderCompiler();
@override
FlutterVmService? vmService;
DevFS? _devFS;
@override
DevFS? get devFS => _devFS;
@override
set devFS(DevFS? value) {}
@override
Device? device;
@override
Future<void> stopEchoingDeviceLog() async {}
@override
Future<void> initLogReader() async {}
@override
Future<Uri?> setupDevFS(String fsName, Directory rootDirectory) async {
return testUri;
}
@override
Future<void> exitApps(
{Duration timeoutDelay = const Duration(seconds: 10)}) async {}
@override
Future<void> connect({
ReloadSources? reloadSources,
Restart? restart,
CompileExpression? compileExpression,
GetSkSLMethod? getSkSLMethod,
FlutterProject? flutterProject,
PrintStructuredErrorLogMethod? printStructuredErrorLogMethod,
int? hostVmServicePort,
int? ddsPort,
bool disableServiceAuthCodes = false,
bool enableDds = true,
bool cacheStartupProfile = false,
required bool allowExistingDdsInstance,
bool? ipv6 = false,
}) async {}
@override
Future<UpdateFSReport> updateDevFS({
Uri? mainUri,
String? target,
AssetBundle? bundle,
bool bundleFirstUpload = false,
bool bundleDirty = false,
bool fullRestart = false,
String? projectRootPath,
String? pathToReload,
String? dillOutputPath,
List<Uri>? invalidatedFiles,
PackageConfig? packageConfig,
File? dartPluginRegistrant,
}) async {
if (reportError != null) {
throw reportError!;
}
return report;
}
@override
Future<void> updateReloadStatus(bool wasReloadSuccessful) async {}
}
class FakeShaderCompiler implements DevelopmentShaderCompiler {
const FakeShaderCompiler();
@override
void configureCompiler(TargetPlatform? platform) { }
@override
Future<DevFSContent> recompileShader(DevFSContent inputShader) {
throw UnimplementedError();
}
}
| flutter/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/resident_web_runner_test.dart",
"repo_id": "flutter",
"token_count": 21341
} | 841 |
// Copyright 2014 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.
import 'package:flutter_tools/src/base/time.dart';
import '../src/common.dart';
void main() {
group(SystemClock, () {
test('can set a fixed time', () {
final SystemClock clock = SystemClock.fixed(DateTime(1991, 8, 23));
expect(clock.now(), DateTime(1991, 8, 23));
});
test('can find a time ago', () {
final SystemClock clock = SystemClock.fixed(DateTime(1991, 8, 23));
expect(clock.ago(const Duration(days: 10)), DateTime(1991, 8, 13));
});
});
group('formatting', () {
test('can round-trip formatted time', () {
final DateTime time = DateTime(1991, 7, 31);
expect(time.isUtc, isFalse);
// formatDateTime() adds a timezone offset to DateTime.toString().
final String formattedTime = formatDateTime(time);
// If a date time string has a timezone offset, DateTime.tryParse()
// converts the parsed time to UTC.
final DateTime? parsedTime = DateTime.tryParse(formattedTime);
expect(parsedTime, isNotNull);
expect(parsedTime!.isUtc, isTrue);
// Convert the parsed time (which should be utc) to the local timezone and
// compare against the original time which is in the local timezone. They
// should be the same.
expect(parsedTime.toLocal(), equals(time));
});
});
}
| flutter/packages/flutter_tools/test/general.shard/time_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/time_test.dart",
"repo_id": "flutter",
"token_count": 516
} | 842 |
// Copyright 2014 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.
import 'dart:convert';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/web/memory_fs.dart';
import '../../src/common.dart';
void main() {
testWithoutContext('correctly parses source, source map, metadata, manifest files', () {
final MemoryFileSystem fileSystem = MemoryFileSystem();
final File source = fileSystem.file('source')
..writeAsStringSync('main() {}');
final File sourcemap = fileSystem.file('sourcemap')
..writeAsStringSync('{}');
final File metadata = fileSystem.file('metadata')
..writeAsStringSync('{}');
final File manifest = fileSystem.file('manifest')
..writeAsStringSync(json.encode(<String, Object>{
'/foo.js': <String, Object>{
'code': <int>[0, source.lengthSync()],
'sourcemap': <int>[0, 2],
'metadata': <int>[0, 2],
},
}));
final WebMemoryFS webMemoryFS = WebMemoryFS();
webMemoryFS.write(source, manifest, sourcemap, metadata);
expect(utf8.decode(webMemoryFS.files['foo.js']!), 'main() {}');
expect(utf8.decode(webMemoryFS.sourcemaps['foo.js.map']!), '{}');
expect(utf8.decode(webMemoryFS.metadataFiles['foo.js.metadata']!), '{}');
expect(webMemoryFS.mergedMetadata, '{}');
});
}
| flutter/packages/flutter_tools/test/general.shard/web/memory_fs_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/web/memory_fs_test.dart",
"repo_id": "flutter",
"token_count": 543
} | 843 |
// Copyright 2014 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.
import 'package:flutter_tools/src/base/io.dart';
import 'package:flutter_tools/src/base/os.dart';
import 'package:flutter_tools/src/doctor_validator.dart';
import 'package:flutter_tools/src/windows/windows_version_validator.dart';
import 'package:test/fake.dart';
import '../src/common.dart';
/// Fake [_WindowsUtils] to use for testing
class FakeValidOperatingSystemUtils extends Fake
implements OperatingSystemUtils {
FakeValidOperatingSystemUtils(
[this.name = 'Microsoft Windows [Version 11.0.22621.963]']);
@override
final String name;
}
class FakeProcessLister extends Fake implements ProcessLister {
FakeProcessLister({required this.result, this.exitCode = 0});
final String result;
final int exitCode;
@override
Future<ProcessResult> getProcessesWithPath() async {
return ProcessResult(0, exitCode, result, null);
}
}
FakeProcessLister ofdRunning() {
return FakeProcessLister(result: r'Path: "C:\Program Files\Topaz OFD\Warsaw\core.exe"');
}
FakeProcessLister ofdNotRunning() {
return FakeProcessLister(result: r'Path: "C:\Program Files\Google\Chrome\Application\chrome.exe');
}
FakeProcessLister failure() {
return FakeProcessLister(result: r'Path: "C:\Program Files\Google\Chrome\Application\chrome.exe', exitCode: 10);
}
/// The expected validation result object for
/// a passing windows version test
const ValidationResult validWindows10ValidationResult = ValidationResult(
ValidationType.success,
<ValidationMessage>[],
statusInfo: 'Installed version of Windows is version 10 or higher',
);
/// The expected validation result object for
/// a passing windows version test
const ValidationResult invalidWindowsValidationResult = ValidationResult(
ValidationType.missing,
<ValidationMessage>[],
statusInfo: 'Unable to confirm if installed Windows version is 10 or greater',
);
const ValidationResult ofdFoundRunning = ValidationResult(
ValidationType.partial,
<ValidationMessage>[
ValidationMessage.hint(
'The Topaz OFD Security Module was detected on your machine. '
'You may need to disable it to build Flutter applications.',
),
],
statusInfo: 'Problem detected with Windows installation',
);
const ValidationResult getProcessFailed = ValidationResult(
ValidationType.partial,
<ValidationMessage>[
ValidationMessage.hint('Get-Process failed to complete'),
],
statusInfo: 'Problem detected with Windows installation',
);
void main() {
testWithoutContext('Successfully running windows version check on windows 10',
() async {
final WindowsVersionValidator windowsVersionValidator =
WindowsVersionValidator(
operatingSystemUtils: FakeValidOperatingSystemUtils(),
processLister: ofdNotRunning());
final ValidationResult result = await windowsVersionValidator.validate();
expect(result.type, validWindows10ValidationResult.type,
reason: 'The ValidationResult type should be the same (installed)');
expect(result.statusInfo, validWindows10ValidationResult.statusInfo,
reason: 'The ValidationResult statusInfo messages should be the same');
});
testWithoutContext(
'Successfully running windows version check on windows 10 for BR',
() async {
final WindowsVersionValidator windowsVersionValidator =
WindowsVersionValidator(
operatingSystemUtils: FakeValidOperatingSystemUtils(
'Microsoft Windows [versão 10.0.22621.1105]'),
processLister: ofdNotRunning());
final ValidationResult result = await windowsVersionValidator.validate();
expect(result.type, validWindows10ValidationResult.type,
reason: 'The ValidationResult type should be the same (installed)');
expect(result.statusInfo, validWindows10ValidationResult.statusInfo,
reason: 'The ValidationResult statusInfo messages should be the same');
});
testWithoutContext('Identifying a windows version before 10', () async {
final WindowsVersionValidator windowsVersionValidator =
WindowsVersionValidator(
operatingSystemUtils: FakeValidOperatingSystemUtils(
'Microsoft Windows [Version 8.0.22621.1105]'),
processLister: ofdNotRunning());
final ValidationResult result = await windowsVersionValidator.validate();
expect(result.type, invalidWindowsValidationResult.type,
reason: 'The ValidationResult type should be the same (missing)');
});
testWithoutContext('Unit testing on a regex pattern validator', () async {
const String testStr = r'''
OS Version: 10.0.19044 N/A Build 19044
OSz Version: 10.0.19044 N/A Build 19044
OxS Version: 10.0.19044 N/A Build 19044
OS Version: 10.19044 N/A Build 19044
OS Version: 10.x.19044 N/A Build 19044
OS Version: 10.0.19044 N/A Build 19044
OS Version: .0.19044 N/A Build 19044
OS 版本: 10.0.22621 暂缺 Build 22621
''';
final RegExp regex = RegExp(
kWindowsOSVersionSemVerPattern,
multiLine: true,
);
final Iterable<RegExpMatch> matches = regex.allMatches(testStr);
expect(matches.length, 5,
reason: 'There should be only 5 matches for the pattern provided');
});
testWithoutContext('Successfully checks for Topaz OFD when it is running', () async {
final WindowsVersionValidator validator =
WindowsVersionValidator(
operatingSystemUtils: FakeValidOperatingSystemUtils(),
processLister: ofdRunning());
final ValidationResult result = await validator.validate();
expect(result.type, ofdFoundRunning.type, reason: 'The ValidationResult type should be the same (partial)');
expect(result.statusInfo, ofdFoundRunning.statusInfo, reason: 'The ValidationResult statusInfo should be the same');
expect(result.messages.length, 1, reason: 'The ValidationResult should have precisely 1 message');
expect(result.messages[0].message, ofdFoundRunning.messages[0].message, reason: 'The ValidationMessage message should be the same');
});
testWithoutContext('Reports failure of Get-Process', () async {
final WindowsVersionValidator validator =
WindowsVersionValidator(
operatingSystemUtils: FakeValidOperatingSystemUtils(),
processLister: failure());
final ValidationResult result = await validator.validate();
expect(result.type, getProcessFailed.type, reason: 'The ValidationResult type should be the same (partial)');
expect(result.statusInfo, getProcessFailed.statusInfo, reason: 'The ValidationResult statusInfo should be the same');
expect(result.messages.length, 1, reason: 'The ValidationResult should have precisely 1 message');
expect(result.messages[0].message, getProcessFailed.messages[0].message, reason: 'The ValidationMessage message should be the same');
});
}
| flutter/packages/flutter_tools/test/general.shard/windows_version_validator_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/general.shard/windows_version_validator_test.dart",
"repo_id": "flutter",
"token_count": 2282
} | 844 |
// Copyright 2014 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.
import 'dart:convert';
import 'package:collection/collection.dart';
import 'package:file/file.dart';
import 'package:flutter_tools/src/android/gradle_utils.dart'
show getGradlewFileName;
import 'package:flutter_tools/src/base/io.dart';
import '../src/common.dart';
import 'test_utils.dart';
void main() {
late Directory tempDir;
setUp(() async {
tempDir = createResolvedTempDirectorySync('run_test.');
});
tearDown(() async {
tryToDelete(tempDir);
});
testWithoutContext(
'gradle task exists named printBuildVariants that prints build variants', () async {
// Create a new flutter project.
final String flutterBin =
fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
ProcessResult result = await processManager.run(<String>[
flutterBin,
'create',
tempDir.path,
'--project-name=testapp',
], workingDirectory: tempDir.path);
expect(result.exitCode, 0);
// Ensure that gradle files exists from templates.
result = await processManager.run(<String>[
flutterBin,
'build',
'apk',
'--config-only',
], workingDirectory: tempDir.path);
expect(result.exitCode, 0);
final Directory androidApp = tempDir.childDirectory('android');
result = await processManager.run(<String>[
'.${platform.pathSeparator}${getGradlewFileName(platform)}',
...getLocalEngineArguments(),
'-q', // quiet output.
'printBuildVariants',
], workingDirectory: androidApp.path);
// Verify that gradlew has a javaVersion task.
expect(result.exitCode, 0);
// Verify the format is a number on its own line.
const List<String> expectedLines = <String>[
'BuildVariant: debug',
'BuildVariant: release',
'BuildVariant: profile',
];
final List<String> actualLines = LineSplitter.split(result.stdout.toString()).toList();
expect(const ListEquality<String>().equals(actualLines, expectedLines), isTrue);
});
}
| flutter/packages/flutter_tools/test/integration.shard/android_gradle_print_build_variants_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/integration.shard/android_gradle_print_build_variants_test.dart",
"repo_id": "flutter",
"token_count": 757
} | 845 |
// Copyright 2014 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.
import 'dart:async';
import 'dart:convert';
import 'dart:io' hide Directory;
import 'package:file/file.dart';
import 'package:process/process.dart';
import '../src/common.dart';
import 'test_data/basic_project.dart';
import 'test_driver.dart';
import 'test_utils.dart';
void main() {
late Directory tempDir;
late Process daemonProcess;
setUp(() async {
tempDir = createResolvedTempDirectorySync('daemon_mode_test.');
});
tearDown(() async {
tryToDelete(tempDir);
daemonProcess.kill();
});
testWithoutContext('device.getDevices', () async {
final BasicProject project = BasicProject();
await project.setUpIn(tempDir);
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
const ProcessManager processManager = LocalProcessManager();
daemonProcess = await processManager.start(
<String>[flutterBin, ...getLocalEngineArguments(), '--show-test-device', 'daemon'],
workingDirectory: tempDir.path,
);
final StreamController<String> stdout = StreamController<String>.broadcast();
transformToLines(daemonProcess.stdout).listen((String line) => stdout.add(line));
final Stream<Map<String, Object?>?> stream = stdout
.stream
.map<Map<String, Object?>?>(parseFlutterResponse)
.where((Map<String, Object?>? value) => value != null);
Map<String, Object?> response = (await stream.first)!;
expect(response['event'], 'daemon.connected');
// start listening for devices
daemonProcess.stdin.writeln('[${jsonEncode(<String, dynamic>{
'id': 1,
'method': 'device.enable',
})}]');
response = (await stream.firstWhere((Map<String, Object?>? json) => json!['id'] == 1))!;
expect(response['id'], 1);
expect(response['error'], isNull);
// [{"event":"device.added","params":{"id":"flutter-tester","name":
// "Flutter test device","platform":"flutter-tester","emulator":false}}]
response = (await stream.first)!;
expect(response['event'], 'device.added');
// get the list of all devices
daemonProcess.stdin.writeln('[${jsonEncode(<String, dynamic>{
'id': 2,
'method': 'device.getDevices',
})}]');
// Skip other device.added events that may fire (desktop/web devices).
response = (await stream.firstWhere((Map<String, Object?>? response) => response!['event'] != 'device.added'))!;
expect(response['id'], 2);
expect(response['error'], isNull);
final dynamic result = response['result'];
expect(result, isList);
expect(result, isNotEmpty);
});
}
| flutter/packages/flutter_tools/test/integration.shard/daemon_mode_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/integration.shard/daemon_mode_test.dart",
"repo_id": "flutter",
"token_count": 950
} | 846 |
// Copyright 2014 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.
import 'package:file_testing/file_testing.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/io.dart';
import '../src/common.dart';
import 'test_utils.dart';
// Test that configOnly creates the gradlew file and does not assemble and app.
void main() {
late Directory tempDir;
late String flutterBin;
late Directory exampleAppDir;
setUp(() async {
tempDir = createResolvedTempDirectorySync('flutter_build_test.');
flutterBin = fileSystem.path.join(
getFlutterRoot(),
'bin',
'flutter',
);
exampleAppDir = tempDir.childDirectory('bbb').childDirectory('example');
processManager.runSync(
<String>[
flutterBin,
...getLocalEngineArguments(),
'create',
'--template=plugin',
'--platforms=android',
'bbb',
'-v',
],
workingDirectory: tempDir.path,
);
});
tearDown(() async {
tryToDelete(tempDir);
});
test(
'flutter build apk --config-only should create gradlew and not assemble',
() async {
final File gradleFile = fileSystem
.directory(exampleAppDir)
.childDirectory('android')
.childFile(platform.isWindows ? 'gradlew.bat' : 'gradlew');
// Ensure file is gone prior to configOnly running.
await gradleFile.delete();
final ProcessResult result = processManager.runSync(
<String>[
flutterBin,
...getLocalEngineArguments(),
'build',
'apk',
'--target-platform=android-arm',
'--config-only',
],
workingDirectory: exampleAppDir.path,
);
expect(gradleFile, exists);
expect(result.stdout, contains(RegExp(r'Config complete')));
expect(result.stdout, isNot(contains(RegExp(r'Running Gradle task'))));
},
);
}
| flutter/packages/flutter_tools/test/integration.shard/flutter_build_config_only_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/integration.shard/flutter_build_config_only_test.dart",
"repo_id": "flutter",
"token_count": 813
} | 847 |
// Copyright 2014 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.
// The purpose of this test is to verify the end-to-end behavior of
// "flutter run" and other such commands, as closely as possible to
// the default behavior. To that end, it avoids the use of any test
// features that are not critical (-dflutter-test being the primary
// example of a test feature that it does use). For example, no use
// is made of "--machine" in these tests.
// There are a number of risks when it comes to writing a test such
// as this one. Typically these tests are hard to debug if they are
// in a failing condition, because they just hang as they await the
// next expected line that never comes. To avoid this, here we have
// the policy of looking for multiple lines, printing what expected
// lines were not seen when a short timeout expires (but timing out
// does not cause the test to fail, to reduce flakes), and wherever
// possible recording all output and comparing the actual output to
// the expected output only once the test is completed.
// To aid in debugging, consider passing the `debug: true` argument
// to the runFlutter function.
// This file intentionally assumes the tests run in order.
@Tags(<String>['no-shuffle'])
library;
import 'dart:io';
import '../src/common.dart';
import 'test_utils.dart' show fileSystem;
import 'transition_test_utils.dart';
void main() {
testWithoutContext('flutter run writes and clears pidfile appropriately', () async {
final String tempDirectory = fileSystem.systemTempDirectory.createTempSync('flutter_overall_experience_test.').resolveSymbolicLinksSync();
final String pidFile = fileSystem.path.join(tempDirectory, 'flutter.pid');
final String testDirectory = fileSystem.path.join(flutterRoot, 'examples', 'hello_world');
bool? existsDuringTest;
try {
expect(fileSystem.file(pidFile).existsSync(), isFalse);
final ProcessTestResult result = await runFlutter(
<String>['run', '-dflutter-tester', '--pid-file', pidFile],
testDirectory,
<Transition>[
Barrier('q Quit (terminate the application on the device).', handler: (String line) {
existsDuringTest = fileSystem.file(pidFile).existsSync();
return 'q';
}),
const Barrier('Application finished.'),
],
);
expect(existsDuringTest, isNot(isNull));
expect(existsDuringTest, isTrue);
expect(result.exitCode, 0, reason: 'subprocess failed; $result');
expect(fileSystem.file(pidFile).existsSync(), isFalse);
// This first test ignores the stdout and stderr, so that if the
// first run outputs "building flutter", or the "there's a new
// flutter" banner, or other such first-run messages, they won't
// fail the tests. This does mean that running this test first is
// actually important in the case where you're running the tests
// manually. (On CI, all those messages are expected to be seen
// long before we get here, e.g. because we run "flutter doctor".)
} finally {
tryToDelete(fileSystem.directory(tempDirectory));
}
}, skip: Platform.isWindows); // [intended] Windows doesn't support sending signals so we don't care if it can store the PID.
testWithoutContext('flutter run handle SIGUSR1/2 run', () async {
final String tempDirectory = fileSystem.systemTempDirectory.createTempSync('flutter_overall_experience_test.').resolveSymbolicLinksSync();
final String pidFile = fileSystem.path.join(tempDirectory, 'flutter.pid');
final String testDirectory = fileSystem.path.join(flutterRoot, 'dev', 'integration_tests', 'ui');
final String testScript = fileSystem.path.join('lib', 'commands.dart');
late int pid;
final List<String> command = <String>[
'run',
'-dflutter-tester',
'--report-ready',
'--pid-file',
pidFile,
'--no-devtools',
testScript,
];
try {
final ProcessTestResult result = await runFlutter(
command,
testDirectory,
<Transition>[
Multiple(<Pattern>['Flutter run key commands.', 'called paint'], handler: (String line) {
pid = int.parse(fileSystem.file(pidFile).readAsStringSync());
processManager.killPid(pid, ProcessSignal.sigusr1);
return null;
}),
Barrier('Performing hot reload...'.padRight(progressMessageWidth), logging: true),
Multiple(<Pattern>[RegExp(r'^Reloaded 0 libraries in [0-9]+ms \(compile: \d+ ms, reload: \d+ ms, reassemble: \d+ ms\)\.$'), 'called reassemble', 'called paint'], handler: (String line) {
processManager.killPid(pid, ProcessSignal.sigusr2);
return null;
}),
Barrier('Performing hot restart...'.padRight(progressMessageWidth)),
// This could look like 'Restarted application in 1,237ms.'
Multiple(<Pattern>[RegExp(r'^Restarted application in .+m?s.$'), 'called main', 'called paint'], handler: (String line) {
return 'q';
}),
const Barrier('Application finished.'),
],
logging: false, // we ignore leading log lines to avoid making this test sensitive to e.g. the help message text
);
// We check the output from the app (all starts with "called ...") and the output from the tool
// (everything else) separately, because their relative timing isn't guaranteed. Their rough timing
// is verified by the expected transitions above.
expect(result.stdout.where((String line) => line.startsWith('called ')), <Object>[
// logs start after we receive the response to sending SIGUSR1
// SIGUSR1:
'called reassemble',
'called paint',
// SIGUSR2:
'called main',
'called paint',
]);
expect(
result.stdout.where((String line) => !line.startsWith('called ')),
<Object>[
// logs start after we receive the response to sending SIGUSR1
'Performing hot reload...'.padRight(progressMessageWidth),
startsWith('Reloaded 0 libraries in '),
'Performing hot restart...'.padRight(progressMessageWidth),
startsWith('Restarted application in '),
'', // this newline is the one for after we hit "q"
'Application finished.',
'ready',
],
reason: 'stdout from command ${command.join(' ')} was unexpected, '
'full Stdout:\n\n${result.stdout.join('\n')}\n\n'
'Stderr:\n\n${result.stderr.join('\n')}',
);
expect(result.exitCode, 0);
} finally {
tryToDelete(fileSystem.directory(tempDirectory));
}
}, skip: Platform.isWindows); // [intended] Windows doesn't support sending signals.
testWithoutContext('flutter run can hot reload and hot restart, handle "p" key', () async {
final String tempDirectory = fileSystem.systemTempDirectory.createTempSync('flutter_overall_experience_test.').resolveSymbolicLinksSync();
final String testDirectory = fileSystem.path.join(flutterRoot, 'dev', 'integration_tests', 'ui');
final String testScript = fileSystem.path.join('lib', 'commands.dart');
final List<String> command = <String>[
'run',
'-dflutter-tester',
'--report-ready',
'--no-devtools',
testScript,
];
try {
final ProcessTestResult result = await runFlutter(
command,
testDirectory,
<Transition>[
Multiple(<Pattern>['Flutter run key commands.', 'called main', 'called paint'], handler: (String line) {
return 'r';
}),
Barrier('Performing hot reload...'.padRight(progressMessageWidth), logging: true),
Multiple(<Pattern>['ready', 'called reassemble', 'called paint'], handler: (String line) {
return 'R';
}),
Barrier('Performing hot restart...'.padRight(progressMessageWidth)),
Multiple(<Pattern>['ready', 'called main', 'called paint'], handler: (String line) {
return 'p';
}),
Multiple(<Pattern>['ready', 'called paint', 'called debugPaintSize'], handler: (String line) {
return 'p';
}),
Multiple(<Pattern>['ready', 'called paint'], handler: (String line) {
return 'q';
}),
const Barrier('Application finished.'),
],
logging: false, // we ignore leading log lines to avoid making this test sensitive to e.g. the help message text
);
// We check the output from the app (all starts with "called ...") and the output from the tool
// (everything else) separately, because their relative timing isn't guaranteed. Their rough timing
// is verified by the expected transitions above.
expect(result.stdout.where((String line) => line.startsWith('called ')), <Object>[
// logs start after we initiate the hot reload
// hot reload:
'called reassemble',
'called paint',
// hot restart:
'called main',
'called paint',
// debugPaintSizeEnabled = true:
'called paint',
'called debugPaintSize',
// debugPaintSizeEnabled = false:
'called paint',
]);
expect(
result.stdout.where((String line) => !line.startsWith('called ')), <Object>[
// logs start after we receive the response to hitting "r"
'Performing hot reload...'.padRight(progressMessageWidth),
startsWith('Reloaded 0 libraries in '),
'ready',
'', // this newline is the one for after we hit "R"
'Performing hot restart...'.padRight(progressMessageWidth),
startsWith('Restarted application in '),
'ready',
'', // newline for after we hit "p" the first time
'ready',
'', // newline for after we hit "p" the second time
'ready',
'', // this newline is the one for after we hit "q"
'Application finished.',
'ready',
],
reason: 'stdout from command ${command.join(' ')} was unexpected, '
'full Stdout:\n\n${result.stdout.join('\n')}\n\n'
'Stderr:\n\n${result.stderr.join('\n')}',
);
expect(result.exitCode, 0);
} finally {
tryToDelete(fileSystem.directory(tempDirectory));
}
});
testWithoutContext('flutter error messages include a DevTools link', () async {
final String testDirectory = fileSystem.path.join(flutterRoot, 'dev', 'integration_tests', 'ui');
final String tempDirectory = fileSystem.systemTempDirectory.createTempSync('flutter_overall_experience_test.').resolveSymbolicLinksSync();
final String testScript = fileSystem.path.join('lib', 'overflow.dart');
try {
final ProcessTestResult result = await runFlutter(
<String>['run', '-dflutter-tester', testScript],
testDirectory,
<Transition>[
Barrier(RegExp(r'^A Dart VM Service on Flutter test device is available at: ')),
Barrier(RegExp(r'^The Flutter DevTools debugger and profiler on Flutter test device is available at: '), handler: (String line) {
return 'r';
}),
Barrier('Performing hot reload...'.padRight(progressMessageWidth), logging: true),
Barrier(RegExp(r'^Reloaded 0 libraries in [0-9]+ms.'), handler: (String line) {
return 'q';
}),
],
logging: false,
);
expect(result.exitCode, 0);
expect(result.stdout, <Object>[
startsWith('Performing hot reload...'),
'',
'══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════',
'The following assertion was thrown during layout:',
'A RenderFlex overflowed by 69200 pixels on the right.',
'',
'The relevant error-causing widget was:',
matches(RegExp(r'^ Row.+/dev/integration_tests/ui/lib/overflow\.dart:32:18$')),
'',
'To inspect this widget in Flutter DevTools, visit:',
startsWith('http'),
'',
'The overflowing RenderFlex has an orientation of Axis.horizontal.',
'The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and',
'black striped pattern. This is usually caused by the contents being too big for the RenderFlex.',
'Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the',
'RenderFlex to fit within the available space instead of being sized to their natural size.',
'This is considered an error condition because it indicates that there is content that cannot be',
'seen. If the content is legitimately bigger than the available space, consider clipping it with a',
'ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex,',
'like a ListView.',
matches(RegExp(r'^The specific RenderFlex in question is: RenderFlex#..... OVERFLOWING:$')),
startsWith(' creator: Row ← Test ← '),
contains(' ← '),
endsWith(' ⋯'),
' parentData: <none> (can use size)',
' constraints: BoxConstraints(w=800.0, h=600.0)',
' size: Size(800.0, 600.0)',
' direction: horizontal',
' mainAxisAlignment: start',
' mainAxisSize: max',
' crossAxisAlignment: center',
' textDirection: ltr',
' verticalDirection: down',
'◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤',
'════════════════════════════════════════════════════════════════════════════════════════════════════',
'',
startsWith('Reloaded 0 libraries in '),
'',
'Application finished.',
]);
} finally {
tryToDelete(fileSystem.directory(tempDirectory));
}
});
testWithoutContext('flutter run help output', () async {
// This test enables all logging so that it checks the exact text of starting up an application.
// The idea is to verify that we're not outputting spurious messages.
// WHEN EDITING THIS TEST PLEASE CAREFULLY CONSIDER WHETHER THE NEW OUTPUT IS AN IMPROVEMENT.
final String testDirectory = fileSystem.path.join(flutterRoot, 'examples', 'hello_world');
final RegExp finalLine = RegExp(r'^The Flutter DevTools');
final ProcessTestResult result = await runFlutter(
<String>['run', '-dflutter-tester'],
testDirectory,
<Transition>[
Barrier(finalLine, handler: (String line) {
return 'h';
}),
Barrier(finalLine, handler: (String line) {
return 'q';
}),
const Barrier('Application finished.'),
],
);
expect(result.exitCode, 0);
expect(result.stderr, isEmpty);
expect(result.stdout, containsAllInOrder(<Object>[
startsWith('Launching '),
startsWith('Syncing files to device Flutter test device...'),
'',
'Flutter run key commands.',
startsWith('r Hot reload.'),
'R Hot restart.',
'h List all available interactive commands.',
'd Detach (terminate "flutter run" but leave application running).',
'c Clear the screen',
'q Quit (terminate the application on the device).',
'',
startsWith('A Dart VM Service on Flutter test device is available at: http://'),
startsWith('The Flutter DevTools debugger and profiler on Flutter test device is available at: http://'),
'',
'Flutter run key commands.',
startsWith('r Hot reload.'),
'R Hot restart.',
'v Open Flutter DevTools.',
'w Dump widget hierarchy to the console. (debugDumpApp)',
't Dump rendering tree to the console. (debugDumpRenderTree)',
'L Dump layer tree to the console. (debugDumpLayerTree)',
'f Dump focus tree to the console. (debugDumpFocusTree)',
'S Dump accessibility tree in traversal order. (debugDumpSemantics)',
'U Dump accessibility tree in inverse hit test order. (debugDumpSemantics)',
'i Toggle widget inspector. (WidgetsApp.showWidgetInspectorOverride)',
'p Toggle the display of construction lines. (debugPaintSizeEnabled)',
'I Toggle oversized image inversion. (debugInvertOversizedImages)',
'o Simulate different operating systems. (defaultTargetPlatform)',
'b Toggle platform brightness (dark and light mode). (debugBrightnessOverride)',
'P Toggle performance overlay. (WidgetsApp.showPerformanceOverlay)',
'a Toggle timeline events for all widget build methods. (debugProfileWidgetBuilds)',
'M Write SkSL shaders to a unique file in the project directory.',
'g Run source code generators.',
'j Dump frame raster stats for the current frame. (Unsupported for web)',
'h Repeat this help message.',
'd Detach (terminate "flutter run" but leave application running).',
'c Clear the screen',
'q Quit (terminate the application on the device).',
'',
startsWith('A Dart VM Service on Flutter test device is available at: http://'),
startsWith('The Flutter DevTools debugger and profiler on Flutter test device is available at: http://'),
'',
'Application finished.',
]));
});
}
| flutter/packages/flutter_tools/test/integration.shard/overall_experience_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/integration.shard/overall_experience_test.dart",
"repo_id": "flutter",
"token_count": 7050
} | 848 |
// Copyright 2014 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.
import 'dart:async';
import 'package:flutter_tools/src/base/io.dart';
// This application will log to STDOUT and exit with 0 when it receives the
// SIGTERM signal.
Future<void> main() async {
final Stdout stdout = Stdio().stdout;
final Stream<ProcessSignal> interruptStream = ProcessSignal.sigterm.watch();
interruptStream.listen((_) {
// The test should assert that this was logged
stdout.writeln('Successfully received SIGTERM!');
exit(0);
});
// The test should wait for this message before sending SIGTERM, or else the
// listener may not have been registered.
stdout.writeln('Ready to receive signals');
await Future<void>.delayed(const Duration(seconds: 10));
stdout.writeln('Did not receive SIGTERM!');
exit(1);
}
| flutter/packages/flutter_tools/test/integration.shard/test_data/listen_for_sigterm.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/integration.shard/test_data/listen_for_sigterm.dart",
"repo_id": "flutter",
"token_count": 278
} | 849 |
// Copyright 2014 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.
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/io.dart';
import 'package:process/process.dart';
import '../src/common.dart';
import 'test_utils.dart';
void main() {
late Directory tempDir;
setUp(() async {
tempDir = createResolvedTempDirectorySync('unit_coverage_test.');
});
tearDown(() async {
tryToDelete(tempDir);
});
testWithoutContext('Can parse and output summaries for code coverage', () async {
final File coverageFile = tempDir.childFile('info.lcov')
..writeAsStringSync('''
SF:lib/src/artifacts.dart
DA:15,10
DA:17,7
DA:19,7
DA:20,7
DA:22,7
DA:324,10
DA:724,0
DA:727,2
DA:729,3
DA:732,0
DA:737,1
LF:443
LH:292
end_of_record
SF:lib/src/base/common.dart
DA:13,7
DA:14,7
DA:22,7
DA:27,3
DA:28,6
DA:40,7
LF:6
LH:6
end_of_record
''');
final String dartScript = fileSystem.path.join(getFlutterRoot(), 'bin', 'dart');
final String coverageScript = fileSystem.path.join(getFlutterRoot(), 'packages', 'flutter_tools', 'tool', 'unit_coverage.dart');
final ProcessResult result = await const LocalProcessManager().run(<String>[
dartScript,
coverageScript,
coverageFile.path,
]);
// May contain other output if building flutter tool.
expect(result.stdout.toString().split('\n'), containsAll(<Matcher>[
contains('lib/src/artifacts.dart: 81.82%'),
contains('lib/src/base/common.dart: 100.00%'),
]));
});
}
| flutter/packages/flutter_tools/test/integration.shard/unit_coverage_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/integration.shard/unit_coverage_test.dart",
"repo_id": "flutter",
"token_count": 624
} | 850 |
// Copyright 2014 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.
import 'package:flutter_tools/src/base/logger.dart';
import 'package:flutter_tools/src/base/terminal.dart';
class LoggingLogger extends BufferLogger {
LoggingLogger() : super.test();
List<String> messages = <String>[];
@override
void printError(String message, {StackTrace? stackTrace, bool? emphasis, TerminalColor? color, int? indent, int? hangingIndent, bool? wrap}) {
messages.add(message);
}
@override
void printStatus(String message, {bool? emphasis, TerminalColor? color, bool? newline, int? indent, int? hangingIndent, bool? wrap}) {
messages.add(message);
}
@override
void printTrace(String message) {
messages.add(message);
}
}
| flutter/packages/flutter_tools/test/src/logging_logger.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/src/logging_logger.dart",
"repo_id": "flutter",
"token_count": 266
} | 851 |
// Copyright 2014 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.
import 'package:file/file.dart';
import 'package:flutter_tools/src/base/file_system.dart';
import '../integration.shard/test_data/basic_project.dart';
import '../integration.shard/test_driver.dart';
import '../integration.shard/test_utils.dart';
import '../src/common.dart';
void main() {
late Directory tempDir;
final BasicProjectWithUnaryMain project = BasicProjectWithUnaryMain();
late FlutterRunTestDriver flutter;
setUp(() async {
tempDir = createResolvedTempDirectorySync('run_test.');
await project.setUpIn(tempDir);
flutter = FlutterRunTestDriver(tempDir);
});
tearDown(() async {
await flutter.stop();
tryToDelete(tempDir);
});
testWithoutContext('flutter run works on web devices with a unary main function', () async {
await flutter.run(chrome: true, additionalCommandArgs: <String>['--verbose', '--web-renderer=html']);
});
}
| flutter/packages/flutter_tools/test/web.shard/web_run_test.dart/0 | {
"file_path": "flutter/packages/flutter_tools/test/web.shard/web_run_test.dart",
"repo_id": "flutter",
"token_count": 340
} | 852 |
// Copyright 2014 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.
@TestOn('chrome') // Uses web-only Flutter SDK
library;
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_web_plugins/url_strategy.dart';
import 'common.dart';
void main() {
group('$PathUrlStrategy', () {
late TestPlatformLocation location;
setUp(() {
location = TestPlatformLocation();
location.baseHref = '/';
});
test('allows null state', () {
final PathUrlStrategy strategy = PathUrlStrategy(location);
expect(() => strategy.pushState(null, '', '/'), returnsNormally);
expect(() => strategy.replaceState(null, '', '/'), returnsNormally);
});
test('validates base href', () {
expect(
() => PathUrlStrategy(location),
returnsNormally,
);
location.baseHref = '/foo/';
expect(
() => PathUrlStrategy(location),
returnsNormally,
);
location.baseHref = '';
expect(
() => PathUrlStrategy(location),
throwsException,
);
location.baseHref = 'foo';
expect(
() => PathUrlStrategy(location),
throwsException,
);
location.baseHref = '/foo';
expect(
() => PathUrlStrategy(location),
throwsException,
);
});
test('leading slash is always prepended', () {
final PathUrlStrategy strategy = PathUrlStrategy(location);
location.pathname = '';
expect(strategy.getPath(), '/');
location.pathname = 'foo';
expect(strategy.getPath(), '/foo');
});
test('gets path correctly in the presence of basePath', () {
location.baseHref = 'https://example.com/foo/';
final PathUrlStrategy strategy = PathUrlStrategy(location);
location.pathname = '/foo/';
expect(strategy.getPath(), '/');
location.pathname = '/foo';
expect(strategy.getPath(), '/');
location.pathname = '/foo/bar';
expect(strategy.getPath(), '/bar');
});
test('gets path correctly in the presence of query params and omits fragment if no flag specified', () {
location.baseHref = 'https://example.com/foo/';
location.pathname = '/foo/bar';
final PathUrlStrategy strategy = PathUrlStrategy(location);
location.search = '?q=1';
expect(strategy.getPath(), '/bar?q=1');
location.search = '?q=1&t=r';
expect(strategy.getPath(), '/bar?q=1&t=r');
location.hash = '#fragment=1';
expect(strategy.getPath(), '/bar?q=1&t=r');
});
test('gets path correctly in the presence of query params and fragment', () {
location.baseHref = 'https://example.com/foo/';
location.pathname = '/foo/bar';
final PathUrlStrategy strategy = PathUrlStrategy(location, true);
location.search = '?q=1';
expect(strategy.getPath(), '/bar?q=1');
location.search = '?q=1&t=r';
expect(strategy.getPath(), '/bar?q=1&t=r');
location.hash = '#fragment=1';
expect(strategy.getPath(), '/bar?q=1&t=r#fragment=1');
});
test('empty route name is ok', () {
final PathUrlStrategy strategy = PathUrlStrategy(location);
expect(strategy.prepareExternalUrl(''), '/');
expect(() => strategy.pushState(null, '', ''), returnsNormally);
expect(() => strategy.replaceState(null, '', ''), returnsNormally);
});
test('route names must start with /', () {
final PathUrlStrategy strategy = PathUrlStrategy(location);
expect(() => strategy.prepareExternalUrl('foo'), throwsAssertionError);
expect(() => strategy.prepareExternalUrl('foo/'), throwsAssertionError);
expect(() => strategy.prepareExternalUrl('foo/bar'), throwsAssertionError);
expect(() => strategy.pushState(null, '', 'foo'), throwsAssertionError);
expect(() => strategy.pushState(null, '', 'foo/'), throwsAssertionError);
expect(() => strategy.pushState(null, '', 'foo/bar'), throwsAssertionError);
expect(() => strategy.replaceState(null, '', 'foo'), throwsAssertionError);
expect(() => strategy.replaceState(null, '', 'foo/'), throwsAssertionError);
expect(() => strategy.replaceState(null, '', 'foo/bar'), throwsAssertionError);
});
test('generates external path correctly in the presence of basePath', () {
location.baseHref = 'https://example.com/foo/';
final PathUrlStrategy strategy = PathUrlStrategy(location);
expect(strategy.prepareExternalUrl(''), '/foo/');
expect(strategy.prepareExternalUrl('/'), '/foo/');
expect(strategy.prepareExternalUrl('/bar'), '/foo/bar');
expect(strategy.prepareExternalUrl('/bar/'), '/foo/bar/');
});
});
}
| flutter/packages/flutter_web_plugins/test/navigation/url_strategy_test.dart/0 | {
"file_path": "flutter/packages/flutter_web_plugins/test/navigation/url_strategy_test.dart",
"repo_id": "flutter",
"token_count": 1808
} | 853 |
# CHANGELOG
This changelog was discontinued after version 0.9.2+2, when the package started
to vend from the Flutter SDK rather than pub.
It is maintained here for historical purposes only.
## 0.9.2+2
* Broaden the constraint on vm_service.
## 0.9.2+1
* Update android compileSdkVersion to 29.
## 0.9.2
* Add `watchPerformance` for performance test.
## 0.9.1
* Keep handling deprecated Android v1 classes for backward compatibility.
## 0.9.0
* Add screenshot capability to web tests.
## 0.8.2
* Add support to get timeline.
## 0.8.1
* Show stack trace of widget test errors on the platform side
* Fix method channel name for iOS
## 0.8.0
* Rename plugin to integration_test.
## 0.7.0
* Move utilities for tracking frame performance in an e2e test to `flutter_test`.
## 0.6.3
* Add customizable `flutter_driver` adaptor.
* Add utilities for tracking frame performance in an e2e test.
## 0.6.2+1
* Fix incorrect test results when one test passes then another fails
## 0.6.2
* Fix `setSurfaceSize` for e2e tests
## 0.6.1
* Added `data` in the reported json.
## 0.6.0
* **Breaking change** `E2EPlugin` exports a `Future` for `testResults`.
## 0.5.0+1
* Fixed the device pixel ratio problem.
## 0.5.0
* **Breaking change** by default, tests will use the device window size.
Tests can still override the window size by using the `setSurfaceSize` method.
* **Breaking change** If using Flutter 1.19.0-2.0.pre.196 or greater, the
`testTextInput` will no longer automatically register.
* **Breaking change** If using Flutter 1.19.0-2.0.pre.196 or greater, the
`HttpOverrides` will no longer be set by default.
* Minor formatting changes to Dart code.
## 0.4.3+3
* Fixed code snippet in readme that referenced a non-existent `result` variable.
## 0.4.3+2
* Bumps AGP to 3.6.3
* Changes android-retrofuture dependency type to "implementation"
## 0.4.3+1
* Post-v2 Android embedding cleanup.
## 0.4.3
* Uses CompletableFuture from android-retrofuture allow compatibility with API < 24.
## 0.4.2
* Adds support for Android E2E tests that utilize other @Rule's, like GrantPermissionRule.
* Fix CocoaPods podspec lint warnings.
## 0.4.1
* Remove Android dependencies fallback.
* Require Flutter SDK 1.12.13+hotfix.5 or greater.
## 0.4.0
* **Breaking change** Driver request_data call's response has changed to
encapsulate the failure details.
* Details for failure cases are added: failed method name, stack trace.
## 0.3.0+1
* Replace deprecated `getFlutterEngine` call on Android.
## 0.3.0
* Updates documentation to instruct developers not to launch the activity since
we are doing it for them.
* Renames `FlutterRunner` to `FlutterTestRunner` to avoid conflict with Fuchsia.
## 0.2.4+4
* Fixed a hang that occurred on platforms that don't have a `MethodChannel` listener registered..
## 0.2.4+3
* Fixed code snippet in the readme under the "Using Flutter driver to run tests" section.
## 0.2.4+2
* Make the pedantic dev_dependency explicit.
## 0.2.4+1
* Registering web service extension for using e2e with web.
## 0.2.4
* Fixed problem with XCTest in XCode 11.3 where the testing bundles were getting
opened multiple times which interfered with the singleton logic for E2EPlugin.
## 0.2.3+1
* Added a driver test for failure behavior.
## 0.2.3
* Updates `E2EPlugin` and add skeleton iOS test case `E2EIosTest`.
* Adds instructions to README.md about e2e testing on iOS devices.
* Adds iOS e2e testing to example.
## 0.2.2+3
* Remove the deprecated `author:` field from pubspec.yaml
* Migrate the plugin to the pubspec platforms manifest.
* Require Flutter SDK 1.10.0 or greater.
## 0.2.2+2
* Adds an android dummy project to silence warnings and removes unnecessary
.gitignore files.
## 0.2.2+1
* Fix pedantic lints. Adds a missing await in the example test and some missing
documentation.
## 0.2.2
* Added a stub macos implementation
* Added a macos example
## 0.2.1+1
* Updated README.
## 0.2.1
* Support the v2 Android embedder.
* Print a warning if the plugin is not registered.
* Updated method channel name.
* Set a Flutter minimum SDK version.
## 0.2.0+1
* Updated README.
## 0.2.0
* Renamed package from instrumentation_adapter to e2e.
* Refactored example app test.
* **Breaking change**. Renamed `InstrumentationAdapterFlutterBinding` to
`IntegrationTestWidgetsFlutterBinding`.
* Updated README.
## 0.1.4
* Migrate example to AndroidX.
* Define clang module for iOS.
## 0.1.3
* Added example app.
* Added stub iOS implementation.
* Updated README.
* No longer throws errors when running tests on the host.
## 0.1.2
* Added support for running tests using Flutter driver.
## 0.1.1
* Updates about using *androidx* library.
## 0.1.0
* Update boilerplate test to use `@Rule` instead of `FlutterTest`.
## 0.0.2
* Document current usage instructions, which require adding a Java test file.
## 0.0.1
* Initial release
| flutter/packages/integration_test/CHANGELOG.md/0 | {
"file_path": "flutter/packages/integration_test/CHANGELOG.md",
"repo_id": "flutter",
"token_count": 1592
} | 854 |
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
| flutter/packages/integration_test/example/android/gradle.properties/0 | {
"file_path": "flutter/packages/integration_test/example/android/gradle.properties",
"repo_id": "flutter",
"token_count": 88
} | 855 |
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'IntegrationTestMacOS'
s.version = '0.0.1'
s.summary = 'No-op implementation of the integration_test desktop plugin to avoid build issues on iOS'
s.description = <<-DESC
No-op implementation of integration to avoid build issues on iOS.
See https://github.com/flutter/flutter/issues/39659
DESC
s.homepage = 'https://github.com/flutter/flutter/tree/master/packages/integration_test/integration_test_macos'
s.license = { :file => '../LICENSE' }
s.author = { 'Flutter Team' => '[email protected]' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.ios.deployment_target = '8.0'
end
| flutter/packages/integration_test/integration_test_macos/ios/integration_test_macos.podspec/0 | {
"file_path": "flutter/packages/integration_test/integration_test_macos/ios/integration_test_macos.podspec",
"repo_id": "flutter",
"token_count": 392
} | 856 |
# Copyright 2014 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.
# For details regarding the *Flutter Fix* feature, see
# https://flutter.dev/docs/development/tools/flutter-fix
# Please add new fixes to the top of the file, separated by one blank line
# from other fixes. In a comment, include a link to the PR where the change
# requiring the fix was made.
# Every fix must be tested. See the
# flutter/packages/integration_test/test_fixes/README.md file for instructions
# on testing these data driven fixes.
# For documentation about this file format, see
# https://dart.dev/go/data-driven-fixes.
# * Fixes in this file are for IntegrationTestWidgetsFlutterBinding from the
# integration_test/integration_test.dart file. *
version: 1
transforms:
# Changes made in https://github.com/flutter/flutter/pull/89952
- title: "Remove timeout"
date: 2023-06-26
element:
uris: [ 'integration_test.dart' ]
method: 'runTest'
inClass: 'IntegrationTestWidgetsFlutterBinding'
changes:
- kind: 'removeParameter'
name: 'timeout'
| flutter/packages/integration_test/lib/fix_data/fix_integration_test/fix_binding/fix_integration_test_widgets_flutter_binding.yaml/0 | {
"file_path": "flutter/packages/integration_test/lib/fix_data/fix_integration_test/fix_binding/fix_integration_test_widgets_flutter_binding.yaml",
"repo_id": "flutter",
"token_count": 374
} | 857 |
// Copyright 2014 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.
import 'dart:convert';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
Future<void> main() async {
final IntegrationTestWidgetsFlutterBinding binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized();
binding.allTestsPassed.future.then((_) {
// We use this print to communicate with ../binding_fail_test.dart
// ignore: avoid_print
print('IntegrationTestWidgetsFlutterBinding test results: ${jsonEncode(binding.results)}');
});
testWidgets('failing test 1', (WidgetTester tester) async {
expect(true, false);
});
testWidgets('failing test 2', (WidgetTester tester) async {
expect(true, false);
});
}
| flutter/packages/integration_test/test/data/fail_test_script.dart/0 | {
"file_path": "flutter/packages/integration_test/test/data/fail_test_script.dart",
"repo_id": "flutter",
"token_count": 277
} | 858 |
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.digital_clock">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="digital_clock"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
| flutter_clock/digital_clock/android/app/src/main/AndroidManifest.xml/0 | {
"file_path": "flutter_clock/digital_clock/android/app/src/main/AndroidManifest.xml",
"repo_id": "flutter_clock",
"token_count": 694
} | 859 |
{
"projects": {
"default": "gallery-flutter-dev"
},
"targets": {
"gallery-flutter-dev": {
"hosting": {
"prod": [
"gallery-flutter-dev"
],
"staging": [
"gallery-flutter-staging"
]
}
}
}
}
| gallery/.firebaserc/0 | {
"file_path": "gallery/.firebaserc",
"repo_id": "gallery",
"token_count": 156
} | 860 |
template-arb-file: intl_en.arb
output-localization-file: gallery_localizations.dart
output-class: GalleryLocalizations
preferred-supported-locales:
- en
use-deferred-loading: true
| gallery/l10n.yaml/0 | {
"file_path": "gallery/l10n.yaml",
"repo_id": "gallery",
"token_count": 58
} | 861 |
// 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/cupertino.dart';
import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
// BEGIN cupertinoScrollbarDemo
class CupertinoScrollbarDemo extends StatelessWidget {
const CupertinoScrollbarDemo({super.key});
@override
Widget build(BuildContext context) {
final localizations = GalleryLocalizations.of(context)!;
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
automaticallyImplyLeading: false,
middle: Text(localizations.demoCupertinoScrollbarTitle),
),
child: CupertinoScrollbar(
thickness: 6.0,
thicknessWhileDragging: 10.0,
radius: const Radius.circular(34.0),
radiusWhileDragging: Radius.zero,
child: ListView.builder(
itemCount: 120,
itemBuilder: (context, index) {
return Center(
child: Text('item $index',
style: CupertinoTheme.of(context).textTheme.textStyle),
);
},
),
),
);
}
}
// END
| gallery/lib/demos/cupertino/cupertino_scrollbar_demo.dart/0 | {
"file_path": "gallery/lib/demos/cupertino/cupertino_scrollbar_demo.dart",
"repo_id": "gallery",
"token_count": 489
} | 862 |
// 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_gen/gen_l10n/gallery_localizations.dart';
import 'package:gallery/data/gallery_options.dart';
import 'package:intl/intl.dart';
// BEGIN dataTableDemo
class DataTableDemo extends StatefulWidget {
const DataTableDemo({super.key});
@override
State<DataTableDemo> createState() => _DataTableDemoState();
}
class _RestorableDessertSelections extends RestorableProperty<Set<int>> {
Set<int> _dessertSelections = {};
/// Returns whether or not a dessert row is selected by index.
bool isSelected(int index) => _dessertSelections.contains(index);
/// Takes a list of [_Dessert]s and saves the row indices of selected rows
/// into a [Set].
void setDessertSelections(List<_Dessert> desserts) {
final updatedSet = <int>{};
for (var i = 0; i < desserts.length; i += 1) {
var dessert = desserts[i];
if (dessert.selected) {
updatedSet.add(i);
}
}
_dessertSelections = updatedSet;
notifyListeners();
}
@override
Set<int> createDefaultValue() => _dessertSelections;
@override
Set<int> fromPrimitives(Object? data) {
final selectedItemIndices = data as List<dynamic>;
_dessertSelections = {
...selectedItemIndices.map<int>((dynamic id) => id as int),
};
return _dessertSelections;
}
@override
void initWithValue(Set<int> value) {
_dessertSelections = value;
}
@override
Object toPrimitives() => _dessertSelections.toList();
}
class _DataTableDemoState extends State<DataTableDemo> with RestorationMixin {
final _RestorableDessertSelections _dessertSelections =
_RestorableDessertSelections();
final RestorableInt _rowIndex = RestorableInt(0);
final RestorableInt _rowsPerPage =
RestorableInt(PaginatedDataTable.defaultRowsPerPage);
final RestorableBool _sortAscending = RestorableBool(true);
final RestorableIntN _sortColumnIndex = RestorableIntN(null);
_DessertDataSource? _dessertsDataSource;
@override
String get restorationId => 'data_table_demo';
@override
void restoreState(RestorationBucket? oldBucket, bool initialRestore) {
registerForRestoration(_dessertSelections, 'selected_row_indices');
registerForRestoration(_rowIndex, 'current_row_index');
registerForRestoration(_rowsPerPage, 'rows_per_page');
registerForRestoration(_sortAscending, 'sort_ascending');
registerForRestoration(_sortColumnIndex, 'sort_column_index');
_dessertsDataSource ??= _DessertDataSource(context);
switch (_sortColumnIndex.value) {
case 0:
_dessertsDataSource!._sort<String>((d) => d.name, _sortAscending.value);
break;
case 1:
_dessertsDataSource!
._sort<num>((d) => d.calories, _sortAscending.value);
break;
case 2:
_dessertsDataSource!._sort<num>((d) => d.fat, _sortAscending.value);
break;
case 3:
_dessertsDataSource!._sort<num>((d) => d.carbs, _sortAscending.value);
break;
case 4:
_dessertsDataSource!._sort<num>((d) => d.protein, _sortAscending.value);
break;
case 5:
_dessertsDataSource!._sort<num>((d) => d.sodium, _sortAscending.value);
break;
case 6:
_dessertsDataSource!._sort<num>((d) => d.calcium, _sortAscending.value);
break;
case 7:
_dessertsDataSource!._sort<num>((d) => d.iron, _sortAscending.value);
break;
}
_dessertsDataSource!.updateSelectedDesserts(_dessertSelections);
_dessertsDataSource!.addListener(_updateSelectedDessertRowListener);
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
_dessertsDataSource ??= _DessertDataSource(context);
_dessertsDataSource!.addListener(_updateSelectedDessertRowListener);
}
void _updateSelectedDessertRowListener() {
_dessertSelections.setDessertSelections(_dessertsDataSource!._desserts);
}
void _sort<T>(
Comparable<T> Function(_Dessert d) getField,
int columnIndex,
bool ascending,
) {
_dessertsDataSource!._sort<T>(getField, ascending);
setState(() {
_sortColumnIndex.value = columnIndex;
_sortAscending.value = ascending;
});
}
@override
void dispose() {
_rowsPerPage.dispose();
_sortColumnIndex.dispose();
_sortAscending.dispose();
_dessertsDataSource!.removeListener(_updateSelectedDessertRowListener);
_dessertsDataSource!.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
final localizations = GalleryLocalizations.of(context)!;
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
title: Text(localizations.demoDataTableTitle),
),
body: Scrollbar(
child: ListView(
restorationId: 'data_table_list_view',
padding: const EdgeInsets.all(16),
children: [
PaginatedDataTable(
header: Text(localizations.dataTableHeader),
rowsPerPage: _rowsPerPage.value,
onRowsPerPageChanged: (value) {
setState(() {
_rowsPerPage.value = value!;
});
},
initialFirstRowIndex: _rowIndex.value,
onPageChanged: (rowIndex) {
setState(() {
_rowIndex.value = rowIndex;
});
},
sortColumnIndex: _sortColumnIndex.value,
sortAscending: _sortAscending.value,
onSelectAll: _dessertsDataSource!._selectAll,
columns: [
DataColumn(
label: Text(localizations.dataTableColumnDessert),
onSort: (columnIndex, ascending) =>
_sort<String>((d) => d.name, columnIndex, ascending),
),
DataColumn(
label: Text(localizations.dataTableColumnCalories),
numeric: true,
onSort: (columnIndex, ascending) =>
_sort<num>((d) => d.calories, columnIndex, ascending),
),
DataColumn(
label: Text(localizations.dataTableColumnFat),
numeric: true,
onSort: (columnIndex, ascending) =>
_sort<num>((d) => d.fat, columnIndex, ascending),
),
DataColumn(
label: Text(localizations.dataTableColumnCarbs),
numeric: true,
onSort: (columnIndex, ascending) =>
_sort<num>((d) => d.carbs, columnIndex, ascending),
),
DataColumn(
label: Text(localizations.dataTableColumnProtein),
numeric: true,
onSort: (columnIndex, ascending) =>
_sort<num>((d) => d.protein, columnIndex, ascending),
),
DataColumn(
label: Text(localizations.dataTableColumnSodium),
numeric: true,
onSort: (columnIndex, ascending) =>
_sort<num>((d) => d.sodium, columnIndex, ascending),
),
DataColumn(
label: Text(localizations.dataTableColumnCalcium),
numeric: true,
onSort: (columnIndex, ascending) =>
_sort<num>((d) => d.calcium, columnIndex, ascending),
),
DataColumn(
label: Text(localizations.dataTableColumnIron),
numeric: true,
onSort: (columnIndex, ascending) =>
_sort<num>((d) => d.iron, columnIndex, ascending),
),
],
source: _dessertsDataSource!,
),
],
),
),
);
}
}
class _Dessert {
_Dessert(
this.name,
this.calories,
this.fat,
this.carbs,
this.protein,
this.sodium,
this.calcium,
this.iron,
);
final String name;
final int calories;
final double fat;
final int carbs;
final double protein;
final int sodium;
final int calcium;
final int iron;
bool selected = false;
}
class _DessertDataSource extends DataTableSource {
_DessertDataSource(this.context) {
final localizations = GalleryLocalizations.of(context)!;
_desserts = <_Dessert>[
_Dessert(
localizations.dataTableRowFrozenYogurt,
159,
6.0,
24,
4.0,
87,
14,
1,
),
_Dessert(
localizations.dataTableRowIceCreamSandwich,
237,
9.0,
37,
4.3,
129,
8,
1,
),
_Dessert(
localizations.dataTableRowEclair,
262,
16.0,
24,
6.0,
337,
6,
7,
),
_Dessert(
localizations.dataTableRowCupcake,
305,
3.7,
67,
4.3,
413,
3,
8,
),
_Dessert(
localizations.dataTableRowGingerbread,
356,
16.0,
49,
3.9,
327,
7,
16,
),
_Dessert(
localizations.dataTableRowJellyBean,
375,
0.0,
94,
0.0,
50,
0,
0,
),
_Dessert(
localizations.dataTableRowLollipop,
392,
0.2,
98,
0.0,
38,
0,
2,
),
_Dessert(
localizations.dataTableRowHoneycomb,
408,
3.2,
87,
6.5,
562,
0,
45,
),
_Dessert(
localizations.dataTableRowDonut,
452,
25.0,
51,
4.9,
326,
2,
22,
),
_Dessert(
localizations.dataTableRowApplePie,
518,
26.0,
65,
7.0,
54,
12,
6,
),
_Dessert(
localizations.dataTableRowWithSugar(
localizations.dataTableRowFrozenYogurt,
),
168,
6.0,
26,
4.0,
87,
14,
1,
),
_Dessert(
localizations.dataTableRowWithSugar(
localizations.dataTableRowIceCreamSandwich,
),
246,
9.0,
39,
4.3,
129,
8,
1,
),
_Dessert(
localizations.dataTableRowWithSugar(
localizations.dataTableRowEclair,
),
271,
16.0,
26,
6.0,
337,
6,
7,
),
_Dessert(
localizations.dataTableRowWithSugar(
localizations.dataTableRowCupcake,
),
314,
3.7,
69,
4.3,
413,
3,
8,
),
_Dessert(
localizations.dataTableRowWithSugar(
localizations.dataTableRowGingerbread,
),
345,
16.0,
51,
3.9,
327,
7,
16,
),
_Dessert(
localizations.dataTableRowWithSugar(
localizations.dataTableRowJellyBean,
),
364,
0.0,
96,
0.0,
50,
0,
0,
),
_Dessert(
localizations.dataTableRowWithSugar(
localizations.dataTableRowLollipop,
),
401,
0.2,
100,
0.0,
38,
0,
2,
),
_Dessert(
localizations.dataTableRowWithSugar(
localizations.dataTableRowHoneycomb,
),
417,
3.2,
89,
6.5,
562,
0,
45,
),
_Dessert(
localizations.dataTableRowWithSugar(
localizations.dataTableRowDonut,
),
461,
25.0,
53,
4.9,
326,
2,
22,
),
_Dessert(
localizations.dataTableRowWithSugar(
localizations.dataTableRowApplePie,
),
527,
26.0,
67,
7.0,
54,
12,
6,
),
_Dessert(
localizations.dataTableRowWithHoney(
localizations.dataTableRowFrozenYogurt,
),
223,
6.0,
36,
4.0,
87,
14,
1,
),
_Dessert(
localizations.dataTableRowWithHoney(
localizations.dataTableRowIceCreamSandwich,
),
301,
9.0,
49,
4.3,
129,
8,
1,
),
_Dessert(
localizations.dataTableRowWithHoney(
localizations.dataTableRowEclair,
),
326,
16.0,
36,
6.0,
337,
6,
7,
),
_Dessert(
localizations.dataTableRowWithHoney(
localizations.dataTableRowCupcake,
),
369,
3.7,
79,
4.3,
413,
3,
8,
),
_Dessert(
localizations.dataTableRowWithHoney(
localizations.dataTableRowGingerbread,
),
420,
16.0,
61,
3.9,
327,
7,
16,
),
_Dessert(
localizations.dataTableRowWithHoney(
localizations.dataTableRowJellyBean,
),
439,
0.0,
106,
0.0,
50,
0,
0,
),
_Dessert(
localizations.dataTableRowWithHoney(
localizations.dataTableRowLollipop,
),
456,
0.2,
110,
0.0,
38,
0,
2,
),
_Dessert(
localizations.dataTableRowWithHoney(
localizations.dataTableRowHoneycomb,
),
472,
3.2,
99,
6.5,
562,
0,
45,
),
_Dessert(
localizations.dataTableRowWithHoney(
localizations.dataTableRowDonut,
),
516,
25.0,
63,
4.9,
326,
2,
22,
),
_Dessert(
localizations.dataTableRowWithHoney(
localizations.dataTableRowApplePie,
),
582,
26.0,
77,
7.0,
54,
12,
6,
),
];
}
final BuildContext context;
late List<_Dessert> _desserts;
void _sort<T>(Comparable<T> Function(_Dessert d) getField, bool ascending) {
_desserts.sort((a, b) {
final aValue = getField(a);
final bValue = getField(b);
return ascending
? Comparable.compare(aValue, bValue)
: Comparable.compare(bValue, aValue);
});
notifyListeners();
}
int _selectedCount = 0;
void updateSelectedDesserts(_RestorableDessertSelections selectedRows) {
_selectedCount = 0;
for (var i = 0; i < _desserts.length; i += 1) {
var dessert = _desserts[i];
if (selectedRows.isSelected(i)) {
dessert.selected = true;
_selectedCount += 1;
} else {
dessert.selected = false;
}
}
notifyListeners();
}
@override
DataRow? getRow(int index) {
final format = NumberFormat.decimalPercentPattern(
locale: GalleryOptions.of(context).locale.toString(),
decimalDigits: 0,
);
assert(index >= 0);
if (index >= _desserts.length) return null;
final dessert = _desserts[index];
return DataRow.byIndex(
index: index,
selected: dessert.selected,
onSelectChanged: (value) {
if (dessert.selected != value) {
_selectedCount += value! ? 1 : -1;
assert(_selectedCount >= 0);
dessert.selected = value;
notifyListeners();
}
},
cells: [
DataCell(Text(dessert.name)),
DataCell(Text('${dessert.calories}')),
DataCell(Text(dessert.fat.toStringAsFixed(1))),
DataCell(Text('${dessert.carbs}')),
DataCell(Text(dessert.protein.toStringAsFixed(1))),
DataCell(Text('${dessert.sodium}')),
DataCell(Text(format.format(dessert.calcium / 100))),
DataCell(Text(format.format(dessert.iron / 100))),
],
);
}
@override
int get rowCount => _desserts.length;
@override
bool get isRowCountApproximate => false;
@override
int get selectedRowCount => _selectedCount;
void _selectAll(bool? checked) {
for (final dessert in _desserts) {
dessert.selected = checked ?? false;
}
_selectedCount = checked! ? _desserts.length : 0;
notifyListeners();
}
}
// END
| gallery/lib/demos/material/data_table_demo.dart/0 | {
"file_path": "gallery/lib/demos/material/data_table_demo.dart",
"repo_id": "gallery",
"token_count": 8666
} | 863 |
// 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/services.dart';
import 'package:flutter_gen/gen_l10n/gallery_localizations.dart';
// BEGIN textFieldDemo
class TextFieldDemo extends StatelessWidget {
const TextFieldDemo({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
title: Text(GalleryLocalizations.of(context)!.demoTextFieldTitle),
),
body: const TextFormFieldDemo(),
);
}
}
class TextFormFieldDemo extends StatefulWidget {
const TextFormFieldDemo({super.key});
@override
TextFormFieldDemoState createState() => TextFormFieldDemoState();
}
class PersonData {
String? name = '';
String? phoneNumber = '';
String? email = '';
String password = '';
}
class PasswordField extends StatefulWidget {
const PasswordField({
super.key,
this.restorationId,
this.fieldKey,
this.hintText,
this.labelText,
this.helperText,
this.onSaved,
this.validator,
this.onFieldSubmitted,
this.focusNode,
this.textInputAction,
});
final String? restorationId;
final Key? fieldKey;
final String? hintText;
final String? labelText;
final String? helperText;
final FormFieldSetter<String>? onSaved;
final FormFieldValidator<String>? validator;
final ValueChanged<String>? onFieldSubmitted;
final FocusNode? focusNode;
final TextInputAction? textInputAction;
@override
State<PasswordField> createState() => _PasswordFieldState();
}
class _PasswordFieldState extends State<PasswordField> with RestorationMixin {
final RestorableBool _obscureText = RestorableBool(true);
@override
String? get restorationId => widget.restorationId;
@override
void restoreState(RestorationBucket? oldBucket, bool initialRestore) {
registerForRestoration(_obscureText, 'obscure_text');
}
@override
Widget build(BuildContext context) {
return TextFormField(
key: widget.fieldKey,
restorationId: 'password_text_field',
obscureText: _obscureText.value,
maxLength: 8,
onSaved: widget.onSaved,
validator: widget.validator,
onFieldSubmitted: widget.onFieldSubmitted,
decoration: InputDecoration(
filled: true,
hintText: widget.hintText,
labelText: widget.labelText,
helperText: widget.helperText,
suffixIcon: IconButton(
onPressed: () {
setState(() {
_obscureText.value = !_obscureText.value;
});
},
hoverColor: Colors.transparent,
icon: Icon(
_obscureText.value ? Icons.visibility : Icons.visibility_off,
semanticLabel: _obscureText.value
? GalleryLocalizations.of(context)!
.demoTextFieldShowPasswordLabel
: GalleryLocalizations.of(context)!
.demoTextFieldHidePasswordLabel,
),
),
),
);
}
}
class TextFormFieldDemoState extends State<TextFormFieldDemo>
with RestorationMixin {
PersonData person = PersonData();
late FocusNode _phoneNumber, _email, _lifeStory, _password, _retypePassword;
@override
void initState() {
super.initState();
_phoneNumber = FocusNode();
_email = FocusNode();
_lifeStory = FocusNode();
_password = FocusNode();
_retypePassword = FocusNode();
}
@override
void dispose() {
_phoneNumber.dispose();
_email.dispose();
_lifeStory.dispose();
_password.dispose();
_retypePassword.dispose();
super.dispose();
}
void showInSnackBar(String value) {
ScaffoldMessenger.of(context).hideCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(value),
));
}
@override
String get restorationId => 'text_field_demo';
@override
void restoreState(RestorationBucket? oldBucket, bool initialRestore) {
registerForRestoration(_autoValidateModeIndex, 'autovalidate_mode');
}
final RestorableInt _autoValidateModeIndex =
RestorableInt(AutovalidateMode.disabled.index);
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
final GlobalKey<FormFieldState<String>> _passwordFieldKey =
GlobalKey<FormFieldState<String>>();
final _UsNumberTextInputFormatter _phoneNumberFormatter =
_UsNumberTextInputFormatter();
void _handleSubmitted() {
final form = _formKey.currentState!;
if (!form.validate()) {
_autoValidateModeIndex.value =
AutovalidateMode.always.index; // Start validating on every change.
showInSnackBar(
GalleryLocalizations.of(context)!.demoTextFieldFormErrors,
);
} else {
form.save();
showInSnackBar(GalleryLocalizations.of(context)!
.demoTextFieldNameHasPhoneNumber(person.name!, person.phoneNumber!));
}
}
String? _validateName(String? value) {
if (value == null || value.isEmpty) {
return GalleryLocalizations.of(context)!.demoTextFieldNameRequired;
}
final nameExp = RegExp(r'^[A-Za-z ]+$');
if (!nameExp.hasMatch(value)) {
return GalleryLocalizations.of(context)!
.demoTextFieldOnlyAlphabeticalChars;
}
return null;
}
String? _validatePhoneNumber(String? value) {
final phoneExp = RegExp(r'^\(\d\d\d\) \d\d\d\-\d\d\d\d$');
if (!phoneExp.hasMatch(value!)) {
return GalleryLocalizations.of(context)!.demoTextFieldEnterUSPhoneNumber;
}
return null;
}
String? _validatePassword(String? value) {
final passwordField = _passwordFieldKey.currentState!;
if (passwordField.value == null || passwordField.value!.isEmpty) {
return GalleryLocalizations.of(context)!.demoTextFieldEnterPassword;
}
if (passwordField.value != value) {
return GalleryLocalizations.of(context)!.demoTextFieldPasswordsDoNotMatch;
}
return null;
}
@override
Widget build(BuildContext context) {
const sizedBoxSpace = SizedBox(height: 24);
final localizations = GalleryLocalizations.of(context)!;
return Form(
key: _formKey,
autovalidateMode: AutovalidateMode.values[_autoValidateModeIndex.value],
child: Scrollbar(
child: SingleChildScrollView(
restorationId: 'text_field_demo_scroll_view',
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Column(
children: [
sizedBoxSpace,
TextFormField(
restorationId: 'name_field',
textInputAction: TextInputAction.next,
textCapitalization: TextCapitalization.words,
decoration: InputDecoration(
filled: true,
icon: const Icon(Icons.person),
hintText: localizations.demoTextFieldWhatDoPeopleCallYou,
labelText: localizations.demoTextFieldNameField,
),
onSaved: (value) {
person.name = value;
_phoneNumber.requestFocus();
},
validator: _validateName,
),
sizedBoxSpace,
TextFormField(
restorationId: 'phone_number_field',
textInputAction: TextInputAction.next,
focusNode: _phoneNumber,
decoration: InputDecoration(
filled: true,
icon: const Icon(Icons.phone),
hintText: localizations.demoTextFieldWhereCanWeReachYou,
labelText: localizations.demoTextFieldPhoneNumber,
prefixText: '+1 ',
),
keyboardType: TextInputType.phone,
onSaved: (value) {
person.phoneNumber = value;
_email.requestFocus();
},
maxLength: 14,
maxLengthEnforcement: MaxLengthEnforcement.none,
validator: _validatePhoneNumber,
// TextInputFormatters are applied in sequence.
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.digitsOnly,
// Fit the validating format.
_phoneNumberFormatter,
],
),
sizedBoxSpace,
TextFormField(
restorationId: 'email_field',
textInputAction: TextInputAction.next,
focusNode: _email,
decoration: InputDecoration(
filled: true,
icon: const Icon(Icons.email),
hintText: localizations.demoTextFieldYourEmailAddress,
labelText: localizations.demoTextFieldEmail,
),
keyboardType: TextInputType.emailAddress,
onSaved: (value) {
person.email = value;
_lifeStory.requestFocus();
},
),
sizedBoxSpace,
// Disabled text field
TextFormField(
enabled: false,
restorationId: 'disabled_email_field',
textInputAction: TextInputAction.next,
decoration: InputDecoration(
filled: true,
icon: const Icon(Icons.email),
hintText: localizations.demoTextFieldYourEmailAddress,
labelText: localizations.demoTextFieldEmail,
),
keyboardType: TextInputType.emailAddress,
),
sizedBoxSpace,
TextFormField(
restorationId: 'life_story_field',
focusNode: _lifeStory,
decoration: InputDecoration(
border: const OutlineInputBorder(),
hintText: localizations.demoTextFieldTellUsAboutYourself,
helperText: localizations.demoTextFieldKeepItShort,
labelText: localizations.demoTextFieldLifeStory,
),
maxLines: 3,
),
sizedBoxSpace,
TextFormField(
restorationId: 'salary_field',
textInputAction: TextInputAction.next,
keyboardType: TextInputType.number,
decoration: InputDecoration(
border: const OutlineInputBorder(),
labelText: localizations.demoTextFieldSalary,
suffixText: localizations.demoTextFieldUSD,
),
maxLines: 1,
),
sizedBoxSpace,
PasswordField(
restorationId: 'password_field',
textInputAction: TextInputAction.next,
focusNode: _password,
fieldKey: _passwordFieldKey,
helperText: localizations.demoTextFieldNoMoreThan,
labelText: localizations.demoTextFieldPassword,
onFieldSubmitted: (value) {
setState(() {
person.password = value;
_retypePassword.requestFocus();
});
},
),
sizedBoxSpace,
TextFormField(
restorationId: 'retype_password_field',
focusNode: _retypePassword,
decoration: InputDecoration(
filled: true,
labelText: localizations.demoTextFieldRetypePassword,
),
maxLength: 8,
obscureText: true,
validator: _validatePassword,
onFieldSubmitted: (value) {
_handleSubmitted();
},
),
sizedBoxSpace,
Center(
child: ElevatedButton(
onPressed: _handleSubmitted,
child: Text(localizations.demoTextFieldSubmit),
),
),
sizedBoxSpace,
Text(
localizations.demoTextFieldRequiredField,
style: Theme.of(context).textTheme.bodySmall,
),
sizedBoxSpace,
],
),
),
),
);
}
}
/// Format incoming numeric text to fit the format of (###) ###-#### ##
class _UsNumberTextInputFormatter extends TextInputFormatter {
@override
TextEditingValue formatEditUpdate(
TextEditingValue oldValue,
TextEditingValue newValue,
) {
final newTextLength = newValue.text.length;
final newText = StringBuffer();
var selectionIndex = newValue.selection.end;
var usedSubstringIndex = 0;
if (newTextLength >= 1) {
newText.write('(');
if (newValue.selection.end >= 1) selectionIndex++;
}
if (newTextLength >= 4) {
newText.write('${newValue.text.substring(0, usedSubstringIndex = 3)}) ');
if (newValue.selection.end >= 3) selectionIndex += 2;
}
if (newTextLength >= 7) {
newText.write('${newValue.text.substring(3, usedSubstringIndex = 6)}-');
if (newValue.selection.end >= 6) selectionIndex++;
}
if (newTextLength >= 11) {
newText.write('${newValue.text.substring(6, usedSubstringIndex = 10)} ');
if (newValue.selection.end >= 10) selectionIndex++;
}
// Dump the rest.
if (newTextLength >= usedSubstringIndex) {
newText.write(newValue.text.substring(usedSubstringIndex));
}
return TextEditingValue(
text: newText.toString(),
selection: TextSelection.collapsed(offset: selectionIndex),
);
}
}
// END
| gallery/lib/demos/material/text_field_demo.dart/0 | {
"file_path": "gallery/lib/demos/material/text_field_demo.dart",
"repo_id": "gallery",
"token_count": 6291
} | 864 |
// 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/scheduler.dart';
import 'package:gallery/feature_discovery/animation.dart';
import 'package:gallery/feature_discovery/overlay.dart';
import 'package:get_storage/get_storage.dart';
const _featureHighlightShownKey = 'feature_highlight_shown';
/// [Widget] to enforce a global lock system for [FeatureDiscovery] widgets.
///
/// This widget enforces that at most one [FeatureDiscovery] widget in its
/// widget tree is shown at a time.
///
/// Users wanting to use [FeatureDiscovery] need to put this controller
/// above [FeatureDiscovery] widgets in the widget tree.
class FeatureDiscoveryController extends StatefulWidget {
final Widget child;
const FeatureDiscoveryController(this.child, {super.key});
static _FeatureDiscoveryControllerState _of(BuildContext context) {
final matchResult =
context.findAncestorStateOfType<_FeatureDiscoveryControllerState>();
if (matchResult != null) {
return matchResult;
}
throw FlutterError(
'FeatureDiscoveryController.of() called with a context that does not '
'contain a FeatureDiscoveryController.\n The context used was:\n '
'$context');
}
@override
State<FeatureDiscoveryController> createState() =>
_FeatureDiscoveryControllerState();
}
class _FeatureDiscoveryControllerState
extends State<FeatureDiscoveryController> {
bool _isLocked = false;
/// Flag to indicate whether a [FeatureDiscovery] widget descendant is
/// currently showing its overlay or not.
///
/// If true, then no other [FeatureDiscovery] widget should display its
/// overlay.
bool get isLocked => _isLocked;
/// Lock the controller.
///
/// Note we do not [setState] here because this function will be called
/// by the first [FeatureDiscovery] ready to show its overlay, and any
/// additional [FeatureDiscovery] widgets wanting to show their overlays
/// will already be scheduled to be built, so the lock change will be caught
/// in their builds.
void lock() => _isLocked = true;
/// Unlock the controller.
void unlock() => setState(() => _isLocked = false);
@override
void didChangeDependencies() {
super.didChangeDependencies();
assert(
context.findAncestorStateOfType<_FeatureDiscoveryControllerState>() ==
null,
'There should not be another ancestor of type '
'FeatureDiscoveryController in the widget tree.',
);
}
@override
Widget build(BuildContext context) => widget.child;
}
/// Widget that highlights the [child] with an overlay.
///
/// This widget loosely follows the guidelines set forth in the Material Specs:
/// https://material.io/archive/guidelines/growth-communications/feature-discovery.html.
class FeatureDiscovery extends StatefulWidget {
/// Title to be displayed in the overlay.
final String title;
/// Description to be displayed in the overlay.
final String description;
/// Icon to be promoted.
final Icon child;
/// Flag to indicate whether to show the overlay or not anchored to the
/// [child].
final bool showOverlay;
/// Callback invoked when the user dismisses an overlay.
final void Function()? onDismiss;
/// Callback invoked when the user taps on the tap target of an overlay.
final void Function()? onTap;
/// Color with which to fill the outer circle.
final Color? color;
@visibleForTesting
static const overlayKey = Key('overlay key');
@visibleForTesting
static const gestureDetectorKey = Key('gesture detector key');
const FeatureDiscovery({
super.key,
required this.title,
required this.description,
required this.child,
required this.showOverlay,
this.onDismiss,
this.onTap,
this.color,
});
@override
State<FeatureDiscovery> createState() => _FeatureDiscoveryState();
}
class _FeatureDiscoveryState extends State<FeatureDiscovery>
with TickerProviderStateMixin {
bool showOverlay = false;
FeatureDiscoveryStatus status = FeatureDiscoveryStatus.closed;
late AnimationController openController;
late AnimationController rippleController;
late AnimationController tapController;
late AnimationController dismissController;
late Animations animations;
OverlayEntry? overlay;
Widget buildOverlay(BuildContext ctx, Offset center) {
debugCheckHasMediaQuery(ctx);
debugCheckHasDirectionality(ctx);
final deviceSize = MediaQuery.of(ctx).size;
final color = widget.color ?? Theme.of(ctx).colorScheme.primary;
// Wrap in transparent [Material] to enable widgets that require one.
return Material(
key: FeatureDiscovery.overlayKey,
type: MaterialType.transparency,
child: Stack(
children: [
MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
key: FeatureDiscovery.gestureDetectorKey,
onTap: dismiss,
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.transparent,
),
),
),
Background(
animations: animations,
status: status,
color: color,
center: center,
deviceSize: deviceSize,
textDirection: Directionality.of(ctx),
),
Content(
animations: animations,
status: status,
center: center,
deviceSize: deviceSize,
title: widget.title,
description: widget.description,
textTheme: Theme.of(ctx).textTheme,
),
Ripple(
animations: animations,
status: status,
center: center,
),
TapTarget(
animations: animations,
status: status,
center: center,
onTap: tap,
child: widget.child,
),
],
),
);
}
/// Method to handle user tap on [TapTarget].
///
/// Tapping will stop any active controller and start the [tapController].
void tap() {
openController.stop();
rippleController.stop();
dismissController.stop();
tapController.forward(from: 0.0);
}
/// Method to handle user dismissal.
///
/// Dismissal will stop any active controller and start the
/// [dismissController].
void dismiss() {
openController.stop();
rippleController.stop();
tapController.stop();
dismissController.forward(from: 0.0);
}
@override
Widget build(BuildContext context) {
return LayoutBuilder(builder: (ctx, _) {
if (overlay != null) {
SchedulerBinding.instance.addPostFrameCallback((_) {
// [OverlayEntry] needs to be explicitly rebuilt when necessary.
overlay!.markNeedsBuild();
});
} else {
if (showOverlay && !FeatureDiscoveryController._of(ctx).isLocked) {
final entry = OverlayEntry(
builder: (_) => buildOverlay(ctx, getOverlayCenter(ctx)),
);
// Lock [FeatureDiscoveryController] early in order to prevent
// another [FeatureDiscovery] widget from trying to show its
// overlay while the post frame callback and set state are not
// complete.
FeatureDiscoveryController._of(ctx).lock();
SchedulerBinding.instance.addPostFrameCallback((_) {
setState(() {
overlay = entry;
status = FeatureDiscoveryStatus.closed;
openController.forward(from: 0.0);
});
Overlay.of(context).insert(entry);
});
}
}
return widget.child;
});
}
/// Compute the center position of the overlay.
Offset getOverlayCenter(BuildContext parentCtx) {
final box = parentCtx.findRenderObject() as RenderBox;
final size = box.size;
final topLeftPosition = box.localToGlobal(Offset.zero);
final centerPosition = Offset(
topLeftPosition.dx + size.width / 2,
topLeftPosition.dy + size.height / 2,
);
return centerPosition;
}
@override
void initState() {
super.initState();
initAnimationControllers();
initAnimations();
final localStorage = GetStorage();
final featureHiglightShown =
localStorage.read<bool>(_featureHighlightShownKey) ?? false;
localStorage.write(_featureHighlightShownKey, true);
showOverlay = widget.showOverlay && !featureHiglightShown;
if (showOverlay) {
localStorage.write(_featureHighlightShownKey, true);
}
}
void initAnimationControllers() {
openController = AnimationController(
duration: const Duration(milliseconds: 500),
vsync: this,
)
..addListener(() {
setState(() {});
})
..addStatusListener((animationStatus) {
if (animationStatus == AnimationStatus.forward) {
setState(() => status = FeatureDiscoveryStatus.open);
} else if (animationStatus == AnimationStatus.completed) {
rippleController.forward(from: 0.0);
}
});
rippleController = AnimationController(
duration: const Duration(milliseconds: 1000),
vsync: this,
)
..addListener(() {
setState(() {});
})
..addStatusListener((animationStatus) {
if (animationStatus == AnimationStatus.forward) {
setState(() => status = FeatureDiscoveryStatus.ripple);
} else if (animationStatus == AnimationStatus.completed) {
rippleController.forward(from: 0.0);
}
});
tapController = AnimationController(
duration: const Duration(milliseconds: 250),
vsync: this,
)
..addListener(() {
setState(() {});
})
..addStatusListener((animationStatus) {
if (animationStatus == AnimationStatus.forward) {
setState(() => status = FeatureDiscoveryStatus.tap);
} else if (animationStatus == AnimationStatus.completed) {
widget.onTap?.call();
cleanUponOverlayClose();
}
});
dismissController = AnimationController(
duration: const Duration(milliseconds: 250),
vsync: this,
)
..addListener(() {
setState(() {});
})
..addStatusListener((animationStatus) {
if (animationStatus == AnimationStatus.forward) {
setState(() => status = FeatureDiscoveryStatus.dismiss);
} else if (animationStatus == AnimationStatus.completed) {
widget.onDismiss?.call();
cleanUponOverlayClose();
}
});
}
void initAnimations() {
animations = Animations(
openController,
tapController,
rippleController,
dismissController,
);
}
/// Clean up once overlay has been dismissed or tap target has been tapped.
///
/// This is called upon [tapController] and [dismissController] end.
void cleanUponOverlayClose() {
FeatureDiscoveryController._of(context).unlock();
setState(() {
status = FeatureDiscoveryStatus.closed;
showOverlay = false;
overlay?.remove();
overlay = null;
});
}
@override
void didUpdateWidget(FeatureDiscovery oldWidget) {
super.didUpdateWidget(oldWidget);
if (widget.showOverlay != oldWidget.showOverlay) {
showOverlay = widget.showOverlay;
}
}
@override
void dispose() {
overlay?.remove();
openController.dispose();
rippleController.dispose();
tapController.dispose();
dismissController.dispose();
super.dispose();
}
}
| gallery/lib/feature_discovery/feature_discovery.dart/0 | {
"file_path": "gallery/lib/feature_discovery/feature_discovery.dart",
"repo_id": "gallery",
"token_count": 4278
} | 865 |
{
"loading": "S'està carregant",
"deselect": "Desselecciona",
"select": "Selecciona",
"selectable": "Es pot seleccionar (en mantenir premut)",
"selected": "Seleccionat",
"demo": "Demostració",
"bottomAppBar": "Barra d'aplicacions inferior",
"notSelected": "No seleccionat",
"demoCupertinoSearchTextFieldTitle": "Camp de text de cerca",
"demoCupertinoPicker": "Selector",
"demoCupertinoSearchTextFieldSubtitle": "Camp de text de cerca d'estil iOS",
"demoCupertinoSearchTextFieldDescription": "Camp de text de cerca que permet a l'usuari fer cerques introduint text i que pot oferir i filtrar suggeriments.",
"demoCupertinoSearchTextFieldPlaceholder": "Introdueix text",
"demoCupertinoScrollbarTitle": "Barra de desplaçament",
"demoCupertinoScrollbarSubtitle": "Barra de desplaçament d'estil iOS",
"demoCupertinoScrollbarDescription": "Barra de desplaçament que uneix l'element secundari determinat.",
"demoTwoPaneItem": "Elements {value}",
"demoTwoPaneList": "Llista",
"demoTwoPaneFoldableLabel": "Plegable",
"demoTwoPaneSmallScreenLabel": "Pantalla petita",
"demoTwoPaneSmallScreenDescription": "Aquest és el comportament de TwoPane en un dispositiu amb la pantalla petita.",
"demoTwoPaneTabletLabel": "Tauleta/Ordinador",
"demoTwoPaneTabletDescription": "Aquest és el comportament de TwoPane en una pantalla més gran com ara la d'una tauleta o un ordinador.",
"demoTwoPaneTitle": "TwoPane",
"demoTwoPaneSubtitle": "Dissenys responsius en pantalles plegables, grans i petites",
"splashSelectDemo": "Selecciona una demostració",
"demoTwoPaneFoldableDescription": "Aquest és el comportament de TwoPane en un dispositiu plegable.",
"demoTwoPaneDetails": "Detalls",
"demoTwoPaneSelectItem": "Selecciona un element",
"demoTwoPaneItemDetails": "Detalls de l'element {value}",
"demoCupertinoContextMenuActionText": "Mantén premut el logotip de Flutter per veure el menú contextual.",
"demoCupertinoContextMenuDescription": "Un menú contextual d'estil iOS en pantalla completa que apareix quan un element es manté premut.",
"demoAppBarTitle": "Barra d'aplicacions",
"demoAppBarDescription": "La barra d'aplicacions proporciona accions i contingut relacionats amb la pantalla actual. S'utilitza per al brànding, els títols de pantalles, la navegació i les accions.",
"demoDividerTitle": "Divisor",
"demoDividerSubtitle": "Un divisor és una línia prima que agrupa contingut en llistes i dissenys.",
"demoDividerDescription": "Els divisors es poden utilitzar en llistes, taulers i en qualsevol altre lloc per separar contingut.",
"demoVerticalDividerTitle": "Divisor vertical",
"demoCupertinoContextMenuTitle": "Menú contextual",
"demoCupertinoContextMenuSubtitle": "Menú contextual d'estil iOS",
"demoAppBarSubtitle": "Mostra informació i accions relacionades amb la pantalla actual",
"demoCupertinoContextMenuActionOne": "Acció 1",
"demoCupertinoContextMenuActionTwo": "Acció 2",
"demoDateRangePickerDescription": "Mostra un quadre de diàleg que conté un selector d'intervals de dates de Material Design.",
"demoDateRangePickerTitle": "Selector d'intervals de dates",
"demoNavigationDrawerUserName": "Nom d'usuari",
"demoNavigationDrawerUserEmail": "[email protected]",
"demoNavigationDrawerText": "Llisca des de la vora o toca la icona de la part superior esquerra per veure el tauler",
"demoNavigationRailTitle": "Barra de navegació",
"demoNavigationRailSubtitle": "Es mostra una barra de navegació en una aplicació",
"demoNavigationRailDescription": "Widget material que es mostrarà a l'esquerra o a la dreta d'una aplicació per navegar entre unes quantes visualitzacions, normalment entre tres i cinc.",
"demoNavigationRailFirst": "Primera",
"demoNavigationDrawerTitle": "Tauler de navegació",
"demoNavigationRailThird": "Tercera",
"replyStarredLabel": "Destacats",
"demoTextButtonDescription": "Els botons de text mostren un esquitx de tinta en prémer-los, però no s'eleven. Utilitza els botons de text en barres d'eines, en quadres de diàleg i entre línies amb farciment.",
"demoElevatedButtonTitle": "Botó amb relleu",
"demoElevatedButtonDescription": "Els botons amb relleu aporten dimensió als dissenys plans. Destaquen les funcions en espais amplis o amb molts elements.",
"demoOutlinedButtonTitle": "Botó perfilat",
"demoOutlinedButtonDescription": "Els botons perfilats es tornen opacs i s'eleven en prémer-los. Normalment estan vinculats amb botons amb relleu per indicar una acció secundaria o alternativa.",
"demoContainerTransformDemoInstructions": "Targetes, llistes i BAF",
"demoNavigationDrawerSubtitle": "Es mostra un tauler a la barra d'aplicacions",
"replyDescription": "Una aplicació de correu electrònic centrada i eficient",
"demoNavigationDrawerDescription": "Tauler de Material Design que llisca horitzontalment des de la vora cap a la part interior de la pantalla per mostrar enllaços de navegació en una aplicació.",
"replyDraftsLabel": "Esborranys",
"demoNavigationDrawerToPageOne": "Element 1",
"replyInboxLabel": "Safata d'entrada",
"demoSharedXAxisDemoInstructions": "Botons Següent i Enrere",
"replySpamLabel": "Correu brossa",
"replyTrashLabel": "Paperera",
"replySentLabel": "Enviats",
"demoNavigationRailSecond": "Segona",
"demoNavigationDrawerToPageTwo": "Element 2",
"demoFadeScaleDemoInstructions": "Modal i BAF",
"demoFadeThroughDemoInstructions": "Navegació inferior",
"demoSharedZAxisDemoInstructions": "Botó de la icona de configuració",
"demoSharedYAxisDemoInstructions": "Ordena per Reproduït recentment",
"demoTextButtonTitle": "Botó de text",
"demoSharedZAxisBeefSandwichRecipeTitle": "Entrepà de vedella",
"demoSharedZAxisDessertRecipeDescription": "Recepta de postres",
"demoSharedYAxisAlbumTileSubtitle": "Artista",
"demoSharedYAxisAlbumTileTitle": "Àlbum",
"demoSharedYAxisRecentSortTitle": "Reproduït recentment",
"demoSharedYAxisAlphabeticalSortTitle": "A-Z",
"demoSharedYAxisAlbumCount": "268 àlbums",
"demoSharedYAxisTitle": "Eix Y compartit",
"demoSharedXAxisCreateAccountButtonText": "CREA UN COMPTE",
"demoFadeScaleAlertDialogDiscardButton": "DESCARTA",
"demoSharedXAxisSignInTextFieldLabel": "Adreça electrònica o número de telèfon",
"demoSharedXAxisSignInSubtitleText": "Inicia la sessió amb el teu compte",
"demoSharedXAxisSignInWelcomeText": "Hola, David Park",
"demoSharedXAxisIndividualCourseSubtitle": "Es mostra de manera individual",
"demoSharedXAxisBundledCourseSubtitle": "Grup",
"demoFadeThroughAlbumsDestination": "Àlbums",
"demoSharedXAxisDesignCourseTitle": "Disseny",
"demoSharedXAxisIllustrationCourseTitle": "Il·lustració",
"demoSharedXAxisBusinessCourseTitle": "Negocis",
"demoSharedXAxisArtsAndCraftsCourseTitle": "Arts i treballs manuals",
"demoMotionPlaceholderSubtitle": "Text secundari",
"demoFadeScaleAlertDialogCancelButton": "CANCEL·LA",
"demoFadeScaleAlertDialogHeader": "Quadre de diàleg d'alerta",
"demoFadeScaleHideFabButton": "AMAGA EL BAF",
"demoFadeScaleShowFabButton": "MOSTRA EL BAF",
"demoFadeScaleShowAlertDialogButton": "MOSTRA EL MODAL",
"demoFadeScaleDescription": "El patró d'atenuació s'utilitza en elements de la IU que s'obren o es tanquen dins dels límits de la pantalla, com ara un quadre de diàleg que s'atenua al centre de la pantalla.",
"demoFadeScaleTitle": "Atenuació",
"demoFadeThroughTextPlaceholder": "123 fotos",
"demoFadeThroughSearchDestination": "Cerca",
"demoFadeThroughPhotosDestination": "Fotos",
"demoSharedXAxisCoursePageSubtitle": "Les categories agrupades es mostren com a grups al teu feed. Pots canviar aquesta opció en qualsevol moment.",
"demoFadeThroughDescription": "El patró d'esvaïment s'utilitza per a transicions entre elements de la IU que no tenen una relació estreta entre ells.",
"demoFadeThroughTitle": "Esvaïment",
"demoSharedZAxisHelpSettingLabel": "Ajuda",
"demoMotionSubtitle": "Tots els patrons de transició predefinits",
"demoSharedZAxisNotificationSettingLabel": "Notificacions",
"demoSharedZAxisProfileSettingLabel": "Perfil",
"demoSharedZAxisSavedRecipesListTitle": "Receptes desades",
"demoSharedZAxisBeefSandwichRecipeDescription": "Recepta d'entrepà de vedella",
"demoSharedZAxisCrabPlateRecipeDescription": "Recepta de plat de cranc",
"demoSharedXAxisCoursePageTitle": "Optimitza els teus cursos",
"demoSharedZAxisCrabPlateRecipeTitle": "Cranc",
"demoSharedZAxisShrimpPlateRecipeDescription": "Recepta de plat de gambes",
"demoSharedZAxisShrimpPlateRecipeTitle": "Gamba",
"demoContainerTransformTypeFadeThrough": "ESVAÏMENT",
"demoSharedZAxisDessertRecipeTitle": "Postres",
"demoSharedZAxisSandwichRecipeDescription": "Recepta d'entrepà",
"demoSharedZAxisSandwichRecipeTitle": "Entrepà",
"demoSharedZAxisBurgerRecipeDescription": "Recepta d'hamburguesa",
"demoSharedZAxisBurgerRecipeTitle": "Hamburguesa",
"demoSharedZAxisSettingsPageTitle": "Configuració",
"demoSharedZAxisTitle": "Eix Z compartit",
"demoSharedZAxisPrivacySettingLabel": "Privadesa",
"demoMotionTitle": "Moviment",
"demoContainerTransformTitle": "Transformació de contenidors",
"demoContainerTransformDescription": "El patró de transformació de contenidors està dissenyat per a transicions entre elements de la IU que inclouen un contenidor. Aquest patró crea una connexió visible entre 2 elements de la IU.",
"demoContainerTransformModalBottomSheetTitle": "Mode d'atenuació",
"demoContainerTransformTypeFade": "ATENUACIÓ",
"demoSharedYAxisAlbumTileDurationUnit": "min",
"demoMotionPlaceholderTitle": "Títol",
"demoSharedXAxisForgotEmailButtonText": "HAS OBLIDAT L'ADREÇA ELECTRÒNICA?",
"demoMotionSmallPlaceholderSubtitle": "Secundari",
"demoMotionDetailsPageTitle": "Pàgina de detalls",
"demoMotionListTileTitle": "Element de llista",
"demoSharedAxisDescription": "El patró d'eix compartit s'utilitza per a transicions entre elements de la IU que tenen una relació espacial o de navegació. Aquest patró utilitza una transformació compartida a l'eix x, y o z per reforçar la relació entre els elements.",
"demoSharedXAxisTitle": "Eix X compartit",
"demoSharedXAxisBackButtonText": "ENRERE",
"demoSharedXAxisNextButtonText": "SEGÜENT",
"demoSharedXAxisCulinaryCourseTitle": "Sector culinari",
"githubRepo": "repositori de GitHub {repoName}",
"fortnightlyMenuUS": "EUA",
"fortnightlyMenuBusiness": "Negocis",
"fortnightlyMenuScience": "Ciència",
"fortnightlyMenuSports": "Esports",
"fortnightlyMenuTravel": "Viatges",
"fortnightlyMenuCulture": "Cultura",
"fortnightlyTrendingTechDesign": "DissenyTecnològic",
"rallyBudgetDetailAmountLeft": "Import restant",
"fortnightlyHeadlineArmy": "La reforma de l'Exèrcit Verd des de dins",
"fortnightlyDescription": "Una aplicació de notícies centrada en el contingut",
"rallyBillDetailAmountDue": "Import pendent",
"rallyBudgetDetailTotalCap": "Límit total",
"rallyBudgetDetailAmountUsed": "Import utilitzat",
"fortnightlyTrendingHealthcareRevolution": "RevolucióSanitària",
"fortnightlyMenuFrontPage": "Portada",
"fortnightlyMenuWorld": "Internacional",
"rallyBillDetailAmountPaid": "Import pagat",
"fortnightlyMenuPolitics": "Política",
"fortnightlyHeadlineBees": "Escassetat d’abelles de camp",
"fortnightlyHeadlineGasoline": "El futur de la gasolina",
"fortnightlyTrendingGreenArmy": "ExèrcitVerd",
"fortnightlyHeadlineFeminists": "El feminisme pren partit",
"fortnightlyHeadlineFabrics": "Uns dissenyadors creen teixits futuristes utilitzant tecnologia",
"fortnightlyHeadlineStocks": "Les accions s'estanquen i les mirades se centren en la moneda",
"fortnightlyTrendingReform": "Reforma",
"fortnightlyMenuTech": "Tecnologia",
"fortnightlyHeadlineWar": "Vides separades als EUA durant la guerra",
"fortnightlyHeadlineHealthcare": "La revolució sanitària: silenciosa, però poderosa",
"fortnightlyLatestUpdates": "Últimes novetats",
"fortnightlyTrendingStocks": "Accions",
"rallyBillDetailTotalAmount": "Import total",
"demoCupertinoPickerDateTime": "Data i hora",
"signIn": "INICIA LA SESSIÓ",
"dataTableRowWithSugar": "{value} amb sucre",
"dataTableRowApplePie": "Pastís de poma",
"dataTableRowDonut": "Dònut",
"dataTableRowHoneycomb": "Bresca",
"dataTableRowLollipop": "Piruleta",
"dataTableRowJellyBean": "Mongetes de gelea",
"dataTableRowGingerbread": "Pa de gingebre",
"dataTableRowCupcake": "Cupcake",
"dataTableRowEclair": "Éclair",
"dataTableRowIceCreamSandwich": "Sandvitx de gelat",
"dataTableRowFrozenYogurt": "Iogurt gelat",
"dataTableColumnIron": "Ferro (%)",
"dataTableColumnCalcium": "Calci (%)",
"dataTableColumnSodium": "Sodi (mg)",
"demoTimePickerTitle": "Selector d'hora",
"demo2dTransformationsResetTooltip": "Restableix les transformacions",
"dataTableColumnFat": "Matèria grassa (g)",
"dataTableColumnCalories": "Calories",
"dataTableColumnDessert": "Postres (1 ració)",
"cardsDemoTravelDestinationLocation1": "Thanjavur, Tamil Nadu",
"demoTimePickerDescription": "Mostra un quadre de diàleg que conté un selector d'hora de Material Design.",
"demoPickersShowPicker": "MOSTRA EL SELECTOR",
"demoTabsScrollingTitle": "Desplaçable",
"demoTabsNonScrollingTitle": "No desplaçable",
"craneHours": "{hours,plural,=1{1 h}other{{hours} h}}",
"craneMinutes": "{minutes,plural,=1{1 min}other{{minutes} min}}",
"craneFlightDuration": "{hoursShortForm} {minutesShortForm}",
"dataTableHeader": "Nutrició",
"demoDatePickerTitle": "Selector de data",
"demoPickersSubtitle": "Selecció de data i hora",
"demoPickersTitle": "Selectors",
"demo2dTransformationsEditTooltip": "Edita el mosaic",
"demoDataTableDescription": "Les taules de dades mostren informació en un format de quadrícula estructurat en files i columnes. Organitzen la informació de manera que sigui fàcil d'analitzar, perquè els usuaris puguin cercar patrons i estadístiques.",
"demo2dTransformationsDescription": "Toca per editar mosaics i fes servir gestos per moure't per l'escena. Arrossega per obtenir una panoràmica, pinça per fer zoom i gira amb dos dits. Prem el botó de restabliment per tornar a l'orientació inicial.",
"demo2dTransformationsSubtitle": "Panoràmica, zoom i rotació",
"demo2dTransformationsTitle": "Transformacions 2D",
"demoCupertinoTextFieldPIN": "PIN",
"demoCupertinoTextFieldDescription": "Un camp de text permet que l'usuari introdueixi text, tant des del teclat del maquinari com del teclat en pantalla.",
"demoCupertinoTextFieldSubtitle": "Camps de text d'estil iOS",
"demoCupertinoTextFieldTitle": "Camps de text",
"demoDatePickerDescription": "Mostra un quadre de diàleg que conté un selector de data de Material Design.",
"demoCupertinoPickerTime": "Hora",
"demoCupertinoPickerDate": "Data",
"demoCupertinoPickerTimer": "Temporitzador",
"demoCupertinoPickerDescription": "Widget selector d'estil iOS que es pot utilitzar per seleccionar cadenes i dates o hores, o totes dues coses.",
"demoCupertinoPickerSubtitle": "Selectors d'estil iOS",
"demoCupertinoPickerTitle": "Selectors",
"dataTableRowWithHoney": "{value} amb mel",
"cardsDemoTravelDestinationCity2": "Chettinad",
"bannerDemoResetText": "Restableix el bàner",
"bannerDemoMultipleText": "Diverses accions",
"bannerDemoLeadingText": "Icona inicial",
"dismiss": "IGNORA",
"cardsDemoTappable": "Es pot tocar",
"cardsDemoSelectable": "Es pot seleccionar (en mantenir premut)",
"cardsDemoExplore": "Explora",
"cardsDemoExploreSemantics": "Explora {destinationName}",
"cardsDemoShareSemantics": "Comparteix {destinationName}",
"cardsDemoTravelDestinationTitle1": "Les 10 ciutats de Tamil Nadu que has de visitar",
"cardsDemoTravelDestinationDescription1": "Número 10",
"cardsDemoTravelDestinationCity1": "Thanjavur",
"dataTableColumnProtein": "Proteïnes (g)",
"cardsDemoTravelDestinationTitle2": "Artesans del sud de l'Índia",
"cardsDemoTravelDestinationDescription2": "Filadors de seda",
"bannerDemoText": "La contrasenya s'ha actualitzat al teu altre dispositiu. Torna a iniciar la sessió.",
"cardsDemoTravelDestinationLocation2": "Sivaganga, Tamil Nadu",
"cardsDemoTravelDestinationTitle3": "Temple de Brihadisvara",
"cardsDemoTravelDestinationDescription3": "Temples",
"demoBannerTitle": "Bàner",
"demoBannerSubtitle": "Es mostra un bàner en una llista",
"demoBannerDescription": "Un bàner mostra un missatge breu important i proporciona als usuaris accions per dur a terme (o per ignorar el bàner). Per poder-lo ignorar, l'usuari ha de fer una acció.",
"demoCardTitle": "Targetes",
"demoCardSubtitle": "Targetes de referència amb les cantonades arrodonides",
"demoCardDescription": "Una targeta és un full de Material Design que s'utilitza per representar informació relacionada, com ara un àlbum, una ubicació geogràfica, un àpat, dades de contacte, etc.",
"demoDataTableTitle": "Taules de dades",
"demoDataTableSubtitle": "Files i columnes d'informació",
"dataTableColumnCarbs": "Carbohidrats (g)",
"placeTanjore": "Thanjavur",
"demoGridListsTitle": "Llistes amb quadrícula",
"placeFlowerMarket": "Mercat de flors",
"placeBronzeWorks": "Obres de bronze",
"placeMarket": "Mercat",
"placeThanjavurTemple": "Temple de Thanjavur",
"placeSaltFarm": "Salina",
"placeScooters": "Escúters",
"placeSilkMaker": "Teler de seda",
"placeLunchPrep": "Preparació del dinar",
"placeBeach": "Platja",
"placeFisherman": "Pescador",
"demoMenuSelected": "Seleccionat: {value}",
"demoMenuRemove": "Suprimeix",
"demoMenuGetLink": "Obtén l'enllaç",
"demoMenuShare": "Comparteix",
"demoBottomAppBarSubtitle": "Mostra la navegació i les accions a la part inferior",
"demoMenuAnItemWithASectionedMenu": "Un element amb un menú amb seccions",
"demoMenuADisabledMenuItem": "Element de menú desactivat",
"demoLinearProgressIndicatorTitle": "Indicador de progrés lineal",
"demoMenuContextMenuItemOne": "Element de menú contextual u",
"demoMenuAnItemWithASimpleMenu": "Un element amb un menú senzill",
"demoCustomSlidersTitle": "Controls lliscants personalitzats",
"demoMenuAnItemWithAChecklistMenu": "Un element amb un menú amb llista de comprovació",
"demoCupertinoActivityIndicatorTitle": "Indicador d'activitat",
"demoCupertinoActivityIndicatorSubtitle": "Indicador d'activitat d'estil iOS",
"demoCupertinoActivityIndicatorDescription": "Indicador d'activitat d'estil iOS que gira en sentit horari.",
"demoCupertinoNavigationBarTitle": "Barra de navegació",
"demoCupertinoNavigationBarSubtitle": "Barra de navegació d'estil iOS",
"demoCupertinoNavigationBarDescription": "Una barra de navegació d'estil iOS. La barra de navegació és una barra d'eines que consisteix com a mínim en un títol de pàgina al mig de la barra.",
"demoCupertinoPullToRefreshTitle": "Llisca cap avall per actualitzar",
"demoCupertinoPullToRefreshSubtitle": "Control \"Llisca cap avall per actualitzar\" d'estil iOS",
"demoCupertinoPullToRefreshDescription": "Un widget que implementa el control de contingut amb la funció \"Llisca cap avall per actualitzar\" d'estil iOS.",
"demoProgressIndicatorTitle": "Indicadors de progrés",
"demoProgressIndicatorSubtitle": "Lineals, circulars, indeterminats",
"demoCircularProgressIndicatorTitle": "Indicador de progrés circular",
"demoCircularProgressIndicatorDescription": "Indicador de progrés circular de Material Design; gira per indicar que l'aplicació està ocupada.",
"demoMenuFour": "Quatre",
"demoLinearProgressIndicatorDescription": "Indicador de progrés lineal de Material Design; també es coneix com a barra de progrés.",
"demoTooltipTitle": "Descripcions emergents",
"demoTooltipSubtitle": "Missatge breu que es mostra en mantenir premuda una opció o en passar el cursor per sobre",
"demoTooltipDescription": "Les descripcions emergents proporcionen etiquetes de text que ajuden a explicar la funció d'un botó o d'altres accions de la interfície d'usuari. Les descripcions emergents mostren text informatiu quan els usuaris passen el cursor per sobre d'un element, el seleccionen amb el teclat o el mantenen premut.",
"demoTooltipInstructions": "Mantén premut o passa el cursor per sobre d'un element perquè es mostri la descripció emergent.",
"placeChennai": "Chennai",
"demoMenuChecked": "Marcat: {value}",
"placeChettinad": "Chettinad",
"demoMenuPreview": "Previsualitza",
"demoBottomAppBarTitle": "Barra de l'aplicació de la part inferior",
"demoBottomAppBarDescription": "Les barres d'aplicacions de la part inferior permeten accedir a un tauler de navegació de la part inferior i a un màxim de quatre accions, inclosa la del botó d'acció flotant.",
"bottomAppBarNotch": "Retall",
"bottomAppBarPosition": "Posició del botó d'acció flotant",
"bottomAppBarPositionDockedEnd": "Acoblat: al final",
"bottomAppBarPositionDockedCenter": "Acoblat: al centre",
"bottomAppBarPositionFloatingEnd": "Flotant: al final",
"bottomAppBarPositionFloatingCenter": "Flotant: al centre",
"demoSlidersEditableNumericalValue": "Valor numèric editable",
"demoGridListsSubtitle": "Disseny de fila i columna",
"demoGridListsDescription": "Les llistes amb quadrícula són les més adequades per presentar dades homogènies, normalment imatges. Cada element d'una llista amb quadrícula s'anomena \"mosaic\".",
"demoGridListsImageOnlyTitle": "Només imatge",
"demoGridListsHeaderTitle": "Amb capçalera",
"demoGridListsFooterTitle": "Amb peu de pàgina",
"demoSlidersTitle": "Controls lliscants",
"demoSlidersSubtitle": "Widgets per seleccionar un valor fent lliscar el dit",
"demoSlidersDescription": "Els controls lliscants mostren un interval de valors al llarg d'una barra i els usuaris poden seleccionar-ne un. Són ideals per ajustar opcions de configuració com el volum o la brillantor, o bé per aplicar filtres d'imatge.",
"demoRangeSlidersTitle": "Controls lliscants d'intervals",
"demoRangeSlidersDescription": "Els controls lliscants mostren un interval de valors al llarg d'una barra, que pot tenir icones als dos extrems. Són ideals per ajustar opcions de configuració com el volum o la brillantor, o bé per aplicar filtres d'imatge.",
"demoMenuAnItemWithAContextMenuButton": "Un element amb un menú contextual",
"demoCustomSlidersDescription": "Els controls lliscants mostren un interval de valors al llarg d'una barra i els usuaris poden seleccionar-ne un o un interval. Pots personalitzar els controls lliscants i aplicar-hi temes.",
"demoSlidersContinuousWithEditableNumericalValue": "Valors continus amb un valor numèric editable",
"demoSlidersDiscrete": "Valors discrets",
"demoSlidersDiscreteSliderWithCustomTheme": "Control lliscant de valors discrets amb un tema personalitzat",
"demoSlidersContinuousRangeSliderWithCustomTheme": "Control lliscant d'interval amb valors continus i un tema personalitzat",
"demoSlidersContinuous": "Valors continus",
"placePondicherry": "Pondicherry",
"demoMenuTitle": "Menú",
"demoContextMenuTitle": "Menú contextual",
"demoSectionedMenuTitle": "Menú amb seccions",
"demoSimpleMenuTitle": "Menú senzill",
"demoChecklistMenuTitle": "Menú amb llista de comprovació",
"demoMenuSubtitle": "Botons de menú i menús senzills",
"demoMenuDescription": "Un menú mostra una llista d'opcions sobre una superfície temporal. Es mostren quan els usuaris fan determinades accions o interaccionen amb un botó o un altre control.",
"demoMenuItemValueOne": "Element de menú u",
"demoMenuItemValueTwo": "Element de menú dos",
"demoMenuItemValueThree": "Element de menú tres",
"demoMenuOne": "U",
"demoMenuTwo": "Dos",
"demoMenuThree": "Tres",
"demoMenuContextMenuItemThree": "Element de menú contextual tres",
"demoCupertinoSwitchSubtitle": "Interruptor d'estil iOS",
"demoSnackbarsText": "Això és una barra de notificacions.",
"demoCupertinoSliderSubtitle": "Control lliscant d'estil iOS",
"demoCupertinoSliderDescription": "Pots utilitzar el control lliscant per fer seleccions en conjunts de valors tant discrets com continus.",
"demoCupertinoSliderContinuous": "Continu: {value}",
"demoCupertinoSliderDiscrete": "Discret: {value}",
"demoSnackbarsAction": "Has premut l'acció de la barra de notificacions.",
"backToGallery": "Torna a la galeria",
"demoCupertinoTabBarTitle": "Barra de pestanyes",
"demoCupertinoSwitchDescription": "Els interruptors s'utilitzen per commutar una única opció de configuració a activada o desactivada.",
"demoSnackbarsActionButtonLabel": "ACCIÓ",
"cupertinoTabBarProfileTab": "Perfil",
"demoSnackbarsButtonLabel": "MOSTRA UNA BARRA DE NOTIFICACIONS",
"demoSnackbarsDescription": "Les barres de notificacions informen els usuaris dels processos que han dut o duran a terme les aplicacions i es mostren temporalment a la part inferior de la pantalla. No interrompen l'experiència d'usuari ni cal cap acció perquè deixin de mostrar-se.",
"demoSnackbarsSubtitle": "Les barres de notificacions mostren missatges a la part inferior de la pantalla",
"demoSnackbarsTitle": "Barres de notificacions",
"demoCupertinoSliderTitle": "Control lliscant",
"cupertinoTabBarChatTab": "Xat",
"cupertinoTabBarHomeTab": "Inici",
"demoCupertinoTabBarDescription": "Una barra de pestanyes de navegació d'estil iOS situada a la part inferior. Mostra diverses pestanyes quan n'hi ha una d'activada, la primera de manera predeterminada.",
"demoCupertinoTabBarSubtitle": "Barra de pestanyes d'estil iOS a la part inferior",
"demoOptionsFeatureTitle": "Mostra les opcions",
"demoOptionsFeatureDescription": "Toca aquí per veure les opcions disponibles per a aquesta demostració.",
"demoCodeViewerCopyAll": "COPIA-HO TOT",
"shrineScreenReaderRemoveProductButton": "Suprimeix {product}",
"shrineScreenReaderProductAddToCart": "Afegeix al carretó",
"shrineScreenReaderCart": "{quantity,plural,=0{Carretó electrònic, cap article}=1{Carretó electrònic, 1 article}other{Carretó electrònic, {quantity} articles}}",
"demoCodeViewerFailedToCopyToClipboardMessage": "No s'ha pogut copiar al porta-retalls: {error}",
"demoCodeViewerCopiedToClipboardMessage": "S'ha copiat al porta-retalls.",
"craneSleep8SemanticLabel": "Ruïnes maies en un cingle a la platja",
"craneSleep4SemanticLabel": "Hotel vora un llac i davant d'unes muntanyes",
"craneSleep2SemanticLabel": "Ciutadella de Machu Picchu",
"craneSleep1SemanticLabel": "Xalet en un paisatge nevat amb arbres de fulla perenne",
"craneSleep0SemanticLabel": "Bungalous flotants",
"craneFly13SemanticLabel": "Piscina vora el mar amb palmeres",
"craneFly12SemanticLabel": "Piscina amb palmeres",
"craneFly11SemanticLabel": "Far de maons al mar",
"craneFly10SemanticLabel": "Torres de la mesquita d'Al-Azhar durant la posta de sol",
"craneFly9SemanticLabel": "Home recolzat en un cotxe blau antic",
"craneFly8SemanticLabel": "Supertree Grove",
"craneEat9SemanticLabel": "Mostrador d'una cafeteria amb pastes",
"craneEat2SemanticLabel": "Hamburguesa",
"craneFly5SemanticLabel": "Hotel vora un llac i davant d'unes muntanyes",
"demoSelectionControlsSubtitle": "Caselles de selecció, botons d'opció i interruptors",
"craneEat10SemanticLabel": "Dona amb un entrepà de pastrami enorme",
"craneFly4SemanticLabel": "Bungalous flotants",
"craneEat7SemanticLabel": "Entrada d'una fleca",
"craneEat6SemanticLabel": "Plat de gambes",
"craneEat5SemanticLabel": "Taules d'un restaurant artístic",
"craneEat4SemanticLabel": "Postres de xocolata",
"craneEat3SemanticLabel": "Taco coreà",
"craneFly3SemanticLabel": "Ciutadella de Machu Picchu",
"craneEat1SemanticLabel": "Bar buit amb tamborets d'estil americà",
"craneEat0SemanticLabel": "Pizza al forn de llenya",
"craneSleep11SemanticLabel": "Gratacel Taipei 101",
"craneSleep10SemanticLabel": "Torres de la mesquita d'Al-Azhar durant la posta de sol",
"craneSleep9SemanticLabel": "Far de maons al mar",
"craneEat8SemanticLabel": "Plat de cranc de riu",
"craneSleep7SemanticLabel": "Apartaments acolorits a la Praça da Ribeira",
"craneSleep6SemanticLabel": "Piscina amb palmeres",
"craneSleep5SemanticLabel": "Tenda de campanya al camp",
"settingsButtonCloseLabel": "Tanca la configuració",
"demoSelectionControlsCheckboxDescription": "Les caselles de selecció permeten que l'usuari seleccioni diverses opcions d'un conjunt. Normalment, el valor d'una casella de selecció és vertader o fals; en cas d'una casella de selecció amb tres estats, el tercer valor també pot ser nul.",
"settingsButtonLabel": "Configuració",
"demoListsTitle": "Llistes",
"demoListsSubtitle": "Desplaçar-se per dissenys de llistes",
"demoListsDescription": "Una fila d'alçada fixa que normalment conté text i una icona al principi o al final.",
"demoOneLineListsTitle": "Una línia",
"demoTwoLineListsTitle": "Dues línies",
"demoListsSecondary": "Text secundari",
"demoSelectionControlsTitle": "Controls de selecció",
"craneFly7SemanticLabel": "Mont Rushmore",
"demoSelectionControlsCheckboxTitle": "Casella de selecció",
"craneSleep3SemanticLabel": "Home recolzat en un cotxe blau antic",
"demoSelectionControlsRadioTitle": "Opció",
"demoSelectionControlsRadioDescription": "Els botons d'opció permeten que l'usuari seleccioni una opció d'un conjunt. Fes-los servir si vols que l'usuari pugui veure totes les opcions disponibles, però només en pugui triar una.",
"demoSelectionControlsSwitchTitle": "Interruptor",
"demoSelectionControlsSwitchDescription": "Els interruptors commuten l'estat d'una única opció de configuració. L'etiqueta inserida corresponent ha de descriure l'opció que controla l'interruptor i l'estat en què es troba.",
"craneFly0SemanticLabel": "Xalet en un paisatge nevat amb arbres de fulla perenne",
"craneFly1SemanticLabel": "Tenda de campanya al camp",
"craneFly2SemanticLabel": "Banderes de pregària amb una muntanya nevada en segon pla",
"craneFly6SemanticLabel": "Vista aèria del Palau de Belles Arts",
"rallySeeAllAccounts": "Mostra tots els comptes",
"rallyBillAmount": "Data de venciment de la factura {billName} ({amount}): {date}.",
"shrineTooltipCloseCart": "Tanca el carretó",
"shrineTooltipCloseMenu": "Tanca el menú",
"shrineTooltipOpenMenu": "Obre el menú",
"shrineTooltipSettings": "Configuració",
"shrineTooltipSearch": "Cerca",
"demoTabsDescription": "Les pestanyes organitzen el contingut en diferents pantalles, conjunts de dades i altres interaccions.",
"demoTabsSubtitle": "Pestanyes amb visualitzacions desplaçables de manera independent",
"demoTabsTitle": "Pestanyes",
"rallyBudgetAmount": "Has gastat {amountUsed} de {amountTotal} del pressupost {budgetName}; import restant: {amountLeft}",
"shrineTooltipRemoveItem": "Suprimeix l'article",
"rallyAccountAmount": "Import al compte {accountName} amb el número {accountNumber}: {amount}.",
"rallySeeAllBudgets": "Mostra tots els pressupostos",
"rallySeeAllBills": "Mostra totes les factures",
"craneFormDate": "Selecciona la data",
"craneFormOrigin": "Tria l'origen",
"craneFly2": "Vall del Khumbu, Nepal",
"craneFly3": "Machu Picchu, Perú",
"craneFly4": "Male, Maldives",
"craneFly5": "Vitznau, Suïssa",
"craneFly6": "Ciutat de Mèxic, Mèxic",
"craneFly7": "Mont Rushmore, Estats Units",
"settingsTextDirectionLocaleBased": "Segons la configuració regional",
"craneFly9": "L'Havana, Cuba",
"craneFly10": "El Caire, Egipte",
"craneFly11": "Lisboa, Portugal",
"craneFly12": "Napa, Estats Units",
"craneFly13": "Bali, Indonèsia",
"craneSleep0": "Male, Maldives",
"craneSleep1": "Aspen, Estats Units",
"craneSleep2": "Machu Picchu, Perú",
"demoCupertinoSegmentedControlTitle": "Control segmentat",
"craneSleep4": "Vitznau, Suïssa",
"craneSleep5": "Big Sur, Estats Units",
"craneSleep6": "Napa, Estats Units",
"craneSleep7": "Porto, Portugal",
"craneSleep8": "Tulum, Mèxic",
"craneEat5": "Seül, Corea del Sud",
"demoChipTitle": "Etiquetes",
"demoChipSubtitle": "Elements compactes que representen una entrada, un atribut o una acció",
"demoActionChipTitle": "Etiqueta d'acció",
"demoActionChipDescription": "Les etiquetes d'acció són un conjunt d'opcions que activen una acció relacionada amb el contingut principal. Es mostren de manera dinàmica i contextual a les interfícies d'usuari.",
"demoChoiceChipTitle": "Etiqueta de selecció",
"demoChoiceChipDescription": "Les etiquetes de selecció representen una opció única d'entre les d'un conjunt i contenen text descriptiu relacionat o categories.",
"demoFilterChipTitle": "Etiqueta de filtre",
"demoFilterChipDescription": "Les etiquetes de filtre utilitzen etiquetes o paraules descriptives per filtrar contingut.",
"demoInputChipTitle": "Etiqueta d'entrada",
"demoInputChipDescription": "Les etiquetes d'entrada representen una informació complexa, com ara una entitat (persona, lloc o cosa) o un text de conversa, en format compacte.",
"craneSleep9": "Lisboa, Portugal",
"craneEat10": "Lisboa, Portugal",
"demoCupertinoSegmentedControlDescription": "S'utilitza per triar una opció d'entre diverses que són excloents entre si. Quan se selecciona una opció al control segmentat, les altres deixen d'estar disponibles.",
"chipTurnOnLights": "Encén els llums",
"chipSmall": "Petita",
"chipMedium": "Mitjana",
"chipLarge": "Gran",
"chipElevator": "Ascensor",
"chipWasher": "Rentadora",
"chipFireplace": "Llar de foc",
"chipBiking": "Ciclisme",
"craneFormDiners": "Comensals",
"rallyAlertsMessageUnassignedTransactions": "{count,plural,=1{Augmenta la teva possible deducció fiscal. Assigna categories a 1 transacció sense assignar.}other{Augmenta la teva possible deducció fiscal. Assigna categories a {count} transaccions sense assignar.}}",
"craneFormTime": "Selecciona l'hora",
"craneFormLocation": "Selecciona la ubicació",
"craneFormTravelers": "Viatgers",
"craneEat8": "Atlanta, Estats Units",
"craneFormDestination": "Tria una destinació",
"craneFormDates": "Selecciona les dates",
"craneFly": "VOLAR",
"craneSleep": "DORMIR",
"craneEat": "MENJAR",
"craneFlySubhead": "Explora vols per destinació",
"craneSleepSubhead": "Explora propietats per destinació",
"craneEatSubhead": "Explora restaurants per destinació",
"craneFlyStops": "{numberOfStops,plural,=0{Sense escales}=1{1 escala}other{{numberOfStops} escales}}",
"craneSleepProperties": "{totalProperties,plural,=0{Cap propietat disponible}=1{1 propietat disponible}other{{totalProperties} propietats disponibles}}",
"craneEatRestaurants": "{totalRestaurants,plural,=0{Cap restaurant}=1{1 restaurant}other{{totalRestaurants} restaurants}}",
"craneFly0": "Aspen, Estats Units",
"demoCupertinoSegmentedControlSubtitle": "Control segmentat d'estil iOS",
"craneSleep10": "El Caire, Egipte",
"craneEat9": "Madrid, Espanya",
"craneFly1": "Big Sur, Estats Units",
"craneEat7": "Nashville, Estats Units",
"craneEat6": "Seattle, Estats Units",
"craneFly8": "Singapur",
"craneEat4": "París, França",
"craneEat3": "Portland, Estats Units",
"craneEat2": "Córdoba, Argentina",
"craneEat1": "Dallas, Estats Units",
"craneEat0": "Nàpols, Itàlia",
"craneSleep11": "Taipei, Taiwan",
"craneSleep3": "L'Havana, Cuba",
"shrineLogoutButtonCaption": "TANCA LA SESSIÓ",
"rallyTitleBills": "FACTURES",
"rallyTitleAccounts": "COMPTES",
"shrineProductVagabondSack": "Motxilla Vagabond",
"rallyAccountDetailDataInterestYtd": "Interessos fins a l'actualitat",
"shrineProductWhitneyBelt": "Cinturó Whitney",
"shrineProductGardenStrand": "Collarets de granadura",
"shrineProductStrutEarrings": "Arracades",
"shrineProductVarsitySocks": "Mitjons d'estil universitari",
"shrineProductWeaveKeyring": "Clauer teixit",
"shrineProductGatsbyHat": "Barret Gatsby",
"shrineProductShrugBag": "Bossa",
"shrineProductGiltDeskTrio": "Accessoris d'escriptori daurats",
"shrineProductCopperWireRack": "Cistella de reixeta de coure",
"shrineProductSootheCeramicSet": "Joc de ceràmica relaxant",
"shrineProductHurrahsTeaSet": "Joc per al te",
"shrineProductBlueStoneMug": "Tassa Blue Stone",
"shrineProductRainwaterTray": "Safata",
"shrineProductChambrayNapkins": "Tovallons de cambrai",
"shrineProductSucculentPlanters": "Testos per a suculentes",
"shrineProductQuartetTable": "Taula rodona",
"shrineProductKitchenQuattro": "Estris de cuina",
"shrineProductClaySweater": "Jersei color teula",
"shrineProductSeaTunic": "Samarreta llarga blau clar",
"shrineProductPlasterTunic": "Túnica color guix",
"rallyBudgetCategoryRestaurants": "Restaurants",
"shrineProductChambrayShirt": "Camisa cambrai",
"shrineProductSeabreezeSweater": "Jersei color blau clar",
"shrineProductGentryJacket": "Jaqueta noble",
"shrineProductNavyTrousers": "Pantalons blau marí",
"shrineProductWalterHenleyWhite": "Samarreta de ratlles (blanc)",
"shrineProductSurfAndPerfShirt": "Samarreta surfera",
"shrineProductGingerScarf": "Bufanda ataronjada",
"shrineProductRamonaCrossover": "Camisa encreuada Ramona",
"shrineProductClassicWhiteCollar": "Coll blanc clàssic",
"shrineProductSunshirtDress": "Vestit estiuenc",
"rallyAccountDetailDataInterestRate": "Taxa d'interès",
"rallyAccountDetailDataAnnualPercentageYield": "Percentatge de rendiment anual",
"rallyAccountDataVacation": "Vacances",
"shrineProductFineLinesTee": "Samarreta a ratlles fines",
"rallyAccountDataHomeSavings": "Estalvis de la llar",
"rallyAccountDataChecking": "Compte corrent",
"rallyAccountDetailDataInterestPaidLastYear": "Interessos pagats l'any passat",
"rallyAccountDetailDataNextStatement": "Extracte següent",
"rallyAccountDetailDataAccountOwner": "Propietari del compte",
"rallyBudgetCategoryCoffeeShops": "Cafeteries",
"rallyBudgetCategoryGroceries": "Queviures",
"shrineProductCeriseScallopTee": "Samarreta de coll rodó color cirera",
"rallyBudgetCategoryClothing": "Roba",
"rallySettingsManageAccounts": "Gestiona els comptes",
"rallyAccountDataCarSavings": "Estalvis del cotxe",
"rallySettingsTaxDocuments": "Documents fiscals",
"rallySettingsPasscodeAndTouchId": "Contrasenya i Touch ID",
"rallySettingsNotifications": "Notificacions",
"rallySettingsPersonalInformation": "Informació personal",
"rallySettingsPaperlessSettings": "Configuració del format digital",
"rallySettingsFindAtms": "Troba un caixer automàtic",
"rallySettingsHelp": "Ajuda",
"rallySettingsSignOut": "Tanca la sessió",
"rallyAccountTotal": "Total",
"rallyBillsDue": "Venciment",
"rallyBudgetLeft": "Restant",
"rallyAccounts": "Comptes",
"rallyBills": "Factures",
"rallyBudgets": "Pressupostos",
"rallyAlerts": "Alertes",
"rallySeeAll": "MOSTRA-HO TOT",
"rallyFinanceLeft": "RESTANT",
"rallyTitleOverview": "INFORMACIÓ GENERAL",
"shrineProductShoulderRollsTee": "Samarreta amb muscle descobert",
"shrineNextButtonCaption": "SEGÜENT",
"rallyTitleBudgets": "PRESSUPOSTOS",
"rallyTitleSettings": "CONFIGURACIÓ",
"rallyLoginLoginToRally": "Inicia la sessió a Rally",
"rallyLoginNoAccount": "No tens cap compte?",
"rallyLoginSignUp": "REGISTRA'T",
"rallyLoginUsername": "Nom d'usuari",
"rallyLoginPassword": "Contrasenya",
"rallyLoginLabelLogin": "Inicia la sessió",
"rallyLoginRememberMe": "Recorda'm",
"rallyLoginButtonLogin": "INICIA LA SESSIÓ",
"rallyAlertsMessageHeadsUpShopping": "Atenció! Has fet servir un {percent} del teu pressupost per a compres d'aquest mes.",
"rallyAlertsMessageSpentOnRestaurants": "Has gastat {amount} en restaurants aquesta setmana.",
"rallyAlertsMessageATMFees": "Has gastat {amount} en comissions de caixers automàtics aquest mes.",
"rallyAlertsMessageCheckingAccount": "Ben fet. El teu compte corrent és un {percent} superior al mes passat.",
"shrineMenuCaption": "MENÚ",
"shrineCategoryNameAll": "TOT",
"shrineCategoryNameAccessories": "ACCESSORIS",
"shrineCategoryNameClothing": "ROBA",
"shrineCategoryNameHome": "CASA",
"shrineLoginUsernameLabel": "Nom d'usuari",
"shrineLoginPasswordLabel": "Contrasenya",
"shrineCancelButtonCaption": "CANCEL·LA",
"shrineCartTaxCaption": "Impostos:",
"shrineCartPageCaption": "CARRETÓ",
"shrineProductQuantity": "Quantitat: {quantity}",
"shrineProductPrice": "x {price}",
"shrineCartItemCount": "{quantity,plural,=0{CAP ARTICLE}=1{1 ARTICLE}other{{quantity} ARTICLES}}",
"shrineCartClearButtonCaption": "BUIDA EL CARRETÓ",
"shrineCartTotalCaption": "TOTAL",
"shrineCartSubtotalCaption": "Subtotal:",
"shrineCartShippingCaption": "Enviament:",
"shrineProductGreySlouchTank": "Samarreta de tirants ampla grisa",
"shrineProductStellaSunglasses": "Ulleres de sol Stella",
"shrineProductWhitePinstripeShirt": "Camisa a ratlles blanca",
"demoTextFieldWhereCanWeReachYou": "Com ens podem posar en contacte amb tu?",
"settingsTextDirectionLTR": "Text d'esquerra a dreta",
"settingsTextScalingLarge": "Gran",
"demoBottomSheetHeader": "Capçalera",
"demoBottomSheetItem": "Article {value}",
"demoBottomTextFieldsTitle": "Camps de text",
"demoTextFieldTitle": "Camps de text",
"demoTextFieldSubtitle": "Línia de text i xifres editables",
"demoTextFieldDescription": "Els camps de text permeten als usuaris introduir text en una interfície d'usuari. Normalment s'inclouen en formularis i quadres de diàleg.",
"demoTextFieldShowPasswordLabel": "Mostra la contrasenya",
"demoTextFieldHidePasswordLabel": "Amaga la contrasenya",
"demoTextFieldFormErrors": "Resol els errors marcats en vermell abans d'enviar el formulari.",
"demoTextFieldNameRequired": "El nom és obligatori.",
"demoTextFieldOnlyAlphabeticalChars": "Introdueix només caràcters alfabètics.",
"demoTextFieldEnterUSPhoneNumber": "(###) ###-####: introdueix un número de telèfon dels EUA.",
"demoTextFieldEnterPassword": "Introdueix una contrasenya.",
"demoTextFieldPasswordsDoNotMatch": "Les contrasenyes no coincideixen",
"demoTextFieldWhatDoPeopleCallYou": "Com et dius?",
"demoTextFieldNameField": "Nom*",
"demoBottomSheetButtonText": "MOSTRA EL FULL INFERIOR",
"demoTextFieldPhoneNumber": "Número de telèfon*",
"demoBottomSheetTitle": "Full inferior",
"demoTextFieldEmail": "Adreça electrònica",
"demoTextFieldTellUsAboutYourself": "Explica'ns alguna cosa sobre tu (p. ex., escriu a què et dediques o quines són les teves aficions)",
"demoTextFieldKeepItShort": "Sigues breu, es tracta d'una demostració.",
"starterAppGenericButton": "BOTÓ",
"demoTextFieldLifeStory": "Biografia",
"demoTextFieldSalary": "Salari",
"demoTextFieldUSD": "USD",
"demoTextFieldNoMoreThan": "No pot tenir més de 8 caràcters.",
"demoTextFieldPassword": "Contrasenya*",
"demoTextFieldRetypePassword": "Torna a escriure la contrasenya*",
"demoTextFieldSubmit": "ENVIA",
"demoBottomNavigationSubtitle": "Navegació inferior amb visualitzacions d'esvaïment encreuat",
"demoBottomSheetAddLabel": "Afegeix",
"demoBottomSheetModalDescription": "Un full modal inferior és una alternativa al menú o al diàleg i evita que l'usuari interaccioni amb la resta de l'aplicació.",
"demoBottomSheetModalTitle": "Full modal inferior",
"demoBottomSheetPersistentDescription": "Una full inferior persistent mostra informació que complementa el contingut principal de l'aplicació. A més, continua visible quan l'usuari interacciona amb altres parts de l'aplicació.",
"demoBottomSheetPersistentTitle": "Full inferior persistent",
"demoBottomSheetSubtitle": "Pàgines modal i persistent inferiors",
"demoTextFieldNameHasPhoneNumber": "El número de telèfon de {name} és {phoneNumber}",
"buttonText": "BOTÓ",
"demoTypographyDescription": "Definicions dels diversos estils tipogràfics trobats a Material Design.",
"demoTypographySubtitle": "Tots els estils de text predefinits",
"demoTypographyTitle": "Tipografia",
"demoFullscreenDialogDescription": "La propietat fullscreenDialog indica si la pàgina entrant és un quadre de diàleg modal de pantalla completa",
"demoFlatButtonDescription": "Un botó pla mostra un esquitx de tinta en prémer-lo, però no s'eleva. Utilitza els botons plans en barres d'eines, en quadres de diàleg i entre línies amb farciment",
"demoBottomNavigationDescription": "A les barres de navegació inferior es mostren entre tres i cinc destinacions. Cada destinació es representa amb una icona i una etiqueta de text opcional. En tocar una icona de la navegació inferior, es redirigirà l'usuari a la destinació de navegació de nivell superior associada amb la icona.",
"demoBottomNavigationSelectedLabel": "Etiqueta seleccionada",
"demoBottomNavigationPersistentLabels": "Etiquetes persistents",
"starterAppDrawerItem": "Article {value}",
"demoTextFieldRequiredField": "* indica que el camp és obligatori",
"demoBottomNavigationTitle": "Navegació inferior",
"settingsLightTheme": "Clar",
"settingsTheme": "Tema",
"settingsPlatformIOS": "iOS",
"settingsPlatformAndroid": "Android",
"settingsTextDirectionRTL": "Dreta a esquerra",
"settingsTextScalingHuge": "Molt gran",
"cupertinoButton": "Botó",
"settingsTextScalingNormal": "Normal",
"settingsTextScalingSmall": "Petit",
"settingsSystemDefault": "Sistema",
"settingsTitle": "Configuració",
"rallyDescription": "Una aplicació de finances personal",
"aboutDialogDescription": "Per consultar el codi font d'aquesta aplicació, visita el {repoLink}.",
"bottomNavigationCommentsTab": "Comentaris",
"starterAppGenericBody": "Cos",
"starterAppGenericHeadline": "Títol",
"starterAppGenericSubtitle": "Subtítol",
"starterAppGenericTitle": "Títol",
"starterAppTooltipSearch": "Cerca",
"starterAppTooltipShare": "Comparteix",
"starterAppTooltipFavorite": "Preferit",
"starterAppTooltipAdd": "Afegeix",
"bottomNavigationCalendarTab": "Calendari",
"starterAppDescription": "Un disseny d'inici responsiu",
"starterAppTitle": "Aplicació d'inici",
"aboutFlutterSamplesRepo": "Repositori GitHub de mostres Flutter",
"bottomNavigationContentPlaceholder": "Espai reservat per a la pestanya {title}",
"bottomNavigationCameraTab": "Càmera",
"bottomNavigationAlarmTab": "Alarma",
"bottomNavigationAccountTab": "Compte",
"demoTextFieldYourEmailAddress": "La teva adreça electrònica",
"demoToggleButtonDescription": "Els botons de commutació poden utilitzar-se per agrupar opcions relacionades. Per destacar grups de botons de commutació relacionats, un grup ha de compartir un contenidor comú.",
"colorsGrey": "GRIS",
"colorsBrown": "MARRÓ",
"colorsDeepOrange": "TARONJA INTENS",
"colorsOrange": "TARONJA",
"colorsAmber": "AMBRE",
"colorsYellow": "GROC",
"colorsLime": "VERD LLIMA",
"colorsLightGreen": "VERD CLAR",
"colorsGreen": "VERD",
"homeHeaderGallery": "Galeria",
"homeHeaderCategories": "Categories",
"shrineDescription": "Una aplicació de botigues de moda",
"craneDescription": "Una aplicació de viatges personalitzada",
"homeCategoryReference": "ESTILS I ALTRES",
"demoInvalidURL": "No s'ha pogut mostrar l'URL:",
"demoOptionsTooltip": "Opcions",
"demoInfoTooltip": "Informació",
"demoCodeTooltip": "Codi de demostració",
"demoDocumentationTooltip": "Documentació de l'API",
"demoFullscreenTooltip": "Pantalla completa",
"settingsTextScaling": "Ajust del text",
"settingsTextDirection": "Direcció del text",
"settingsLocale": "Configuració regional",
"settingsPlatformMechanics": "Mecànica de la plataforma",
"settingsDarkTheme": "Fosc",
"settingsSlowMotion": "Càmera lenta",
"settingsAbout": "Sobre Flutter Gallery",
"settingsFeedback": "Envia suggeriments",
"settingsAttribution": "Dissenyat per TOASTER a Londres",
"demoButtonTitle": "Botons",
"demoButtonSubtitle": "De text, amb relleu, perfilat i més",
"demoFlatButtonTitle": "Botó pla",
"demoRaisedButtonDescription": "Els botons amb relleu aporten dimensió als dissenys plans. Destacar les funcions en espais amplis o amb molts elements.",
"demoRaisedButtonTitle": "Botó amb relleu",
"demoOutlineButtonTitle": "Botó perfilat",
"demoOutlineButtonDescription": "Els botons perfilats es tornen opacs i s'eleven en prémer-los. Normalment estan vinculats amb botons amb relleu per indicar una acció secundaria o alternativa.",
"demoToggleButtonTitle": "Botons de commutació",
"colorsTeal": "VERD BLAVÓS",
"demoFloatingButtonTitle": "Botó d'acció flotant",
"demoFloatingButtonDescription": "Un botó d'acció flotant és un botó d'icona circular que passa per sobre de contingut per promoure una acció principal a l'aplicació.",
"demoDialogTitle": "Quadres de diàleg",
"demoDialogSubtitle": "Simple, alerta i pantalla completa",
"demoAlertDialogTitle": "Alerta",
"demoAlertDialogDescription": "Un quadre de diàleg d'alerta informa l'usuari sobre situacions que requereixen la seva aprovació. Inclou un títol i una llista opcional d'accions.",
"demoAlertTitleDialogTitle": "Alerta amb el títol",
"demoSimpleDialogTitle": "Senzill",
"demoSimpleDialogDescription": "Un quadre de diàleg simple ofereix a l'usuari diverses opcions per triar-ne una. Pot tenir un títol opcional que es mostra a sobre dels resultats.",
"demoFullscreenDialogTitle": "Pantalla completa",
"demoCupertinoButtonsTitle": "Botons",
"demoCupertinoButtonsSubtitle": "Botons d'estil iOS",
"demoCupertinoButtonsDescription": "Botó d'estil iOS. Té forma de text o d'icona que s'atenuen o apareixen en tocar-los. Opcionalment pot tenir fons.",
"demoCupertinoAlertsTitle": "Alertes",
"demoCupertinoAlertsSubtitle": "Quadres de diàleg d'alerta d'estil iOS",
"demoCupertinoAlertTitle": "Alerta",
"demoCupertinoAlertDescription": "Un quadre de diàleg d'alerta informa l'usuari sobre situacions que requereixen la seva aprovació. Inclou un títol, una llista d'accions i contingut opcionals. El títol es mostra a sobre del contingut i les accions, a sota.",
"demoCupertinoAlertWithTitleTitle": "Alerta amb el títol",
"demoCupertinoAlertButtonsTitle": "Alerta amb botons",
"demoCupertinoAlertButtonsOnlyTitle": "Només botons d'alerta",
"demoCupertinoActionSheetTitle": "Full d'accions",
"demoCupertinoActionSheetDescription": "Un full d'accions és un estil específic d'alertes que ofereix a l'usuari dues o més opcions relacionades amb el context actual. Pot incloure un títol, un missatge addicional i una llista d'accions.",
"demoColorsTitle": "Colors",
"demoColorsSubtitle": "Tots els colors predefinits",
"demoColorsDescription": "Constants de mostres i colors que representen la paleta de colors de Material Design.",
"buttonTextEnabled": "ENABLED",
"buttonTextDisabled": "DISABLED",
"buttonTextCreate": "Crea",
"dialogSelectedOption": "Has seleccionat: \"{value}\"",
"dialogDiscardTitle": "Vols descartar l'esborrany?",
"dialogLocationTitle": "Vols fer servir els serveis d'ubicació de Google?",
"dialogLocationDescription": "Permet que Google pugui ajudar les aplicacions a determinar la ubicació, és a dir, que s'enviïn dades d'ubicació anònimes a Google fins i tot quan no s'estigui executant cap aplicació.",
"dialogCancel": "CANCEL·LA",
"dialogDiscard": "DESCARTA",
"dialogDisagree": "NO ACCEPTIS",
"dialogAgree": "ACCEPTA",
"dialogSetBackup": "Defineix el compte de la còpia de seguretat",
"colorsBlueGrey": "GRIS BLAVÓS",
"dialogShow": "MOSTRA EL QUADRE DE DIÀLEG",
"dialogFullscreenTitle": "Quadre de diàleg de pantalla completa",
"dialogFullscreenSave": "DESA",
"dialogFullscreenDescription": "Demostració d'un quadre de diàleg de pantalla completa",
"cupertinoButtonEnabled": "Enabled",
"cupertinoButtonDisabled": "Disabled",
"cupertinoButtonWithBackground": "Amb fons",
"cupertinoAlertCancel": "Cancel·la",
"cupertinoAlertDiscard": "Descarta",
"cupertinoAlertLocationTitle": "Vols permetre que Maps accedeixi a la teva ubicació quan utilitzis l'aplicació?",
"cupertinoAlertLocationDescription": "La teva ubicació actual es mostrarà al mapa i s'utilitzarà per donar indicacions, oferir resultats propers de cerca i indicar la durada estimada dels trajectes.",
"cupertinoAlertAllow": "Permet",
"cupertinoAlertDontAllow": "No permetis",
"cupertinoAlertFavoriteDessert": "Selecciona les teves postres preferides",
"cupertinoAlertDessertDescription": "Selecciona el teu tipus de postres preferides de la llista que hi ha més avall. La teva selecció s'utilitzarà per personalitzar la llista de suggeriments de restaurants de la teva zona.",
"cupertinoAlertCheesecake": "Pastís de formatge",
"cupertinoAlertTiramisu": "Tiramisú",
"cupertinoAlertApplePie": "Pastís de poma",
"cupertinoAlertChocolateBrownie": "Brownie de xocolata",
"cupertinoShowAlert": "Mostra l'alerta",
"colorsRed": "VERMELL",
"colorsPink": "ROSA",
"colorsPurple": "PORPRA",
"colorsDeepPurple": "PORPRA INTENS",
"colorsIndigo": "ANYIL",
"colorsBlue": "BLAU",
"colorsLightBlue": "BLAU CLAR",
"colorsCyan": "CIAN",
"dialogAddAccount": "Afegeix un compte",
"Gallery": "Galeria",
"Categories": "Categories",
"SHRINE": "SHRINE",
"Basic shopping app": "Aplicació bàsica de compra",
"RALLY": "RALLY",
"CRANE": "CRANE",
"Travel app": "Aplicació de viatges",
"MATERIAL": "MATERIAL",
"CUPERTINO": "CUPERTINO",
"REFERENCE STYLES & MEDIA": "ESTILS I MITJANS DE REFERÈNCIA"
}
| gallery/lib/l10n/intl_ca.arb/0 | {
"file_path": "gallery/lib/l10n/intl_ca.arb",
"repo_id": "gallery",
"token_count": 19443
} | 866 |
<?xml version="1.0" encoding="utf-8"?>
<!--
This file was automatically generated.
Please do not edit it manually.
It is based on lib/l10n/intl_en.arb.
-->
<resources>
<string
name="githubRepo"
description="Represents a link to a GitHub repository."
>{repoName} GitHub repository</string>
<string
name="aboutDialogDescription"
description="A description about how to view the source code for this app."
>To see the source code for this app, please visit the {repoLink}.</string>
<string
name="deselect"
description="Deselect a (selectable) item"
>Deselect</string>
<string
name="notSelected"
description="Indicates the status of a (selectable) item not being selected"
>Not selected</string>
<string
name="select"
description="Select a (selectable) item"
>Select</string>
<string
name="selectable"
description="Indicates the associated piece of UI is selectable by long pressing it"
>Selectable (long press)</string>
<string
name="selected"
description="Indicates status of a (selectable) item being selected"
>Selected</string>
<string
name="signIn"
description="Sign in label to sign into website."
>SIGN IN</string>
<string
name="bannerDemoText"
description="Password was updated on a different device and the user is required to sign in again"
>Your password was updated on your other device. Please sign in again.</string>
<string
name="bannerDemoResetText"
description="Show the Banner to the user again."
>Reset the banner</string>
<string
name="bannerDemoMultipleText"
description="When the user clicks this button the Banner will toggle multiple actions or a single action"
>Multiple actions</string>
<string
name="bannerDemoLeadingText"
description="If user clicks this button the leading icon in the Banner will disappear"
>Leading Icon</string>
<string
name="dismiss"
description="When text is pressed the banner widget will be removed from the screen."
>DISMISS</string>
<string
name="backToGallery"
description="Semantic label for back button to exit a study and return to the gallery home page."
>Back to Gallery</string>
<string
name="cardsDemoExplore"
description="Click to see more about the content in the cards demo."
>Explore</string>
<string
name="cardsDemoExploreSemantics"
description="Semantics label for Explore. Label tells user to explore the destinationName to the user. Example Explore Tamil"
>Explore {destinationName}</string>
<string
name="cardsDemoShareSemantics"
description="Semantics label for Share. Label tells user to share the destinationName to the user. Example Share Tamil"
>Share {destinationName}</string>
<string
name="cardsDemoTappable"
description="The user can tap this button"
>Tappable</string>
<string
name="cardsDemoTravelDestinationTitle1"
description="The top 10 cities that you can visit in Tamil Nadu"
>Top 10 Cities to Visit in Tamil Nadu</string>
<string
name="cardsDemoTravelDestinationDescription1"
description="Number 10"
>Number 10</string>
<string
name="cardsDemoTravelDestinationCity1"
description="Thanjavur the city"
>Thanjavur</string>
<string
name="cardsDemoTravelDestinationLocation1"
description="Thanjavur, Tamil Nadu is a location"
>Thanjavur, Tamil Nadu</string>
<string
name="cardsDemoTravelDestinationTitle2"
description="Artist that are from Southern India"
>Artisans of Southern India</string>
<string
name="cardsDemoTravelDestinationDescription2"
description="Silk Spinners"
>Silk Spinners</string>
<string
name="cardsDemoTravelDestinationCity2"
description="Chettinad the city"
>Chettinad</string>
<string
name="cardsDemoTravelDestinationLocation2"
description="Sivaganga, Tamil Nadu is a location"
>Sivaganga, Tamil Nadu</string>
<string
name="cardsDemoTravelDestinationTitle3"
description="Brihadisvara Temple"
>Brihadisvara Temple</string>
<string
name="cardsDemoTravelDestinationDescription3"
description="Temples"
>Temples</string>
<string
name="homeHeaderGallery"
description="Header title on home screen for Gallery section."
>Gallery</string>
<string
name="homeHeaderCategories"
description="Header title on home screen for Categories section."
>Categories</string>
<string
name="shrineDescription"
description="Study description for Shrine."
>A fashionable retail app</string>
<string
name="fortnightlyDescription"
description="Study description for Fortnightly."
>A content-focused news app</string>
<string
name="rallyDescription"
description="Study description for Rally."
>A personal finance app</string>
<string
name="replyDescription"
description="Study description for Reply."
>An efficient, focused email app</string>
<string
name="rallyAccountDataChecking"
description="Name for account made up by user."
>Checking</string>
<string
name="rallyAccountDataHomeSavings"
description="Name for account made up by user."
>Home Savings</string>
<string
name="rallyAccountDataCarSavings"
description="Name for account made up by user."
>Car Savings</string>
<string
name="rallyAccountDataVacation"
description="Name for account made up by user."
>Vacation</string>
<string
name="rallyAccountDetailDataAnnualPercentageYield"
description="Title for account statistics. Below a percentage such as 0.10% will be displayed."
>Annual Percentage Yield</string>
<string
name="rallyAccountDetailDataInterestRate"
description="Title for account statistics. Below a dollar amount such as $100 will be displayed."
>Interest Rate</string>
<string
name="rallyAccountDetailDataInterestYtd"
description="Title for account statistics. Below a dollar amount such as $100 will be displayed."
>Interest YTD</string>
<string
name="rallyAccountDetailDataInterestPaidLastYear"
description="Title for account statistics. Below a dollar amount such as $100 will be displayed."
>Interest Paid Last Year</string>
<string
name="rallyAccountDetailDataNextStatement"
description="Title for an account detail. Below a date for when the next account statement is released."
>Next Statement</string>
<string
name="rallyAccountDetailDataAccountOwner"
description="Title for an account detail. Below the name of the account owner will be displayed."
>Account Owner</string>
<string
name="rallyBillDetailTotalAmount"
description="Title for column where it displays the total dollar amount that the user has in bills."
>Total Amount</string>
<string
name="rallyBillDetailAmountPaid"
description="Title for column where it displays the amount that the user has paid."
>Amount Paid</string>
<string
name="rallyBillDetailAmountDue"
description="Title for column where it displays the amount that the user has due."
>Amount Due</string>
<string
name="rallyBudgetCategoryCoffeeShops"
description="Category for budget, to sort expenses / bills in."
>Coffee Shops</string>
<string
name="rallyBudgetCategoryGroceries"
description="Category for budget, to sort expenses / bills in."
>Groceries</string>
<string
name="rallyBudgetCategoryRestaurants"
description="Category for budget, to sort expenses / bills in."
>Restaurants</string>
<string
name="rallyBudgetCategoryClothing"
description="Category for budget, to sort expenses / bills in."
>Clothing</string>
<string
name="rallyBudgetDetailTotalCap"
description="Title for column where it displays the total dollar cap that the user has for its budget."
>Total Cap</string>
<string
name="rallyBudgetDetailAmountUsed"
description="Title for column where it displays the dollar amount that the user has used in its budget."
>Amount Used</string>
<string
name="rallyBudgetDetailAmountLeft"
description="Title for column where it displays the dollar amount that the user has left in its budget."
>Amount Left</string>
<string
name="rallySettingsManageAccounts"
description="Link to go to the page 'Manage Accounts."
>Manage Accounts</string>
<string
name="rallySettingsTaxDocuments"
description="Link to go to the page 'Tax Documents'."
>Tax Documents</string>
<string
name="rallySettingsPasscodeAndTouchId"
description="Link to go to the page 'Passcode and Touch ID'."
>Passcode and Touch ID</string>
<string
name="rallySettingsNotifications"
description="Link to go to the page 'Notifications'."
>Notifications</string>
<string
name="rallySettingsPersonalInformation"
description="Link to go to the page 'Personal Information'."
>Personal Information</string>
<string
name="rallySettingsPaperlessSettings"
description="Link to go to the page 'Paperless Settings'."
>Paperless Settings</string>
<string
name="rallySettingsFindAtms"
description="Link to go to the page 'Find ATMs'."
>Find ATMs</string>
<string
name="rallySettingsHelp"
description="Link to go to the page 'Help'."
>Help</string>
<string
name="rallySettingsSignOut"
description="Link to go to the page 'Sign out'."
>Sign out</string>
<string
name="rallyAccountTotal"
description="Title for 'total account value' overview page, a dollar value is displayed next to it."
>Total</string>
<string
name="rallyBillsDue"
description="Title for 'bills due' page, a dollar value is displayed next to it."
>Due</string>
<string
name="rallyBudgetLeft"
description="Title for 'budget left' page, a dollar value is displayed next to it."
>Left</string>
<string
name="rallyAccounts"
description="Link text for accounts page."
>Accounts</string>
<string
name="rallyBills"
description="Link text for bills page."
>Bills</string>
<string
name="rallyBudgets"
description="Link text for budgets page."
>Budgets</string>
<string
name="rallyAlerts"
description="Title for alerts part of overview page."
>Alerts</string>
<string
name="rallySeeAll"
description="Link text for button to see all data for category."
>SEE ALL</string>
<string
name="rallyFinanceLeft"
description="Displayed as 'dollar amount left', for example $46.70 LEFT, for a budget category."
> LEFT</string>
<string
name="rallyTitleOverview"
description="The navigation link to the overview page."
>OVERVIEW</string>
<string
name="rallyTitleAccounts"
description="The navigation link to the accounts page."
>ACCOUNTS</string>
<string
name="rallyTitleBills"
description="The navigation link to the bills page."
>BILLS</string>
<string
name="rallyTitleBudgets"
description="The navigation link to the budgets page."
>BUDGETS</string>
<string
name="rallyTitleSettings"
description="The navigation link to the settings page."
>SETTINGS</string>
<string
name="rallyLoginLoginToRally"
description="Title for login page for the Rally app (Rally does not need to be translated as it is a product name)."
>Login to Rally</string>
<string
name="rallyLoginNoAccount"
description="Prompt for signing up for an account."
>Don't have an account?</string>
<string
name="rallyLoginSignUp"
description="Button text to sign up for an account."
>SIGN UP</string>
<string
name="rallyLoginUsername"
description="The username field in an login form."
>Username</string>
<string
name="rallyLoginPassword"
description="The password field in an login form."
>Password</string>
<string
name="rallyLoginLabelLogin"
description="The label text to login."
>Login</string>
<string
name="rallyLoginRememberMe"
description="Text if the user wants to stay logged in."
>Remember Me</string>
<string
name="rallyLoginButtonLogin"
description="Text for login button."
>LOGIN</string>
<string
name="rallyAlertsMessageHeadsUpShopping"
description="Alert message shown when for example, user has used more than 90% of their shopping budget."
>Heads up, you've used up {percent} of your Shopping budget for this month.</string>
<string
name="rallyAlertsMessageSpentOnRestaurants"
description="Alert message shown when for example, user has spent $120 on Restaurants this week."
>You've spent {amount} on Restaurants this week.</string>
<string
name="rallyAlertsMessageATMFees"
description="Alert message shown when for example, the user has spent $24 in ATM fees this month."
>You've spent {amount} in ATM fees this month</string>
<string
name="rallyAlertsMessageCheckingAccount"
description="Alert message shown when for example, the checking account is 1% higher than last month."
>Good work! Your checking account is {percent} higher than last month.</string>
<string
name="rallyAlertsMessageUnassignedTransactions"
description="Alert message shown when you have unassigned transactions."
>{count, plural, =1{Increase your potential tax deduction! Assign categories to 1 unassigned transaction.}other{Increase your potential tax deduction! Assign categories to {count} unassigned transactions.}}</string>
<string
name="rallySeeAllAccounts"
description="Semantics label for button to see all accounts. Accounts refer to bank account here."
>See all accounts</string>
<string
name="rallySeeAllBills"
description="Semantics label for button to see all bills."
>See all bills</string>
<string
name="rallySeeAllBudgets"
description="Semantics label for button to see all budgets."
>See all budgets</string>
<string
name="rallyAccountAmount"
description="Semantics label for row with bank account name (for example checking) and its bank account number (for example 123), with how much money is deposited in it (for example $12)."
>{accountName} account {accountNumber} with {amount}.</string>
<string
name="rallyBillAmount"
description="Semantics label for row with a bill (example name is rent), when the bill is due (1/12/2019 for example) and for how much money ($12)."
>{billName} bill due {date} for {amount}.</string>
<string
name="rallyBudgetAmount"
description="Semantics label for row with a budget (housing budget for example), with how much is used of the budget (for example $5), the total budget (for example $100) and the amount left in the budget (for example $95)."
>{budgetName} budget with {amountUsed} used of {amountTotal}, {amountLeft} left</string>
<string
name="craneDescription"
description="Study description for Crane."
>A personalized travel app</string>
<string
name="homeCategoryReference"
description="Category title on home screen for styles & other demos (for context, the styles demos consist of a color demo and a typography demo)."
>STYLES & OTHER</string>
<string
name="demoInvalidURL"
description="Error message when opening the URL for a demo."
>Couldn't display URL:</string>
<string
name="demoOptionsTooltip"
description="Tooltip for options button in a demo."
>Options</string>
<string
name="demoInfoTooltip"
description="Tooltip for info button in a demo."
>Info</string>
<string
name="demoCodeTooltip"
description="Tooltip for demo code button in a demo."
>Demo Code</string>
<string
name="demoDocumentationTooltip"
description="Tooltip for API documentation button in a demo."
>API Documentation</string>
<string
name="demoFullscreenTooltip"
description="Tooltip for Full Screen button in a demo."
>Full Screen</string>
<string
name="demoCodeViewerCopyAll"
description="Caption for a button to copy all text."
>COPY ALL</string>
<string
name="demoCodeViewerCopiedToClipboardMessage"
description="A message displayed to the user after clicking the COPY ALL button, if the text is successfully copied to the clipboard."
>Copied to clipboard.</string>
<string
name="demoCodeViewerFailedToCopyToClipboardMessage"
description="A message displayed to the user after clicking the COPY ALL button, if the text CANNOT be copied to the clipboard."
>Failed to copy to clipboard: {error}</string>
<string
name="demoOptionsFeatureTitle"
description="Title for an alert that explains what the options button does."
>View options</string>
<string
name="demoOptionsFeatureDescription"
description="Description for an alert that explains what the options button does."
>Tap here to view available options for this demo.</string>
<string
name="settingsTitle"
description="Title for the settings screen."
>Settings</string>
<string
name="settingsButtonLabel"
description="Accessibility label for the settings button when settings are not showing."
>Settings</string>
<string
name="settingsButtonCloseLabel"
description="Accessibility label for the settings button when settings are showing."
>Close settings</string>
<string
name="settingsSystemDefault"
description="Option label to indicate the system default will be used."
>System</string>
<string
name="settingsTextScaling"
description="Title for text scaling setting."
>Text scaling</string>
<string
name="settingsTextScalingSmall"
description="Option label for small text scale setting."
>Small</string>
<string
name="settingsTextScalingNormal"
description="Option label for normal text scale setting."
>Normal</string>
<string
name="settingsTextScalingLarge"
description="Option label for large text scale setting."
>Large</string>
<string
name="settingsTextScalingHuge"
description="Option label for huge text scale setting."
>Huge</string>
<string
name="settingsTextDirection"
description="Title for text direction setting."
>Text direction</string>
<string
name="settingsTextDirectionLocaleBased"
description="Option label for locale-based text direction setting."
>Based on locale</string>
<string
name="settingsTextDirectionLTR"
description="Option label for left-to-right text direction setting."
>LTR</string>
<string
name="settingsTextDirectionRTL"
description="Option label for right-to-left text direction setting."
>RTL</string>
<string
name="settingsLocale"
description="Title for locale setting."
>Locale</string>
<string
name="settingsPlatformMechanics"
description="Title for platform mechanics (iOS, Android, macOS, etc.) setting."
>Platform mechanics</string>
<string
name="settingsTheme"
description="Title for the theme setting."
>Theme</string>
<string
name="settingsDarkTheme"
description="Title for the dark theme setting."
>Dark</string>
<string
name="settingsLightTheme"
description="Title for the light theme setting."
>Light</string>
<string
name="settingsSlowMotion"
description="Title for slow motion setting."
>Slow motion</string>
<string
name="settingsAbout"
description="Title for information button."
>About Flutter Gallery</string>
<string
name="settingsFeedback"
description="Title for feedback button."
>Send feedback</string>
<string
name="settingsAttribution"
description="Title for attribution (TOASTER is a proper name and should remain in English)."
>Designed by TOASTER in London</string>
<string
name="demoAppBarTitle"
description="Title for the material App bar component demo."
>App bar</string>
<string
name="demoAppBarSubtitle"
description="Subtitle for the material App bar component demo."
>Displays information and actions relating to the current screen</string>
<string
name="demoAppBarDescription"
description="Description for the material App bar component demo."
>The App bar provides content and actions related to the current screen. It's used for branding, screen titles, navigation, and actions</string>
<string
name="demoBottomAppBarTitle"
description="Title for the material bottom app bar component demo."
>Bottom app bar</string>
<string
name="demoBottomAppBarSubtitle"
description="Subtitle for the material bottom app bar component demo."
>Displays navigation and actions at the bottom</string>
<string
name="demoBottomAppBarDescription"
description="Description for the material bottom app bar component demo."
>Bottom app bars provide access to a bottom navigation drawer and up to four actions, including the floating action button.</string>
<string
name="bottomAppBarNotch"
description="A toggle for whether to have a notch (or cutout) in the bottom app bar demo."
>Notch</string>
<string
name="bottomAppBarPosition"
description="A setting for the position of the floating action button in the bottom app bar demo."
>Floating Action Button Position</string>
<string
name="bottomAppBarPositionDockedEnd"
description="A setting for the position of the floating action button in the bottom app bar that docks the button in the bar and aligns it at the end."
>Docked - End</string>
<string
name="bottomAppBarPositionDockedCenter"
description="A setting for the position of the floating action button in the bottom app bar that docks the button in the bar and aligns it in the center."
>Docked - Center</string>
<string
name="bottomAppBarPositionFloatingEnd"
description="A setting for the position of the floating action button in the bottom app bar that places the button above the bar and aligns it at the end."
>Floating - End</string>
<string
name="bottomAppBarPositionFloatingCenter"
description="A setting for the position of the floating action button in the bottom app bar that places the button above the bar and aligns it in the center."
>Floating - Center</string>
<string
name="demoBannerTitle"
description="Title for the material banner component demo."
>Banner</string>
<string
name="demoBannerSubtitle"
description="Subtitle for the material banner component demo."
>Displaying a banner within a list</string>
<string
name="demoBannerDescription"
description="Description for the material banner component demo."
>A banner displays an important, succinct message, and provides actions for users to address (or dismiss the banner). A user action is required for it to be dismissed.</string>
<string
name="demoBottomNavigationTitle"
description="Title for the material bottom navigation component demo."
>Bottom navigation</string>
<string
name="demoBottomNavigationSubtitle"
description="Subtitle for the material bottom navigation component demo."
>Bottom navigation with cross-fading views</string>
<string
name="demoBottomNavigationPersistentLabels"
description="Option title for bottom navigation with persistent labels."
>Persistent labels</string>
<string
name="demoBottomNavigationSelectedLabel"
description="Option title for bottom navigation with only a selected label."
>Selected label</string>
<string
name="demoBottomNavigationDescription"
description="Description for the material bottom navigation component demo."
>Bottom navigation bars display three to five destinations at the bottom of a screen. Each destination is represented by an icon and an optional text label. When a bottom navigation icon is tapped, the user is taken to the top-level navigation destination associated with that icon.</string>
<string
name="demoButtonTitle"
description="Title for the material buttons component demo."
>Buttons</string>
<string
name="demoButtonSubtitle"
description="Subtitle for the material buttons component demo."
>Text, elevated, outlined, and more</string>
<string
name="demoTextButtonTitle"
description="Title for the text button component demo."
>Text Button</string>
<string
name="demoTextButtonDescription"
description="Description for the text button component demo."
>A text button displays an ink splash on press but does not lift. Use text buttons on toolbars, in dialogs and inline with padding</string>
<string
name="demoElevatedButtonTitle"
description="Title for the elevated button component demo."
>Elevated Button</string>
<string
name="demoElevatedButtonDescription"
description="Description for the elevated button component demo."
>Elevated buttons add dimension to mostly flat layouts. They emphasize functions on busy or wide spaces.</string>
<string
name="demoOutlinedButtonTitle"
description="Title for the outlined button component demo."
>Outlined Button</string>
<string
name="demoOutlinedButtonDescription"
description="Description for the outlined button component demo."
>Outlined buttons become opaque and elevate when pressed. They are often paired with raised buttons to indicate an alternative, secondary action.</string>
<string
name="demoToggleButtonTitle"
description="Title for the toggle buttons component demo."
>Toggle Buttons</string>
<string
name="demoToggleButtonDescription"
description="Description for the toggle buttons component demo."
>Toggle buttons can be used to group related options. To emphasize groups of related toggle buttons, a group should share a common container</string>
<string
name="demoFloatingButtonTitle"
description="Title for the floating action button component demo."
>Floating Action Button</string>
<string
name="demoFloatingButtonDescription"
description="Description for the floating action button component demo."
>A floating action button is a circular icon button that hovers over content to promote a primary action in the application.</string>
<string
name="demoCardTitle"
description="Title for the material cards component demo."
>Cards</string>
<string
name="demoCardSubtitle"
description="Subtitle for the material cards component demo."
>Baseline cards with rounded corners</string>
<string
name="demoChipTitle"
description="Title for the material chips component demo."
>Chips</string>
<string
name="demoCardDescription"
description="Description for the material cards component demo."
>A card is a sheet of Material used to represent some related information, for example an album, a geographical location, a meal, contact details, etc.</string>
<string
name="demoChipSubtitle"
description="Subtitle for the material chips component demo."
>Compact elements that represent an input, attribute, or action</string>
<string
name="demoActionChipTitle"
description="Title for the action chip component demo."
>Action Chip</string>
<string
name="demoActionChipDescription"
description="Description for the action chip component demo."
>Action chips are a set of options which trigger an action related to primary content. Action chips should appear dynamically and contextually in a UI.</string>
<string
name="demoChoiceChipTitle"
description="Title for the choice chip component demo."
>Choice Chip</string>
<string
name="demoChoiceChipDescription"
description="Description for the choice chip component demo."
>Choice chips represent a single choice from a set. Choice chips contain related descriptive text or categories.</string>
<string
name="demoFilterChipTitle"
description="Title for the filter chip component demo."
>Filter Chip</string>
<string
name="demoFilterChipDescription"
description="Description for the filter chip component demo."
>Filter chips use tags or descriptive words as a way to filter content.</string>
<string
name="demoInputChipTitle"
description="Title for the input chip component demo."
>Input Chip</string>
<string
name="demoInputChipDescription"
description="Description for the input chip component demo."
>Input chips represent a complex piece of information, such as an entity (person, place, or thing) or conversational text, in a compact form.</string>
<string
name="demoDataTableTitle"
description="Title for the material data table component demo."
>Data Tables</string>
<string
name="demoDataTableSubtitle"
description="Subtitle for the material data table component demo."
>Rows and columns of information</string>
<string
name="demoDataTableDescription"
description="Description for the material data table component demo."
>Data tables display information in a grid-like format of rows and columns. They organize information in a way that's easy to scan, so that users can look for patterns and insights.</string>
<string
name="dataTableHeader"
description="Header for the data table component demo about nutrition."
>Nutrition</string>
<string
name="dataTableColumnDessert"
description="Column header for desserts."
>Dessert (1 serving)</string>
<string
name="dataTableColumnCalories"
description="Column header for number of calories."
>Calories</string>
<string
name="dataTableColumnFat"
description="Column header for number of grams of fat."
>Fat (g)</string>
<string
name="dataTableColumnCarbs"
description="Column header for number of grams of carbs."
>Carbs (g)</string>
<string
name="dataTableColumnProtein"
description="Column header for number of grams of protein."
>Protein (g)</string>
<string
name="dataTableColumnSodium"
description="Column header for number of milligrams of sodium."
>Sodium (mg)</string>
<string
name="dataTableColumnCalcium"
description="Column header for daily percentage of calcium."
>Calcium (%)</string>
<string
name="dataTableColumnIron"
description="Column header for daily percentage of iron."
>Iron (%)</string>
<string
name="dataTableRowFrozenYogurt"
description="Column row for frozen yogurt."
>Frozen yogurt</string>
<string
name="dataTableRowIceCreamSandwich"
description="Column row for Ice cream sandwich."
>Ice cream sandwich</string>
<string
name="dataTableRowEclair"
description="Column row for Eclair."
>Eclair</string>
<string
name="dataTableRowCupcake"
description="Column row for Cupcake."
>Cupcake</string>
<string
name="dataTableRowGingerbread"
description="Column row for Gingerbread."
>Gingerbread</string>
<string
name="dataTableRowJellyBean"
description="Column row for Jelly bean."
>Jelly bean</string>
<string
name="dataTableRowLollipop"
description="Column row for Lollipop."
>Lollipop</string>
<string
name="dataTableRowHoneycomb"
description="Column row for Honeycomb."
>Honeycomb</string>
<string
name="dataTableRowDonut"
description="Column row for Donut."
>Donut</string>
<string
name="dataTableRowApplePie"
description="Column row for Apple pie."
>Apple pie</string>
<string
name="dataTableRowWithSugar"
description="A dessert with sugar on it. The parameter is some type of dessert."
>{value} with sugar</string>
<string
name="dataTableRowWithHoney"
description="A dessert with honey on it. The parameter is some type of dessert."
>{value} with honey</string>
<string
name="demoDialogTitle"
description="Title for the material dialog component demo."
>Dialogs</string>
<string
name="demoDialogSubtitle"
description="Subtitle for the material dialog component demo."
>Simple, alert, and fullscreen</string>
<string
name="demoAlertDialogTitle"
description="Title for the alert dialog component demo."
>Alert</string>
<string
name="demoAlertDialogDescription"
description="Description for the alert dialog component demo."
>An alert dialog informs the user about situations that require acknowledgement. An alert dialog has an optional title and an optional list of actions.</string>
<string
name="demoAlertTitleDialogTitle"
description="Title for the alert dialog with title component demo."
>Alert With Title</string>
<string
name="demoSimpleDialogTitle"
description="Title for the simple dialog component demo."
>Simple</string>
<string
name="demoSimpleDialogDescription"
description="Description for the simple dialog component demo."
>A simple dialog offers the user a choice between several options. A simple dialog has an optional title that is displayed above the choices.</string>
<string
name="demoDividerTitle"
description="Title for the divider component demo."
>Divider</string>
<string
name="demoDividerSubtitle"
description="Subtitle for the divider component demo."
>A divider is a thin line that groups content in lists and layouts.</string>
<string
name="demoDividerDescription"
description="Description for the divider component demo."
>Dividers can be used in lists, drawers, and elsewhere to separate content.</string>
<string
name="demoVerticalDividerTitle"
description="Title for the vertical divider component demo."
>Vertical Divider</string>
<string
name="demoGridListsTitle"
description="Title for the grid lists component demo."
>Grid Lists</string>
<string
name="demoGridListsSubtitle"
description="Subtitle for the grid lists component demo."
>Row and column layout</string>
<string
name="demoGridListsDescription"
description="Description for the grid lists component demo."
>Grid Lists are best suited for presenting homogeneous data, typically images. Each item in a grid list is called a tile.</string>
<string
name="demoGridListsImageOnlyTitle"
description="Title for the grid lists image-only component demo."
>Image only</string>
<string
name="demoGridListsHeaderTitle"
description="Title for the grid lists component demo with headers on each tile."
>With header</string>
<string
name="demoGridListsFooterTitle"
description="Title for the grid lists component demo with footers on each tile."
>With footer</string>
<string
name="demoSlidersTitle"
description="Title for the sliders component demo."
>Sliders</string>
<string
name="demoSlidersSubtitle"
description="Short description for the sliders component demo."
>Widgets for selecting a value by swiping</string>
<string
name="demoSlidersDescription"
description="Description for the sliders demo."
>Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters.</string>
<string
name="demoRangeSlidersTitle"
description="Title for the range sliders component demo."
>Range Sliders</string>
<string
name="demoRangeSlidersDescription"
description="Description for the range sliders demo."
>Sliders reflect a range of values along a bar. They can have icons on both ends of the bar that reflect a range of values. They are ideal for adjusting settings such as volume, brightness, or applying image filters.</string>
<string
name="demoCustomSlidersTitle"
description="Title for the custom sliders component demo."
>Custom Sliders</string>
<string
name="demoCustomSlidersDescription"
description="Description for the custom sliders demo."
>Sliders reflect a range of values along a bar, from which users may select a single value or range of values. The sliders can be themed and customized.</string>
<string
name="demoSlidersContinuousWithEditableNumericalValue"
description="Text to describe a slider has a continuous value with an editable numerical value."
>Continuous with Editable Numerical Value</string>
<string
name="demoSlidersDiscrete"
description="Text to describe that we have a slider with discrete values."
>Discrete</string>
<string
name="demoSlidersDiscreteSliderWithCustomTheme"
description="Text to describe that we have a slider with discrete values and a custom theme. "
>Discrete Slider with Custom Theme</string>
<string
name="demoSlidersContinuousRangeSliderWithCustomTheme"
description="Text to describe that we have a range slider with continuous values and a custom theme. "
>Continuous Range Slider with Custom Theme</string>
<string
name="demoSlidersContinuous"
description="Text to describe that we have a slider with continuous values."
>Continuous</string>
<string
name="demoSlidersEditableNumericalValue"
description="Label for input field that has an editable numerical value."
>Editable numerical value</string>
<string
name="demoMenuTitle"
description="Title for the menu component demo."
>Menu</string>
<string
name="demoContextMenuTitle"
description="Title for the context menu component demo."
>Context menu</string>
<string
name="demoSectionedMenuTitle"
description="Title for the sectioned menu component demo."
>Sectioned menu</string>
<string
name="demoSimpleMenuTitle"
description="Title for the simple menu component demo."
>Simple menu</string>
<string
name="demoChecklistMenuTitle"
description="Title for the checklist menu component demo."
>Checklist menu</string>
<string
name="demoMenuSubtitle"
description="Short description for the menu component demo."
>Menu buttons and simple menus</string>
<string
name="demoMenuDescription"
description="Description for the menu demo."
>A menu displays a list of choices on a temporary surface. They appear when users interact with a button, action, or other control.</string>
<string
name="demoMenuItemValueOne"
description="The first item in a menu."
>Menu item one</string>
<string
name="demoMenuItemValueTwo"
description="The second item in a menu."
>Menu item two</string>
<string
name="demoMenuItemValueThree"
description="The third item in a menu."
>Menu item three</string>
<string
name="demoMenuOne"
description="The number one."
>One</string>
<string
name="demoMenuTwo"
description="The number two."
>Two</string>
<string
name="demoMenuThree"
description="The number three."
>Three</string>
<string
name="demoMenuFour"
description="The number four."
>Four</string>
<string
name="demoMenuAnItemWithAContextMenuButton"
description="Label next to a button that opens a menu. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
>An item with a context menu</string>
<string
name="demoMenuContextMenuItemOne"
description="Text label for a context menu item. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
>Context menu item one</string>
<string
name="demoMenuADisabledMenuItem"
description="Text label for a disabled menu item. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
>Disabled menu item</string>
<string
name="demoMenuContextMenuItemThree"
description="Text label for a context menu item three. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
>Context menu item three</string>
<string
name="demoMenuAnItemWithASectionedMenu"
description="Label next to a button that opens a sectioned menu . A menu displays a list of choices on a temporary surface. Used as an example in a demo."
>An item with a sectioned menu</string>
<string
name="demoMenuPreview"
description="Button to preview content."
>Preview</string>
<string
name="demoMenuShare"
description="Button to share content."
>Share</string>
<string
name="demoMenuGetLink"
description="Button to get link for content."
>Get link</string>
<string
name="demoMenuRemove"
description="Button to remove content."
>Remove</string>
<string
name="demoMenuSelected"
description="A text to show what value was selected."
>Selected: {value}</string>
<string
name="demoMenuChecked"
description="A text to show what value was checked."
>Checked: {value}</string>
<string
name="demoNavigationDrawerTitle"
description="Title for the material drawer component demo."
>Navigation Drawer</string>
<string
name="demoNavigationDrawerSubtitle"
description="Subtitle for the material drawer component demo."
>Displaying a drawer within appbar</string>
<string
name="demoNavigationDrawerDescription"
description="Description for the material drawer component demo."
>A Material Design panel that slides in horizontally from the edge of the screen to show navigation links in an application.</string>
<string
name="demoNavigationDrawerUserName"
description="Demo username for navigation drawer."
>User Name</string>
<string
name="demoNavigationDrawerUserEmail"
description="Demo email for navigation drawer."
>[email protected]</string>
<string
name="demoNavigationDrawerToPageOne"
description="Drawer Item One."
>Item One</string>
<string
name="demoNavigationDrawerToPageTwo"
description="Drawer Item Two."
>Item Two</string>
<string
name="demoNavigationDrawerText"
description="Description to open navigation drawer."
>Swipe from the edge or tap the upper-left icon to see the drawer</string>
<string
name="demoNavigationRailTitle"
description="Title for the material Navigation Rail component demo."
>Navigation Rail</string>
<string
name="demoNavigationRailSubtitle"
description="Subtitle for the material Navigation Rail component demo."
>Displaying a Navigation Rail within an app</string>
<string
name="demoNavigationRailDescription"
description="Description for the material Navigation Rail component demo."
>A material widget that is meant to be displayed at the left or right of an app to navigate between a small number of views, typically between three and five.</string>
<string
name="demoNavigationRailFirst"
description="Navigation Rail destination first label."
>First</string>
<string
name="demoNavigationRailSecond"
description="Navigation Rail destination second label."
>Second</string>
<string
name="demoNavigationRailThird"
description="Navigation Rail destination Third label."
>Third</string>
<string
name="demoMenuAnItemWithASimpleMenu"
description="Label next to a button that opens a simple menu. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
>An item with a simple menu</string>
<string
name="demoMenuAnItemWithAChecklistMenu"
description="Label next to a button that opens a checklist menu. A menu displays a list of choices on a temporary surface. Used as an example in a demo."
>An item with a checklist menu</string>
<string
name="demoFullscreenDialogTitle"
description="Title for the fullscreen dialog component demo."
>Fullscreen</string>
<string
name="demoFullscreenDialogDescription"
description="Description for the fullscreen dialog component demo."
>The fullscreenDialog property specifies whether the incoming page is a fullscreen modal dialog</string>
<string
name="demoCupertinoActivityIndicatorTitle"
description="Title for the cupertino activity indicator component demo."
>Activity indicator</string>
<string
name="demoCupertinoActivityIndicatorSubtitle"
description="Subtitle for the cupertino activity indicator component demo."
>iOS-style activity indicators</string>
<string
name="demoCupertinoActivityIndicatorDescription"
description="Description for the cupertino activity indicator component demo."
>An iOS-style activity indicator that spins clockwise.</string>
<string
name="demoCupertinoButtonsTitle"
description="Title for the cupertino buttons component demo."
>Buttons</string>
<string
name="demoCupertinoButtonsSubtitle"
description="Subtitle for the cupertino buttons component demo."
>iOS-style buttons</string>
<string
name="demoCupertinoButtonsDescription"
description="Description for the cupertino buttons component demo."
>An iOS-style button. It takes in text and/or an icon that fades out and in on touch. May optionally have a background.</string>
<string
name="demoCupertinoContextMenuTitle"
description="Title for the cupertino context menu component demo."
>Context Menu</string>
<string
name="demoCupertinoContextMenuSubtitle"
description="Subtitle for the cupertino context menu component demo."
>iOS-style context menu</string>
<string
name="demoCupertinoContextMenuDescription"
description="Description for the cupertino context menu component demo."
>An iOS-style full screen contextual menu that appears when an element is long-pressed.</string>
<string
name="demoCupertinoContextMenuActionOne"
description="Context menu list item one"
>Action one</string>
<string
name="demoCupertinoContextMenuActionTwo"
description="Context menu list item two"
>Action two</string>
<string
name="demoCupertinoContextMenuActionText"
description="Context menu text."
>Tap and hold the Flutter logo to see the context menu.</string>
<string
name="demoCupertinoAlertsTitle"
description="Title for the cupertino alerts component demo."
>Alerts</string>
<string
name="demoCupertinoAlertsSubtitle"
description="Subtitle for the cupertino alerts component demo."
>iOS-style alert dialogs</string>
<string
name="demoCupertinoAlertTitle"
description="Title for the cupertino alert component demo."
>Alert</string>
<string
name="demoCupertinoAlertDescription"
description="Description for the cupertino alert component demo."
>An alert dialog informs the user about situations that require acknowledgement. An alert dialog has an optional title, optional content, and an optional list of actions. The title is displayed above the content and the actions are displayed below the content.</string>
<string
name="demoCupertinoAlertWithTitleTitle"
description="Title for the cupertino alert with title component demo."
>Alert With Title</string>
<string
name="demoCupertinoAlertButtonsTitle"
description="Title for the cupertino alert with buttons component demo."
>Alert With Buttons</string>
<string
name="demoCupertinoAlertButtonsOnlyTitle"
description="Title for the cupertino alert buttons only component demo."
>Alert Buttons Only</string>
<string
name="demoCupertinoActionSheetTitle"
description="Title for the cupertino action sheet component demo."
>Action Sheet</string>
<string
name="demoCupertinoActionSheetDescription"
description="Description for the cupertino action sheet component demo."
>An action sheet is a specific style of alert that presents the user with a set of two or more choices related to the current context. An action sheet can have a title, an additional message, and a list of actions.</string>
<string
name="demoCupertinoNavigationBarTitle"
description="Title for the cupertino navigation bar component demo."
>Navigation bar</string>
<string
name="demoCupertinoNavigationBarSubtitle"
description="Subtitle for the cupertino navigation bar component demo."
>iOS-style navigation bar</string>
<string
name="demoCupertinoNavigationBarDescription"
description="Description for the cupertino navigation bar component demo."
>An iOS-styled navigation bar. The navigation bar is a toolbar that minimally consists of a page title, in the middle of the toolbar.</string>
<string
name="demoCupertinoPickerTitle"
description="Title for the cupertino pickers component demo."
>Pickers</string>
<string
name="demoCupertinoPickerSubtitle"
description="Subtitle for the cupertino pickers component demo."
>iOS-style pickers</string>
<string
name="demoCupertinoPickerDescription"
description="Description for the cupertino pickers component demo."
>An iOS-style picker widget that can be used to select strings, dates, times, or both date and time.</string>
<string
name="demoCupertinoPickerTimer"
description="Label to open a countdown timer picker."
>Timer</string>
<string
name="demoCupertinoPicker"
description="Label to open an iOS picker."
>Picker</string>
<string
name="demoCupertinoPickerDate"
description="Label to open a date picker."
>Date</string>
<string
name="demoCupertinoPickerTime"
description="Label to open a time picker."
>Time</string>
<string
name="demoCupertinoPickerDateTime"
description="Label to open a date and time picker."
>Date and Time</string>
<string
name="demoCupertinoPullToRefreshTitle"
description="Title for the cupertino pull-to-refresh component demo."
>Pull to refresh</string>
<string
name="demoCupertinoPullToRefreshSubtitle"
description="Subtitle for the cupertino pull-to-refresh component demo."
>iOS-style pull to refresh control</string>
<string
name="demoCupertinoPullToRefreshDescription"
description="Description for the cupertino pull-to-refresh component demo."
>A widget implementing the iOS-style pull to refresh content control.</string>
<string
name="demoCupertinoSegmentedControlTitle"
description="Title for the cupertino segmented control component demo."
>Segmented control</string>
<string
name="demoCupertinoSegmentedControlSubtitle"
description="Subtitle for the cupertino segmented control component demo."
>iOS-style segmented control</string>
<string
name="demoCupertinoSegmentedControlDescription"
description="Description for the cupertino segmented control component demo."
>Used to select between a number of mutually exclusive options. When one option in the segmented control is selected, the other options in the segmented control cease to be selected.</string>
<string
name="demoCupertinoSliderTitle"
description="Title for the cupertino slider component demo."
>Slider</string>
<string
name="demoCupertinoSliderSubtitle"
description="Subtitle for the cupertino slider component demo."
>iOS-style slider</string>
<string
name="demoCupertinoSliderDescription"
description="Description for the cupertino slider component demo."
>A slider can be used to select from either a continuous or a discrete set of values.</string>
<string
name="demoCupertinoSliderContinuous"
description="A label for a continuous slider that indicates what value it is set to."
>Continuous: {value}</string>
<string
name="demoCupertinoSliderDiscrete"
description="A label for a discrete slider that indicates what value it is set to."
>Discrete: {value}</string>
<string
name="demoCupertinoSwitchSubtitle"
description="Subtitle for the cupertino switch component demo."
>iOS-style switch</string>
<string
name="demoCupertinoSwitchDescription"
description="Description for the cupertino switch component demo."
>A switch is used to toggle the on/off state of a single setting.</string>
<string
name="demoCupertinoTabBarTitle"
description="Title for the cupertino bottom tab bar demo."
>Tab bar</string>
<string
name="demoCupertinoTabBarSubtitle"
description="Subtitle for the cupertino bottom tab bar demo."
>iOS-style bottom tab bar</string>
<string
name="demoCupertinoTabBarDescription"
description="Description for the cupertino bottom tab bar demo."
>An iOS-style bottom navigation tab bar. Displays multiple tabs with one tab being active, the first tab by default.</string>
<string
name="cupertinoTabBarHomeTab"
description="Title for the home tab in the bottom tab bar demo."
>Home</string>
<string
name="cupertinoTabBarChatTab"
description="Title for the chat tab in the bottom tab bar demo."
>Chat</string>
<string
name="cupertinoTabBarProfileTab"
description="Title for the profile tab in the bottom tab bar demo."
>Profile</string>
<string
name="demoCupertinoTextFieldTitle"
description="Title for the cupertino text field demo."
>Text fields</string>
<string
name="demoCupertinoTextFieldSubtitle"
description="Subtitle for the cupertino text field demo."
>iOS-style text fields</string>
<string
name="demoCupertinoTextFieldDescription"
description="Description for the cupertino text field demo."
>A text field lets the user enter text, either with a hardware keyboard or with an onscreen keyboard.</string>
<string
name="demoCupertinoTextFieldPIN"
description="The placeholder for a text field where a user would enter their PIN number."
>PIN</string>
<string
name="demoCupertinoSearchTextFieldTitle"
description="Title for the cupertino search text field demo."
>Search text field</string>
<string
name="demoCupertinoSearchTextFieldSubtitle"
description="Subtitle for the cupertino search text field demo."
>iOS-style search text field</string>
<string
name="demoCupertinoSearchTextFieldDescription"
description="Description for the cupertino search text field demo."
>A search text field that lets the user search by entering text, and that can offer and filter suggestions.</string>
<string
name="demoCupertinoSearchTextFieldPlaceholder"
description="The placeholder for a search text field demo."
>Enter some text</string>
<string
name="demoCupertinoScrollbarTitle"
description="Title for the cupertino scrollbar demo."
>Scrollbar</string>
<string
name="demoCupertinoScrollbarSubtitle"
description="Subtitle for the cupertino scrollbar demo."
>iOS-style scrollbar</string>
<string
name="demoCupertinoScrollbarDescription"
description="Description for the cupertino scrollbar demo."
>A scrollbar that wraps the given child</string>
<string
name="demoMotionTitle"
description="Title for the motion demo."
>Motion</string>
<string
name="demoMotionSubtitle"
description="Subtitle for the motion demo."
>All of the predefined transition patterns</string>
<string
name="demoContainerTransformDemoInstructions"
description="Instructions for the container transform demo located in the app bar."
>Cards, Lists & FAB</string>
<string
name="demoSharedXAxisDemoInstructions"
description="Instructions for the shared x axis demo located in the app bar."
>Next and Back Buttons</string>
<string
name="demoSharedYAxisDemoInstructions"
description="Instructions for the shared y axis demo located in the app bar."
>Sort by "Recently Played"</string>
<string
name="demoSharedZAxisDemoInstructions"
description="Instructions for the shared z axis demo located in the app bar."
>Settings icon button</string>
<string
name="demoFadeThroughDemoInstructions"
description="Instructions for the fade through demo located in the app bar."
>Bottom navigation</string>
<string
name="demoFadeScaleDemoInstructions"
description="Instructions for the fade scale demo located in the app bar."
>Modal and FAB</string>
<string
name="demoContainerTransformTitle"
description="Title for the container transform demo."
>Container Transform</string>
<string
name="demoContainerTransformDescription"
description="Description for the container transform demo."
>The container transform pattern is designed for transitions between UI elements that include a container. This pattern creates a visible connection between two UI elements</string>
<string
name="demoContainerTransformModalBottomSheetTitle"
description="Title for the container transform modal bottom sheet."
>Fade mode</string>
<string
name="demoContainerTransformTypeFade"
description="Description for container transform fade type setting."
>FADE</string>
<string
name="demoContainerTransformTypeFadeThrough"
description="Description for container transform fade through type setting."
>FADE THROUGH</string>
<string
name="demoMotionPlaceholderTitle"
description="The placeholder for the motion demos title properties."
>Title</string>
<string
name="demoMotionPlaceholderSubtitle"
description="The placeholder for the motion demos subtitle properties."
>Secondary text</string>
<string
name="demoMotionSmallPlaceholderSubtitle"
description="The placeholder for the motion demos shortened subtitle properties."
>Secondary</string>
<string
name="demoMotionDetailsPageTitle"
description="The title for the details page in the motion demos."
>Details Page</string>
<string
name="demoMotionListTileTitle"
description="The title for a list tile in the motion demos."
>List item</string>
<string
name="demoSharedAxisDescription"
description="Description for the shared y axis demo."
>The shared axis pattern is used for transitions between the UI elements that have a spatial or navigational relationship. This pattern uses a shared transformation on the x, y, or z axis to reinforce the relationship between elements.</string>
<string
name="demoSharedXAxisTitle"
description="Title for the shared x axis demo."
>Shared x-axis</string>
<string
name="demoSharedXAxisBackButtonText"
description="Button text for back button in the shared x axis demo."
>BACK</string>
<string
name="demoSharedXAxisNextButtonText"
description="Button text for the next button in the shared x axis demo."
>NEXT</string>
<string
name="demoSharedXAxisCoursePageTitle"
description="Title for course selection page in the shared x axis demo."
>Streamline your courses</string>
<string
name="demoSharedXAxisCoursePageSubtitle"
description="Subtitle for course selection page in the shared x axis demo."
>Bundled categories appear as groups in your feed. You can always change this later.</string>
<string
name="demoSharedXAxisArtsAndCraftsCourseTitle"
description="Title for the Arts & Crafts course in the shared x axis demo."
>Arts & Crafts</string>
<string
name="demoSharedXAxisBusinessCourseTitle"
description="Title for the Business course in the shared x axis demo."
>Business</string>
<string
name="demoSharedXAxisIllustrationCourseTitle"
description="Title for the Illustration course in the shared x axis demo."
>Illustration</string>
<string
name="demoSharedXAxisDesignCourseTitle"
description="Title for the Design course in the shared x axis demo."
>Design</string>
<string
name="demoSharedXAxisCulinaryCourseTitle"
description="Title for the Culinary course in the shared x axis demo."
>Culinary</string>
<string
name="demoSharedXAxisBundledCourseSubtitle"
description="Subtitle for a bundled course in the shared x axis demo."
>Bundled</string>
<string
name="demoSharedXAxisIndividualCourseSubtitle"
description="Subtitle for a individual course in the shared x axis demo."
>Shown Individually</string>
<string
name="demoSharedXAxisSignInWelcomeText"
description="Welcome text for sign in page in the shared x axis demo. David Park is a name and does not need to be translated."
>Hi David Park</string>
<string
name="demoSharedXAxisSignInSubtitleText"
description="Subtitle text for sign in page in the shared x axis demo."
>Sign in with your account</string>
<string
name="demoSharedXAxisSignInTextFieldLabel"
description="Label text for the sign in text field in the shared x axis demo."
>Email or phone number</string>
<string
name="demoSharedXAxisForgotEmailButtonText"
description="Button text for the forgot email button in the shared x axis demo."
>FORGOT EMAIL?</string>
<string
name="demoSharedXAxisCreateAccountButtonText"
description="Button text for the create account button in the shared x axis demo."
>CREATE ACCOUNT</string>
<string
name="demoSharedYAxisTitle"
description="Title for the shared y axis demo."
>Shared y-axis</string>
<string
name="demoSharedYAxisAlbumCount"
description="Text for album count in the shared y axis demo."
>268 albums</string>
<string
name="demoSharedYAxisAlphabeticalSortTitle"
description="Title for alphabetical sorting type in the shared y axis demo."
>A-Z</string>
<string
name="demoSharedYAxisRecentSortTitle"
description="Title for recently played sorting type in the shared y axis demo."
>Recently played</string>
<string
name="demoSharedYAxisAlbumTileTitle"
description="Title for an AlbumTile in the shared y axis demo."
>Album</string>
<string
name="demoSharedYAxisAlbumTileSubtitle"
description="Subtitle for an AlbumTile in the shared y axis demo."
>Artist</string>
<string
name="demoSharedYAxisAlbumTileDurationUnit"
description="Duration unit for an AlbumTile in the shared y axis demo."
>min</string>
<string
name="demoSharedZAxisTitle"
description="Title for the shared z axis demo."
>Shared z-axis</string>
<string
name="demoSharedZAxisSettingsPageTitle"
description="Title for the settings page in the shared z axis demo."
>Settings</string>
<string
name="demoSharedZAxisBurgerRecipeTitle"
description="Title for burger recipe tile in the shared z axis demo."
>Burger</string>
<string
name="demoSharedZAxisBurgerRecipeDescription"
description="Subtitle for the burger recipe tile in the shared z axis demo."
>Burger recipe</string>
<string
name="demoSharedZAxisSandwichRecipeTitle"
description="Title for sandwich recipe tile in the shared z axis demo."
>Sandwich</string>
<string
name="demoSharedZAxisSandwichRecipeDescription"
description="Subtitle for the sandwich recipe tile in the shared z axis demo."
>Sandwich recipe</string>
<string
name="demoSharedZAxisDessertRecipeTitle"
description="Title for dessert recipe tile in the shared z axis demo."
>Dessert</string>
<string
name="demoSharedZAxisDessertRecipeDescription"
description="Subtitle for the dessert recipe tile in the shared z axis demo."
>Dessert recipe</string>
<string
name="demoSharedZAxisShrimpPlateRecipeTitle"
description="Title for shrimp plate recipe tile in the shared z axis demo."
>Shrimp</string>
<string
name="demoSharedZAxisShrimpPlateRecipeDescription"
description="Subtitle for the shrimp plate recipe tile in the shared z axis demo."
>Shrimp plate recipe</string>
<string
name="demoSharedZAxisCrabPlateRecipeTitle"
description="Title for crab plate recipe tile in the shared z axis demo."
>Crab</string>
<string
name="demoSharedZAxisCrabPlateRecipeDescription"
description="Subtitle for the crab plate recipe tile in the shared z axis demo."
>Crab plate recipe</string>
<string
name="demoSharedZAxisBeefSandwichRecipeTitle"
description="Title for beef sandwich recipe tile in the shared z axis demo."
>Beef Sandwich</string>
<string
name="demoSharedZAxisBeefSandwichRecipeDescription"
description="Subtitle for the beef sandwich recipe tile in the shared z axis demo."
>Beef Sandwich recipe</string>
<string
name="demoSharedZAxisSavedRecipesListTitle"
description="Title for list of saved recipes in the shared z axis demo."
>Saved Recipes</string>
<string
name="demoSharedZAxisProfileSettingLabel"
description="Text label for profile setting tile in the shared z axis demo."
>Profile</string>
<string
name="demoSharedZAxisNotificationSettingLabel"
description="Text label for notifications setting tile in the shared z axis demo."
>Notifications</string>
<string
name="demoSharedZAxisPrivacySettingLabel"
description="Text label for the privacy setting tile in the shared z axis demo."
>Privacy</string>
<string
name="demoSharedZAxisHelpSettingLabel"
description="Text label for the help setting tile in the shared z axis demo."
>Help</string>
<string
name="demoFadeThroughTitle"
description="Title for the fade through demo."
>Fade through</string>
<string
name="demoFadeThroughDescription"
description="Description for the fade through demo."
>The fade through pattern is used for transitions between UI elements that do not have a strong relationship to each other.</string>
<string
name="demoFadeThroughAlbumsDestination"
description="Text for albums bottom navigation bar destination in the fade through demo."
>Albums</string>
<string
name="demoFadeThroughPhotosDestination"
description="Text for photos bottom navigation bar destination in the fade through demo."
>Photos</string>
<string
name="demoFadeThroughSearchDestination"
description="Text for search bottom navigation bar destination in the fade through demo."
>Search</string>
<string
name="demoFadeThroughTextPlaceholder"
description="Placeholder for example card title in the fade through demo."
>123 photos</string>
<string
name="demoFadeScaleTitle"
description="Title for the fade scale demo."
>Fade</string>
<string
name="demoFadeScaleDescription"
description="Description for the fade scale demo."
>The fade pattern is used for UI elements that enter or exit within the bounds of the screen, such as a dialog that fades in the center of the screen.</string>
<string
name="demoFadeScaleShowAlertDialogButton"
description="Button text to show alert dialog in the fade scale demo."
>SHOW MODAL</string>
<string
name="demoFadeScaleShowFabButton"
description="Button text to show fab in the fade scale demo."
>SHOW FAB</string>
<string
name="demoFadeScaleHideFabButton"
description="Button text to hide fab in the fade scale demo."
>HIDE FAB</string>
<string
name="demoFadeScaleAlertDialogHeader"
description="Generic header for alert dialog in the fade scale demo."
>Alert Dialog</string>
<string
name="demoFadeScaleAlertDialogCancelButton"
description="Button text for alert dialog cancel button in the fade scale demo."
>CANCEL</string>
<string
name="demoFadeScaleAlertDialogDiscardButton"
description="Button text for alert dialog discard button in the fade scale demo."
>DISCARD</string>
<string
name="demoColorsTitle"
description="Title for the colors demo."
>Colors</string>
<string
name="demoColorsSubtitle"
description="Subtitle for the colors demo."
>All of the predefined colors</string>
<string
name="demoColorsDescription"
description="Description for the colors demo. Material Design should remain capitalized."
>Color and color swatch constants which represent Material Design's color palette.</string>
<string
name="demoTypographyTitle"
description="Title for the typography demo."
>Typography</string>
<string
name="demoTypographySubtitle"
description="Subtitle for the typography demo."
>All of the predefined text styles</string>
<string
name="demoTypographyDescription"
description="Description for the typography demo. Material Design should remain capitalized."
>Definitions for the various typographical styles found in Material Design.</string>
<string
name="demo2dTransformationsTitle"
description="Title for the 2D transformations demo."
>2D transformations</string>
<string
name="demo2dTransformationsSubtitle"
description="Subtitle for the 2D transformations demo."
>Pan and zoom</string>
<string
name="demo2dTransformationsDescription"
description="Description for the 2D transformations demo."
>Tap to edit tiles, and use gestures to move around the scene. Drag to pan and pinch with two fingers to zoom. Press the reset button to return to the starting orientation.</string>
<string
name="demo2dTransformationsResetTooltip"
description="Tooltip for a button to reset the transformations (scale, translation) for the 2D transformations demo."
>Reset transformations</string>
<string
name="demo2dTransformationsEditTooltip"
description="Tooltip for a button to edit a tile."
>Edit tile</string>
<string
name="buttonText"
description="Text for a generic button."
>BUTTON</string>
<string
name="demoBottomSheetTitle"
description="Title for bottom sheet demo."
>Bottom sheet</string>
<string
name="demoBottomSheetSubtitle"
description="Description for bottom sheet demo."
>Persistent and modal bottom sheets</string>
<string
name="demoBottomSheetPersistentTitle"
description="Title for persistent bottom sheet demo."
>Persistent bottom sheet</string>
<string
name="demoBottomSheetPersistentDescription"
description="Description for persistent bottom sheet demo."
>A persistent bottom sheet shows information that supplements the primary content of the app. A persistent bottom sheet remains visible even when the user interacts with other parts of the app.</string>
<string
name="demoBottomSheetModalTitle"
description="Title for modal bottom sheet demo."
>Modal bottom sheet</string>
<string
name="demoBottomSheetModalDescription"
description="Description for modal bottom sheet demo."
>A modal bottom sheet is an alternative to a menu or a dialog and prevents the user from interacting with the rest of the app.</string>
<string
name="demoBottomSheetAddLabel"
description="Semantic label for add icon."
>Add</string>
<string
name="demoBottomSheetButtonText"
description="Button text to show bottom sheet."
>SHOW BOTTOM SHEET</string>
<string
name="demoBottomSheetHeader"
description="Generic header placeholder."
>Header</string>
<string
name="demoBottomSheetItem"
description="Generic item placeholder."
>Item {value}</string>
<string
name="demoListsTitle"
description="Title for lists demo."
>Lists</string>
<string
name="demoListsSubtitle"
description="Subtitle for lists demo."
>Scrolling list layouts</string>
<string
name="demoListsDescription"
description="Description for lists demo. This describes what a single row in a list consists of."
>A single fixed-height row that typically contains some text as well as a leading or trailing icon.</string>
<string
name="demoOneLineListsTitle"
description="Title for lists demo with only one line of text per row."
>One Line</string>
<string
name="demoTwoLineListsTitle"
description="Title for lists demo with two lines of text per row."
>Two Lines</string>
<string
name="demoListsSecondary"
description="Text that appears in the second line of a list item."
>Secondary text</string>
<string
name="demoProgressIndicatorTitle"
description="Title for progress indicators demo."
>Progress indicators</string>
<string
name="demoProgressIndicatorSubtitle"
description="Subtitle for progress indicators demo."
>Linear, circular, indeterminate</string>
<string
name="demoCircularProgressIndicatorTitle"
description="Title for circular progress indicator demo."
>Circular Progress Indicator</string>
<string
name="demoCircularProgressIndicatorDescription"
description="Description for circular progress indicator demo."
>A Material Design circular progress indicator, which spins to indicate that the application is busy.</string>
<string
name="demoLinearProgressIndicatorTitle"
description="Title for linear progress indicator demo."
>Linear Progress Indicator</string>
<string
name="demoLinearProgressIndicatorDescription"
description="Description for linear progress indicator demo."
>A Material Design linear progress indicator, also known as a progress bar.</string>
<string
name="demoPickersTitle"
description="Title for pickers demo."
>Pickers</string>
<string
name="demoPickersSubtitle"
description="Subtitle for pickers demo."
>Date and time selection</string>
<string
name="demoDatePickerTitle"
description="Title for date picker demo."
>Date Picker</string>
<string
name="demoDatePickerDescription"
description="Description for date picker demo."
>Shows a dialog containing a Material Design date picker.</string>
<string
name="demoTimePickerTitle"
description="Title for time picker demo."
>Time Picker</string>
<string
name="demoTimePickerDescription"
description="Description for time picker demo."
>Shows a dialog containing a Material Design time picker.</string>
<string
name="demoDateRangePickerTitle"
description="Title for date range picker demo."
>Date Range Picker</string>
<string
name="demoDateRangePickerDescription"
description="Description for date range picker demo."
>Shows a dialog containing a Material Design date range picker.</string>
<string
name="demoPickersShowPicker"
description="Button text to show the date or time picker in the demo."
>SHOW PICKER</string>
<string
name="demoTabsTitle"
description="Title for tabs demo."
>Tabs</string>
<string
name="demoTabsScrollingTitle"
description="Title for tabs demo with a tab bar that scrolls."
>Scrolling</string>
<string
name="demoTabsNonScrollingTitle"
description="Title for tabs demo with a tab bar that doesn't scroll."
>Non-scrolling</string>
<string
name="demoTabsSubtitle"
description="Subtitle for tabs demo."
>Tabs with independently scrollable views</string>
<string
name="demoTabsDescription"
description="Description for tabs demo."
>Tabs organize content across different screens, data sets, and other interactions.</string>
<string
name="demoSnackbarsTitle"
description="Title for snackbars demo."
>Snackbars</string>
<string
name="demoSnackbarsSubtitle"
description="Subtitle for snackbars demo."
>Snackbars show messages at the bottom of the screen</string>
<string
name="demoSnackbarsDescription"
description="Description for snackbars demo."
>Snackbars inform users of a process that an app has performed or will perform. They appear temporarily, towards the bottom of the screen. They shouldn't interrupt the user experience, and they don't require user input to disappear.</string>
<string
name="demoSnackbarsButtonLabel"
description="Label for button to show a snackbar."
>SHOW A SNACKBAR</string>
<string
name="demoSnackbarsText"
description="Text to show on a snackbar."
>This is a snackbar.</string>
<string
name="demoSnackbarsActionButtonLabel"
description="Label for action button text on the snackbar."
>ACTION</string>
<string
name="demoSnackbarsAction"
description="Text that appears when you press on a snackbars' action."
>You pressed the snackbar action.</string>
<string
name="demoSelectionControlsTitle"
description="Title for selection controls demo."
>Selection controls</string>
<string
name="demoSelectionControlsSubtitle"
description="Subtitle for selection controls demo."
>Checkboxes, radio buttons, and switches</string>
<string
name="demoSelectionControlsCheckboxTitle"
description="Title for the checkbox (selection controls) demo."
>Checkbox</string>
<string
name="demoSelectionControlsCheckboxDescription"
description="Description for the checkbox (selection controls) demo."
>Checkboxes allow the user to select multiple options from a set. A normal checkbox's value is true or false and a tristate checkbox's value can also be null.</string>
<string
name="demoSelectionControlsRadioTitle"
description="Title for the radio button (selection controls) demo."
>Radio</string>
<string
name="demoSelectionControlsRadioDescription"
description="Description for the radio button (selection controls) demo."
>Radio buttons allow the user to select one option from a set. Use radio buttons for exclusive selection if you think that the user needs to see all available options side-by-side.</string>
<string
name="demoSelectionControlsSwitchTitle"
description="Title for the switches (selection controls) demo."
>Switch</string>
<string
name="demoSelectionControlsSwitchDescription"
description="Description for the switches (selection controls) demo."
>On/off switches toggle the state of a single settings option. The option that the switch controls, as well as the state it's in, should be made clear from the corresponding inline label.</string>
<string
name="demoBottomTextFieldsTitle"
description="Title for text fields demo."
>Text fields</string>
<string
name="demoTextFieldTitle"
description="Title for text fields demo."
>Text fields</string>
<string
name="demoTextFieldSubtitle"
description="Description for text fields demo."
>Single line of editable text and numbers</string>
<string
name="demoTextFieldDescription"
description="Description for text fields demo."
>Text fields allow users to enter text into a UI. They typically appear in forms and dialogs.</string>
<string
name="demoTextFieldShowPasswordLabel"
description="Label for show password icon."
>Show password</string>
<string
name="demoTextFieldHidePasswordLabel"
description="Label for hide password icon."
>Hide password</string>
<string
name="demoTextFieldFormErrors"
description="Text that shows up on form errors."
>Please fix the errors in red before submitting.</string>
<string
name="demoTextFieldNameRequired"
description="Shows up as submission error if name is not given in the form."
>Name is required.</string>
<string
name="demoTextFieldOnlyAlphabeticalChars"
description="Error that shows if non-alphabetical characters are given."
>Please enter only alphabetical characters.</string>
<string
name="demoTextFieldEnterUSPhoneNumber"
description="Error that shows up if non-valid non-US phone number is given."
>(###) ###-#### - Enter a US phone number.</string>
<string
name="demoTextFieldEnterPassword"
description="Error that shows up if password is not given."
>Please enter a password.</string>
<string
name="demoTextFieldPasswordsDoNotMatch"
description="Error that shows up, if the re-typed password does not match the already given password."
>The passwords don't match</string>
<string
name="demoTextFieldWhatDoPeopleCallYou"
description="Placeholder for name field in form."
>What do people call you?</string>
<string
name="demoTextFieldNameField"
description="The label for a name input field that is required (hence the star)."
>Name*</string>
<string
name="demoTextFieldWhereCanWeReachYou"
description="Placeholder for when entering a phone number in a form."
>Where can we reach you?</string>
<string
name="demoTextFieldPhoneNumber"
description="The label for a phone number input field that is required (hence the star)."
>Phone number*</string>
<string
name="demoTextFieldYourEmailAddress"
description="The label for an email address input field."
>Your email address</string>
<string
name="demoTextFieldEmail"
description="The label for an email address input field"
>Email</string>
<string
name="demoTextFieldTellUsAboutYourself"
description="The placeholder text for biography/life story input field."
>Tell us about yourself (e.g., write down what you do or what hobbies you have)</string>
<string
name="demoTextFieldKeepItShort"
description="Helper text for biography/life story input field."
>Keep it short, this is just a demo.</string>
<string
name="demoTextFieldLifeStory"
description="The label for biography/life story input field."
>Life story</string>
<string
name="demoTextFieldSalary"
description="The label for salary input field."
>Salary</string>
<string
name="demoTextFieldUSD"
description="US currency, used as suffix in input field for salary."
>USD</string>
<string
name="demoTextFieldNoMoreThan"
description="Helper text for password input field."
>No more than 8 characters.</string>
<string
name="demoTextFieldPassword"
description="Label for password input field, that is required (hence the star)."
>Password*</string>
<string
name="demoTextFieldRetypePassword"
description="Label for repeat password input field."
>Re-type password*</string>
<string
name="demoTextFieldSubmit"
description="The submit button text for form."
>SUBMIT</string>
<string
name="demoTextFieldNameHasPhoneNumber"
description="Text that shows up when valid phone number and name is submitted in form."
>{name} phone number is {phoneNumber}</string>
<string
name="demoTextFieldRequiredField"
description="Helper text to indicate that * means that it is a required field."
>* indicates required field</string>
<string
name="demoTooltipTitle"
description="Title for tooltip demo."
>Tooltips</string>
<string
name="demoTooltipSubtitle"
description="Subtitle for tooltip demo."
>Short message displayed on long press or hover</string>
<string
name="demoTooltipDescription"
description="Description for tooltip demo."
>Tooltips provide text labels that help explain the function of a button or other user interface action. Tooltips display informative text when users hover over, focus on, or long press an element.</string>
<string
name="demoTooltipInstructions"
description="Instructions for how to trigger a tooltip in the tooltip demo."
>Long press or hover to display the tooltip.</string>
<string
name="bottomNavigationCommentsTab"
description="Title for Comments tab of bottom navigation."
>Comments</string>
<string
name="bottomNavigationCalendarTab"
description="Title for Calendar tab of bottom navigation."
>Calendar</string>
<string
name="bottomNavigationAccountTab"
description="Title for Account tab of bottom navigation."
>Account</string>
<string
name="bottomNavigationAlarmTab"
description="Title for Alarm tab of bottom navigation."
>Alarm</string>
<string
name="bottomNavigationCameraTab"
description="Title for Camera tab of bottom navigation."
>Camera</string>
<string
name="bottomNavigationContentPlaceholder"
description="Accessibility label for the content placeholder in the bottom navigation demo"
>Placeholder for {title} tab</string>
<string
name="buttonTextCreate"
description="Tooltip text for a create button."
>Create</string>
<string
name="dialogSelectedOption"
description="Message displayed after an option is selected from a dialog"
>You selected: "{value}"</string>
<string
name="chipTurnOnLights"
description="A chip component to turn on the lights."
>Turn on lights</string>
<string
name="chipSmall"
description="A chip component to select a small size."
>Small</string>
<string
name="chipMedium"
description="A chip component to select a medium size."
>Medium</string>
<string
name="chipLarge"
description="A chip component to select a large size."
>Large</string>
<string
name="chipElevator"
description="A chip component to filter selection by elevators."
>Elevator</string>
<string
name="chipWasher"
description="A chip component to filter selection by washers."
>Washer</string>
<string
name="chipFireplace"
description="A chip component to filter selection by fireplaces."
>Fireplace</string>
<string
name="chipBiking"
description="A chip component to that indicates a biking selection."
>Biking</string>
<string
name="demo"
description="Used in the title of the demos."
>Demo</string>
<string
name="bottomAppBar"
description="Used as semantic label for a BottomAppBar."
>Bottom app bar</string>
<string
name="loading"
description="Indicates the loading process."
>Loading</string>
<string
name="dialogDiscardTitle"
description="Alert dialog message to discard draft."
>Discard draft?</string>
<string
name="dialogLocationTitle"
description="Alert dialog title to use location services."
>Use Google's location service?</string>
<string
name="dialogLocationDescription"
description="Alert dialog description to use location services."
>Let Google help apps determine location. This means sending anonymous location data to Google, even when no apps are running.</string>
<string
name="dialogCancel"
description="Alert dialog cancel option."
>CANCEL</string>
<string
name="dialogDiscard"
description="Alert dialog discard option."
>DISCARD</string>
<string
name="dialogDisagree"
description="Alert dialog disagree option."
>DISAGREE</string>
<string
name="dialogAgree"
description="Alert dialog agree option."
>AGREE</string>
<string
name="dialogSetBackup"
description="Alert dialog title for setting a backup account."
>Set backup account</string>
<string
name="dialogAddAccount"
description="Alert dialog option for adding an account."
>Add account</string>
<string
name="dialogShow"
description="Button text to display a dialog."
>SHOW DIALOG</string>
<string
name="dialogFullscreenTitle"
description="Title for full screen dialog demo."
>Full Screen Dialog</string>
<string
name="dialogFullscreenSave"
description="Save button for full screen dialog demo."
>SAVE</string>
<string
name="dialogFullscreenDescription"
description="Description for full screen dialog demo."
>A full screen dialog demo</string>
<string
name="cupertinoButton"
description="Button text for a generic iOS-style button."
>Button</string>
<string
name="cupertinoButtonWithBackground"
description="Button text for a iOS-style button with a filled background."
>With Background</string>
<string
name="cupertinoAlertCancel"
description="iOS-style alert cancel option."
>Cancel</string>
<string
name="cupertinoAlertDiscard"
description="iOS-style alert discard option."
>Discard</string>
<string
name="cupertinoAlertLocationTitle"
description="iOS-style alert title for location permission."
>Allow "Maps" to access your location while you are using the app?</string>
<string
name="cupertinoAlertLocationDescription"
description="iOS-style alert description for location permission."
>Your current location will be displayed on the map and used for directions, nearby search results, and estimated travel times.</string>
<string
name="cupertinoAlertAllow"
description="iOS-style alert allow option."
>Allow</string>
<string
name="cupertinoAlertDontAllow"
description="iOS-style alert don't allow option."
>Don't Allow</string>
<string
name="cupertinoAlertFavoriteDessert"
description="iOS-style alert title for selecting favorite dessert."
>Select Favorite Dessert</string>
<string
name="cupertinoAlertDessertDescription"
description="iOS-style alert description for selecting favorite dessert."
>Please select your favorite type of dessert from the list below. Your selection will be used to customize the suggested list of eateries in your area.</string>
<string
name="cupertinoAlertCheesecake"
description="iOS-style alert cheesecake option."
>Cheesecake</string>
<string
name="cupertinoAlertTiramisu"
description="iOS-style alert tiramisu option."
>Tiramisu</string>
<string
name="cupertinoAlertApplePie"
description="iOS-style alert apple pie option."
>Apple Pie</string>
<string
name="cupertinoAlertChocolateBrownie"
description="iOS-style alert chocolate brownie option."
>Chocolate Brownie</string>
<string
name="cupertinoShowAlert"
description="Button text to show iOS-style alert."
>Show Alert</string>
<string
name="colorsRed"
description="Tab title for the color red."
>RED</string>
<string
name="colorsPink"
description="Tab title for the color pink."
>PINK</string>
<string
name="colorsPurple"
description="Tab title for the color purple."
>PURPLE</string>
<string
name="colorsDeepPurple"
description="Tab title for the color deep purple."
>DEEP PURPLE</string>
<string
name="colorsIndigo"
description="Tab title for the color indigo."
>INDIGO</string>
<string
name="colorsBlue"
description="Tab title for the color blue."
>BLUE</string>
<string
name="colorsLightBlue"
description="Tab title for the color light blue."
>LIGHT BLUE</string>
<string
name="colorsCyan"
description="Tab title for the color cyan."
>CYAN</string>
<string
name="colorsTeal"
description="Tab title for the color teal."
>TEAL</string>
<string
name="colorsGreen"
description="Tab title for the color green."
>GREEN</string>
<string
name="colorsLightGreen"
description="Tab title for the color light green."
>LIGHT GREEN</string>
<string
name="colorsLime"
description="Tab title for the color lime."
>LIME</string>
<string
name="colorsYellow"
description="Tab title for the color yellow."
>YELLOW</string>
<string
name="colorsAmber"
description="Tab title for the color amber."
>AMBER</string>
<string
name="colorsOrange"
description="Tab title for the color orange."
>ORANGE</string>
<string
name="colorsDeepOrange"
description="Tab title for the color deep orange."
>DEEP ORANGE</string>
<string
name="colorsBrown"
description="Tab title for the color brown."
>BROWN</string>
<string
name="colorsGrey"
description="Tab title for the color grey."
>GREY</string>
<string
name="colorsBlueGrey"
description="Tab title for the color blue grey."
>BLUE GREY</string>
<string
name="placeChennai"
description="Title for Chennai location."
>Chennai</string>
<string
name="placeTanjore"
description="Title for Tanjore location."
>Tanjore</string>
<string
name="placeChettinad"
description="Title for Chettinad location."
>Chettinad</string>
<string
name="placePondicherry"
description="Title for Pondicherry location."
>Pondicherry</string>
<string
name="placeFlowerMarket"
description="Title for Flower Market location."
>Flower Market</string>
<string
name="placeBronzeWorks"
description="Title for Bronze Works location."
>Bronze Works</string>
<string
name="placeMarket"
description="Title for Market location."
>Market</string>
<string
name="placeThanjavurTemple"
description="Title for Thanjavur Temple location."
>Thanjavur Temple</string>
<string
name="placeSaltFarm"
description="Title for Salt Farm location."
>Salt Farm</string>
<string
name="placeScooters"
description="Title for image of people riding on scooters."
>Scooters</string>
<string
name="placeSilkMaker"
description="Title for an image of a silk maker."
>Silk Maker</string>
<string
name="placeLunchPrep"
description="Title for an image of preparing lunch."
>Lunch Prep</string>
<string
name="placeBeach"
description="Title for Beach location."
>Beach</string>
<string
name="placeFisherman"
description="Title for an image of a fisherman."
>Fisherman</string>
<string
name="starterAppTitle"
description="The title and name for the starter app."
>Starter app</string>
<string
name="starterAppDescription"
description="The description for the starter app."
>A responsive starter layout</string>
<string
name="starterAppGenericButton"
description="Generic placeholder for button."
>BUTTON</string>
<string
name="starterAppTooltipAdd"
description="Tooltip on add icon."
>Add</string>
<string
name="starterAppTooltipFavorite"
description="Tooltip on favorite icon."
>Favorite</string>
<string
name="starterAppTooltipShare"
description="Tooltip on share icon."
>Share</string>
<string
name="starterAppTooltipSearch"
description="Tooltip on search icon."
>Search</string>
<string
name="starterAppGenericTitle"
description="Generic placeholder for title in app bar."
>Title</string>
<string
name="starterAppGenericSubtitle"
description="Generic placeholder for subtitle in drawer."
>Subtitle</string>
<string
name="starterAppGenericHeadline"
description="Generic placeholder for headline in drawer."
>Headline</string>
<string
name="starterAppGenericBody"
description="Generic placeholder for body text in drawer."
>Body</string>
<string
name="starterAppDrawerItem"
description="Generic placeholder drawer item."
>Item {value}</string>
<string
name="shrineMenuCaption"
description="Caption for a menu page."
>MENU</string>
<string
name="shrineCategoryNameAll"
description="A tab showing products from all categories."
>ALL</string>
<string
name="shrineCategoryNameAccessories"
description="A category of products consisting of accessories (clothing items)."
>ACCESSORIES</string>
<string
name="shrineCategoryNameClothing"
description="A category of products consisting of clothing."
>CLOTHING</string>
<string
name="shrineCategoryNameHome"
description="A category of products consisting of items used at home."
>HOME</string>
<string
name="shrineLogoutButtonCaption"
description="Label for a logout button."
>LOGOUT</string>
<string
name="shrineLoginUsernameLabel"
description="On the login screen, a label for a textfield for the user to input their username."
>Username</string>
<string
name="shrineLoginPasswordLabel"
description="On the login screen, a label for a textfield for the user to input their password."
>Password</string>
<string
name="shrineCancelButtonCaption"
description="On the login screen, the caption for a button to cancel login."
>CANCEL</string>
<string
name="shrineNextButtonCaption"
description="On the login screen, the caption for a button to proceed login."
>NEXT</string>
<string
name="shrineCartPageCaption"
description="Caption for a shopping cart page."
>CART</string>
<string
name="shrineProductQuantity"
description="A text showing the number of items for a specific product."
>Quantity: {quantity}</string>
<string
name="shrineProductPrice"
description="A text showing the unit price of each product. Used as: 'Quantity: 3 x $129'. The currency will be handled by the formatter."
>x {price}</string>
<string
name="shrineCartItemCount"
description="A text showing the total number of items in the cart."
>{quantity, plural, =0{NO ITEMS} =1{1 ITEM} other{{quantity} ITEMS}}</string>
<string
name="shrineCartClearButtonCaption"
description="Caption for a button used to clear the cart."
>CLEAR CART</string>
<string
name="shrineCartTotalCaption"
description="Label for a text showing total price of the items in the cart."
>TOTAL</string>
<string
name="shrineCartSubtotalCaption"
description="Label for a text showing the subtotal price of the items in the cart (excluding shipping and tax)."
>Subtotal:</string>
<string
name="shrineCartShippingCaption"
description="Label for a text showing the shipping cost for the items in the cart."
>Shipping:</string>
<string
name="shrineCartTaxCaption"
description="Label for a text showing the tax for the items in the cart."
>Tax:</string>
<string
name="shrineProductVagabondSack"
description="Name of the product 'Vagabond sack'."
>Vagabond sack</string>
<string
name="shrineProductStellaSunglasses"
description="Name of the product 'Stella sunglasses'."
>Stella sunglasses</string>
<string
name="shrineProductWhitneyBelt"
description="Name of the product 'Whitney belt'."
>Whitney belt</string>
<string
name="shrineProductGardenStrand"
description="Name of the product 'Garden strand'."
>Garden strand</string>
<string
name="shrineProductStrutEarrings"
description="Name of the product 'Strut earrings'."
>Strut earrings</string>
<string
name="shrineProductVarsitySocks"
description="Name of the product 'Varsity socks'."
>Varsity socks</string>
<string
name="shrineProductWeaveKeyring"
description="Name of the product 'Weave keyring'."
>Weave keyring</string>
<string
name="shrineProductGatsbyHat"
description="Name of the product 'Gatsby hat'."
>Gatsby hat</string>
<string
name="shrineProductShrugBag"
description="Name of the product 'Shrug bag'."
>Shrug bag</string>
<string
name="shrineProductGiltDeskTrio"
description="Name of the product 'Gilt desk trio'."
>Gilt desk trio</string>
<string
name="shrineProductCopperWireRack"
description="Name of the product 'Copper wire rack'."
>Copper wire rack</string>
<string
name="shrineProductSootheCeramicSet"
description="Name of the product 'Soothe ceramic set'."
>Soothe ceramic set</string>
<string
name="shrineProductHurrahsTeaSet"
description="Name of the product 'Hurrahs tea set'."
>Hurrahs tea set</string>
<string
name="shrineProductBlueStoneMug"
description="Name of the product 'Blue stone mug'."
>Blue stone mug</string>
<string
name="shrineProductRainwaterTray"
description="Name of the product 'Rainwater tray'."
>Rainwater tray</string>
<string
name="shrineProductChambrayNapkins"
description="Name of the product 'Chambray napkins'."
>Chambray napkins</string>
<string
name="shrineProductSucculentPlanters"
description="Name of the product 'Succulent planters'."
>Succulent planters</string>
<string
name="shrineProductQuartetTable"
description="Name of the product 'Quartet table'."
>Quartet table</string>
<string
name="shrineProductKitchenQuattro"
description="Name of the product 'Kitchen quattro'."
>Kitchen quattro</string>
<string
name="shrineProductClaySweater"
description="Name of the product 'Clay sweater'."
>Clay sweater</string>
<string
name="shrineProductSeaTunic"
description="Name of the product 'Sea tunic'."
>Sea tunic</string>
<string
name="shrineProductPlasterTunic"
description="Name of the product 'Plaster tunic'."
>Plaster tunic</string>
<string
name="shrineProductWhitePinstripeShirt"
description="Name of the product 'White pinstripe shirt'."
>White pinstripe shirt</string>
<string
name="shrineProductChambrayShirt"
description="Name of the product 'Chambray shirt'."
>Chambray shirt</string>
<string
name="shrineProductSeabreezeSweater"
description="Name of the product 'Seabreeze sweater'."
>Seabreeze sweater</string>
<string
name="shrineProductGentryJacket"
description="Name of the product 'Gentry jacket'."
>Gentry jacket</string>
<string
name="shrineProductNavyTrousers"
description="Name of the product 'Navy trousers'."
>Navy trousers</string>
<string
name="shrineProductWalterHenleyWhite"
description="Name of the product 'Walter henley (white)'."
>Walter henley (white)</string>
<string
name="shrineProductSurfAndPerfShirt"
description="Name of the product 'Surf and perf shirt'."
>Surf and perf shirt</string>
<string
name="shrineProductGingerScarf"
description="Name of the product 'Ginger scarf'."
>Ginger scarf</string>
<string
name="shrineProductRamonaCrossover"
description="Name of the product 'Ramona crossover'."
>Ramona crossover</string>
<string
name="shrineProductClassicWhiteCollar"
description="Name of the product 'Classic white collar'."
>Classic white collar</string>
<string
name="shrineProductCeriseScallopTee"
description="Name of the product 'Cerise scallop tee'."
>Cerise scallop tee</string>
<string
name="shrineProductShoulderRollsTee"
description="Name of the product 'Shoulder rolls tee'."
>Shoulder rolls tee</string>
<string
name="shrineProductGreySlouchTank"
description="Name of the product 'Grey slouch tank'."
>Grey slouch tank</string>
<string
name="shrineProductSunshirtDress"
description="Name of the product 'Sunshirt dress'."
>Sunshirt dress</string>
<string
name="shrineProductFineLinesTee"
description="Name of the product 'Fine lines tee'."
>Fine lines tee</string>
<string
name="shrineTooltipSearch"
description="The tooltip text for a search button. Also used as a semantic label, used by screen readers, such as TalkBack and VoiceOver."
>Search</string>
<string
name="shrineTooltipSettings"
description="The tooltip text for a settings button. Also used as a semantic label, used by screen readers, such as TalkBack and VoiceOver."
>Settings</string>
<string
name="shrineTooltipOpenMenu"
description="The tooltip text for a menu button. Also used as a semantic label, used by screen readers, such as TalkBack and VoiceOver."
>Open menu</string>
<string
name="shrineTooltipCloseMenu"
description="The tooltip text for a button to close a menu. Also used as a semantic label, used by screen readers, such as TalkBack and VoiceOver."
>Close menu</string>
<string
name="shrineTooltipCloseCart"
description="The tooltip text for a button to close the shopping cart page. Also used as a semantic label, used by screen readers, such as TalkBack and VoiceOver."
>Close cart</string>
<string
name="shrineScreenReaderCart"
description="The description of a shopping cart button containing some products. Used by screen readers, such as TalkBack and VoiceOver."
>{quantity, plural, =0{Shopping cart, no items} =1{Shopping cart, 1 item} other{Shopping cart, {quantity} items}}</string>
<string
name="shrineScreenReaderProductAddToCart"
description="An announcement made by screen readers, such as TalkBack and VoiceOver to indicate the action of a button for adding a product to the cart."
>Add to cart</string>
<string
name="shrineScreenReaderRemoveProductButton"
description="A tooltip for a button to remove a product. This will be read by screen readers, such as TalkBack and VoiceOver when a product is added to the shopping cart."
>Remove {product}</string>
<string
name="shrineTooltipRemoveItem"
description="The tooltip text for a button to remove an item (a product) in a shopping cart. Also used as a semantic label, used by screen readers, such as TalkBack and VoiceOver."
>Remove item</string>
<string
name="craneFormDiners"
description="Form field label to enter the number of diners."
>Diners</string>
<string
name="craneFormDate"
description="Form field label to select a date."
>Select Date</string>
<string
name="craneFormTime"
description="Form field label to select a time."
>Select Time</string>
<string
name="craneFormLocation"
description="Form field label to select a location."
>Select Location</string>
<string
name="craneFormTravelers"
description="Form field label to select the number of travellers."
>Travelers</string>
<string
name="craneFormOrigin"
description="Form field label to choose a travel origin."
>Choose Origin</string>
<string
name="craneFormDestination"
description="Form field label to choose a travel destination."
>Choose Destination</string>
<string
name="craneFormDates"
description="Form field label to select multiple dates."
>Select Dates</string>
<string
name="craneHours"
description="Generic text for an amount of hours, abbreviated to the shortest form. For example 1h. {hours} should remain untranslated."
>{hours, plural, =1{1h} other{{hours}h}}</string>
<string
name="craneMinutes"
description="Generic text for an amount of minutes, abbreviated to the shortest form. For example 15m. {minutes} should remain untranslated."
>{minutes, plural, =1{1m} other{{minutes}m}}</string>
<string
name="craneFlightDuration"
description="A pattern to define the layout of a flight duration string. For example in English one might say 1h 15m. Translation should only rearrange the inputs. {hoursShortForm} would for example be replaced by 1h, already translated to the given locale. {minutesShortForm} would for example be replaced by 15m, already translated to the given locale."
>{hoursShortForm} {minutesShortForm}</string>
<string
name="craneFly"
description="Title for FLY tab."
>FLY</string>
<string
name="craneSleep"
description="Title for SLEEP tab."
>SLEEP</string>
<string
name="craneEat"
description="Title for EAT tab."
>EAT</string>
<string
name="craneFlySubhead"
description="Subhead for FLY tab."
>Explore Flights by Destination</string>
<string
name="craneSleepSubhead"
description="Subhead for SLEEP tab."
>Explore Properties by Destination</string>
<string
name="craneEatSubhead"
description="Subhead for EAT tab."
>Explore Restaurants by Destination</string>
<string
name="craneFlyStops"
description="Label indicating if a flight is nonstop or how many layovers it includes."
>{numberOfStops, plural, =0{Nonstop} =1{1 stop} other{{numberOfStops} stops}}</string>
<string
name="craneSleepProperties"
description="Text indicating the number of available properties (temporary rentals). Always plural."
>{totalProperties, plural, =0{No Available Properties} =1{1 Available Properties} other{{totalProperties} Available Properties}}</string>
<string
name="craneEatRestaurants"
description="Text indicating the number of restaurants. Always plural."
>{totalRestaurants, plural, =0{No Restaurants} =1{1 Restaurant} other{{totalRestaurants} Restaurants}}</string>
<string
name="craneFly0"
description="Label for city."
>Aspen, United States</string>
<string
name="craneFly1"
description="Label for city."
>Big Sur, United States</string>
<string
name="craneFly2"
description="Label for city."
>Khumbu Valley, Nepal</string>
<string
name="craneFly3"
description="Label for city."
>Machu Picchu, Peru</string>
<string
name="craneFly4"
description="Label for city."
>Malé, Maldives</string>
<string
name="craneFly5"
description="Label for city."
>Vitznau, Switzerland</string>
<string
name="craneFly6"
description="Label for city."
>Mexico City, Mexico</string>
<string
name="craneFly7"
description="Label for city."
>Mount Rushmore, United States</string>
<string
name="craneFly8"
description="Label for city."
>Singapore</string>
<string
name="craneFly9"
description="Label for city."
>Havana, Cuba</string>
<string
name="craneFly10"
description="Label for city."
>Cairo, Egypt</string>
<string
name="craneFly11"
description="Label for city."
>Lisbon, Portugal</string>
<string
name="craneFly12"
description="Label for city."
>Napa, United States</string>
<string
name="craneFly13"
description="Label for city."
>Bali, Indonesia</string>
<string
name="craneSleep0"
description="Label for city."
>Malé, Maldives</string>
<string
name="craneSleep1"
description="Label for city."
>Aspen, United States</string>
<string
name="craneSleep2"
description="Label for city."
>Machu Picchu, Peru</string>
<string
name="craneSleep3"
description="Label for city."
>Havana, Cuba</string>
<string
name="craneSleep4"
description="Label for city."
>Vitznau, Switzerland</string>
<string
name="craneSleep5"
description="Label for city."
>Big Sur, United States</string>
<string
name="craneSleep6"
description="Label for city."
>Napa, United States</string>
<string
name="craneSleep7"
description="Label for city."
>Porto, Portugal</string>
<string
name="craneSleep8"
description="Label for city."
>Tulum, Mexico</string>
<string
name="craneSleep9"
description="Label for city."
>Lisbon, Portugal</string>
<string
name="craneSleep10"
description="Label for city."
>Cairo, Egypt</string>
<string
name="craneSleep11"
description="Label for city."
>Taipei, Taiwan</string>
<string
name="craneEat0"
description="Label for city."
>Naples, Italy</string>
<string
name="craneEat1"
description="Label for city."
>Dallas, United States</string>
<string
name="craneEat2"
description="Label for city."
>Córdoba, Argentina</string>
<string
name="craneEat3"
description="Label for city."
>Portland, United States</string>
<string
name="craneEat4"
description="Label for city."
>Paris, France</string>
<string
name="craneEat5"
description="Label for city."
>Seoul, South Korea</string>
<string
name="craneEat6"
description="Label for city."
>Seattle, United States</string>
<string
name="craneEat7"
description="Label for city."
>Nashville, United States</string>
<string
name="craneEat8"
description="Label for city."
>Atlanta, United States</string>
<string
name="craneEat9"
description="Label for city."
>Madrid, Spain</string>
<string
name="craneEat10"
description="Label for city."
>Lisbon, Portugal</string>
<string
name="craneFly0SemanticLabel"
description="Semantic label for an image."
>Chalet in a snowy landscape with evergreen trees</string>
<string
name="craneFly1SemanticLabel"
description="Semantic label for an image."
>Tent in a field</string>
<string
name="craneFly2SemanticLabel"
description="Semantic label for an image."
>Prayer flags in front of snowy mountain</string>
<string
name="craneFly3SemanticLabel"
description="Semantic label for an image."
>Machu Picchu citadel</string>
<string
name="craneFly4SemanticLabel"
description="Semantic label for an image."
>Overwater bungalows</string>
<string
name="craneFly5SemanticLabel"
description="Semantic label for an image."
>Lake-side hotel in front of mountains</string>
<string
name="craneFly6SemanticLabel"
description="Semantic label for an image."
>Aerial view of Palacio de Bellas Artes</string>
<string
name="craneFly7SemanticLabel"
description="Semantic label for an image."
>Mount Rushmore</string>
<string
name="craneFly8SemanticLabel"
description="Semantic label for an image."
>Supertree Grove</string>
<string
name="craneFly9SemanticLabel"
description="Semantic label for an image."
>Man leaning on an antique blue car</string>
<string
name="craneFly10SemanticLabel"
description="Semantic label for an image."
>Al-Azhar Mosque towers during sunset</string>
<string
name="craneFly11SemanticLabel"
description="Semantic label for an image."
>Brick lighthouse at sea</string>
<string
name="craneFly12SemanticLabel"
description="Semantic label for an image."
>Pool with palm trees</string>
<string
name="craneFly13SemanticLabel"
description="Semantic label for an image."
>Sea-side pool with palm trees</string>
<string
name="craneSleep0SemanticLabel"
description="Semantic label for an image."
>Overwater bungalows</string>
<string
name="craneSleep1SemanticLabel"
description="Semantic label for an image."
>Chalet in a snowy landscape with evergreen trees</string>
<string
name="craneSleep2SemanticLabel"
description="Semantic label for an image."
>Machu Picchu citadel</string>
<string
name="craneSleep3SemanticLabel"
description="Semantic label for an image."
>Man leaning on an antique blue car</string>
<string
name="craneSleep4SemanticLabel"
description="Semantic label for an image."
>Lake-side hotel in front of mountains</string>
<string
name="craneSleep5SemanticLabel"
description="Semantic label for an image."
>Tent in a field</string>
<string
name="craneSleep6SemanticLabel"
description="Semantic label for an image."
>Pool with palm trees</string>
<string
name="craneSleep7SemanticLabel"
description="Semantic label for an image."
>Colorful apartments at Riberia Square</string>
<string
name="craneSleep8SemanticLabel"
description="Semantic label for an image."
>Mayan ruins on a cliff above a beach</string>
<string
name="craneSleep9SemanticLabel"
description="Semantic label for an image."
>Brick lighthouse at sea</string>
<string
name="craneSleep10SemanticLabel"
description="Semantic label for an image."
>Al-Azhar Mosque towers during sunset</string>
<string
name="craneSleep11SemanticLabel"
description="Semantic label for an image."
>Taipei 101 skyscraper</string>
<string
name="craneEat0SemanticLabel"
description="Semantic label for an image."
>Pizza in a wood-fired oven</string>
<string
name="craneEat1SemanticLabel"
description="Semantic label for an image."
>Empty bar with diner-style stools</string>
<string
name="craneEat2SemanticLabel"
description="Semantic label for an image."
>Burger</string>
<string
name="craneEat3SemanticLabel"
description="Semantic label for an image."
>Korean taco</string>
<string
name="craneEat4SemanticLabel"
description="Semantic label for an image."
>Chocolate dessert</string>
<string
name="craneEat5SemanticLabel"
description="Semantic label for an image."
>Artsy restaurant seating area</string>
<string
name="craneEat6SemanticLabel"
description="Semantic label for an image."
>Shrimp dish</string>
<string
name="craneEat7SemanticLabel"
description="Semantic label for an image."
>Bakery entrance</string>
<string
name="craneEat8SemanticLabel"
description="Semantic label for an image."
>Plate of crawfish</string>
<string
name="craneEat9SemanticLabel"
description="Semantic label for an image."
>Cafe counter with pastries</string>
<string
name="craneEat10SemanticLabel"
description="Semantic label for an image."
>Woman holding huge pastrami sandwich</string>
<string
name="fortnightlyMenuFrontPage"
description="Menu item for the front page of the news app."
>Front Page</string>
<string
name="fortnightlyMenuWorld"
description="Menu item for the world news section of the news app."
>World</string>
<string
name="fortnightlyMenuUS"
description="Menu item for the United States news section of the news app."
>US</string>
<string
name="fortnightlyMenuPolitics"
description="Menu item for the political news section of the news app."
>Politics</string>
<string
name="fortnightlyMenuBusiness"
description="Menu item for the business news section of the news app."
>Business</string>
<string
name="fortnightlyMenuTech"
description="Menu item for the tech news section of the news app."
>Tech</string>
<string
name="fortnightlyMenuScience"
description="Menu item for the science news section of the news app."
>Science</string>
<string
name="fortnightlyMenuSports"
description="Menu item for the sports news section of the news app."
>Sports</string>
<string
name="fortnightlyMenuTravel"
description="Menu item for the travel news section of the news app."
>Travel</string>
<string
name="fortnightlyMenuCulture"
description="Menu item for the culture news section of the news app."
>Culture</string>
<string
name="fortnightlyTrendingTechDesign"
description="Hashtag for the tech design trending topic of the news app."
>TechDesign</string>
<string
name="fortnightlyTrendingReform"
description="Hashtag for the reform trending topic of the news app."
>Reform</string>
<string
name="fortnightlyTrendingHealthcareRevolution"
description="Hashtag for the healthcare revolution trending topic of the news app."
>HealthcareRevolution</string>
<string
name="fortnightlyTrendingGreenArmy"
description="Hashtag for the green army trending topic of the news app."
>GreenArmy</string>
<string
name="fortnightlyTrendingStocks"
description="Hashtag for the stocks trending topic of the news app."
>Stocks</string>
<string
name="fortnightlyLatestUpdates"
description="Title for news section regarding the latest updates."
>Latest Updates</string>
<string
name="fortnightlyHeadlineHealthcare"
description="Headline for a news article about healthcare."
>The Quiet, Yet Powerful Healthcare Revolution</string>
<string
name="fortnightlyHeadlineWar"
description="Headline for a news article about war."
>Divided American Lives During War</string>
<string
name="fortnightlyHeadlineGasoline"
description="Headline for a news article about gasoline."
>The Future of Gasoline</string>
<string
name="fortnightlyHeadlineArmy"
description="Headline for a news article about the green army."
>Reforming The Green Army From Within</string>
<string
name="fortnightlyHeadlineStocks"
description="Headline for a news article about stocks."
>As Stocks Stagnate, Many Look To Currency</string>
<string
name="fortnightlyHeadlineFabrics"
description="Headline for a news article about fabric."
>Designers Use Tech To Make Futuristic Fabrics</string>
<string
name="fortnightlyHeadlineFeminists"
description="Headline for a news article about feminists and partisanship."
>Feminists Take On Partisanship</string>
<string
name="fortnightlyHeadlineBees"
description="Headline for a news article about bees."
>Farmland Bees In Short Supply</string>
<string
name="replyInboxLabel"
description="Text label for Inbox destination."
>Inbox</string>
<string
name="replyStarredLabel"
description="Text label for Starred destination."
>Starred</string>
<string
name="replySentLabel"
description="Text label for Sent destination."
>Sent</string>
<string
name="replyTrashLabel"
description="Text label for Trash destination."
>Trash</string>
<string
name="replySpamLabel"
description="Text label for Spam destination."
>Spam</string>
<string
name="replyDraftsLabel"
description="Text label for Drafts destination."
>Drafts</string>
<string
name="demoTwoPaneFoldableLabel"
description="Option title for TwoPane demo on foldable devices."
>Foldable</string>
<string
name="demoTwoPaneFoldableDescription"
description="Description for the foldable option configuration on the TwoPane demo."
>This is how TwoPane behaves on a foldable device.</string>
<string
name="demoTwoPaneSmallScreenLabel"
description="Option title for TwoPane demo in small screen mode. Counterpart of the foldable option."
>Small Screen</string>
<string
name="demoTwoPaneSmallScreenDescription"
description="Description for the small screen option configuration on the TwoPane demo."
>This is how TwoPane behaves on a small screen device.</string>
<string
name="demoTwoPaneTabletLabel"
description="Option title for TwoPane demo in tablet or desktop mode."
>Tablet / Desktop</string>
<string
name="demoTwoPaneTabletDescription"
description="Description for the tablet / desktop option configuration on the TwoPane demo."
>This is how TwoPane behaves on a larger screen like a tablet or desktop.</string>
<string
name="demoTwoPaneTitle"
description="Title for the TwoPane widget demo."
>TwoPane</string>
<string
name="demoTwoPaneSubtitle"
description="Subtitle for the TwoPane widget demo."
>Responsive layouts on foldable, large, and small screens</string>
<string
name="splashSelectDemo"
description="Tip for user, visible on the right side of the splash screen when Gallery runs on a foldable device."
>Select a demo</string>
<string
name="demoTwoPaneList"
description="Title of one of the panes in the TwoPane demo. It sits on top of a list of items."
>List</string>
<string
name="demoTwoPaneDetails"
description="Title of one of the panes in the TwoPane demo, which shows details of the currently selected item."
>Details</string>
<string
name="demoTwoPaneSelectItem"
description="Tip for user, visible on the right side of the TwoPane widget demo in the foldable configuration."
>Select an item</string>
<string
name="demoTwoPaneItem"
description="Generic item placeholder visible in the TwoPane widget demo."
>Item {value}</string>
<string
name="demoTwoPaneItemDetails"
description="Generic item description or details visible in the TwoPane widget demo."
>Item {value} details</string>
</resources>
| gallery/lib/l10n/intl_en_US.xml/0 | {
"file_path": "gallery/lib/l10n/intl_en_US.xml",
"repo_id": "gallery",
"token_count": 38649
} | 867 |
{
"loading": "Wird geladen",
"deselect": "Auswahl aufheben",
"select": "Auswählen",
"selectable": "Auswählbar (lange drücken)",
"selected": "Ausgewählt",
"demo": "Demo",
"bottomAppBar": "Untere App-Leiste",
"notSelected": "Nicht ausgewählt",
"demoCupertinoSearchTextFieldTitle": "Feld für den Suchtext",
"demoCupertinoPicker": "Auswahlelement",
"demoCupertinoSearchTextFieldSubtitle": "Feld für den Suchtext im Stil von iOS",
"demoCupertinoSearchTextFieldDescription": "Ein Feld für den Suchfeld, über das der Nutzer Text eingeben kann und in dem Vorschläge angeboten und gefiltert werden können.",
"demoCupertinoSearchTextFieldPlaceholder": "Text eingeben",
"demoCupertinoScrollbarTitle": "Bildlaufleiste",
"demoCupertinoScrollbarSubtitle": "Bildlaufleiste im Stil von iOS",
"demoCupertinoScrollbarDescription": "Eine Bildlaufleiste, mit der das angegebene untergeordnete Element zusammengefasst wird",
"demoTwoPaneItem": "Element {value}",
"demoTwoPaneList": "Liste",
"demoTwoPaneFoldableLabel": "Faltbares Smartphone/Tablet",
"demoTwoPaneSmallScreenLabel": "Kleiner Bildschirm",
"demoTwoPaneSmallScreenDescription": "So verhält sich TwoPane auf Geräten mit kleinem Bildschirm.",
"demoTwoPaneTabletLabel": "Tablet/Desktop",
"demoTwoPaneTabletDescription": "So verhält sich TwoPane auf Geräten mit größerem Bildschirm, zum Beispiel Tablets oder Computern.",
"demoTwoPaneTitle": "TwoPane",
"demoTwoPaneSubtitle": "Responsive Layouts auf faltbaren, großen und kleinen Bildschirmen",
"splashSelectDemo": "Demo auswählen",
"demoTwoPaneFoldableDescription": "So verhält sich TwoPane auf faltbaren Geräten.",
"demoTwoPaneDetails": "Details",
"demoTwoPaneSelectItem": "Element auswählen",
"demoTwoPaneItemDetails": "Details zum Element {value}",
"demoCupertinoContextMenuActionText": "Halte das Flutter-Logo gedrückt, um das Kontextmenü aufzurufen.",
"demoCupertinoContextMenuDescription": "Ein Vollbild-Kontextmenü im Stil von iOS, das erscheint, wenn ein Element lange gedrückt wird.",
"demoAppBarTitle": "App-Leiste",
"demoAppBarDescription": "Die App-Leiste zeigt Inhalte und Aktionen für den aktuellen Bildschirm an. Sie kann für Branding, Bildschirmtitel, die Navigation und Aktionen verwendet werden.",
"demoDividerTitle": "Trennlinie",
"demoDividerSubtitle": "Eine dünne Linie, die Gruppen von Inhalten in Listen und Layouts voneinander trennt.",
"demoDividerDescription": "Trennlinien können in Listen, Leisten und an anderen Stellen verwendet werden, um Inhalte zu trennen.",
"demoVerticalDividerTitle": "Vertikale Trennlinie",
"demoCupertinoContextMenuTitle": "Kontextmenü",
"demoCupertinoContextMenuSubtitle": "Kontextmenü im Stil von iOS",
"demoAppBarSubtitle": "Zeigt Informationen und Aktionen zum aktuellen Bildschirm an",
"demoCupertinoContextMenuActionOne": "Erste Aktion",
"demoCupertinoContextMenuActionTwo": "Zweite Aktion",
"demoDateRangePickerDescription": "Zeigt ein Dialogfeld mit einem Material Design-Element zur Zeitraumauswahl an.",
"demoDateRangePickerTitle": "Zeitraumauswahl",
"demoNavigationDrawerUserName": "Nutzername",
"demoNavigationDrawerUserEmail": "[email protected]",
"demoNavigationDrawerText": "Wische zum Einblenden der Leiste vom Rand nach innen oder tippe auf das Symbol links oben",
"demoNavigationRailTitle": "Navigationsstreifen",
"demoNavigationRailSubtitle": "Navigationsstreifen in einer App anzeigen",
"demoNavigationRailDescription": "Ein Widget im Material Design, das links oder rechts in einer App angezeigt werden soll und dem Nutzer ermöglicht, zwischen einer überschaubaren Zahl an Ansichten, in der Regel 3 bis 5, zu wechseln.",
"demoNavigationRailFirst": "Erste Seite",
"demoNavigationDrawerTitle": "Navigationsleiste",
"demoNavigationRailThird": "Dritte Seite",
"replyStarredLabel": "Markiert",
"demoTextButtonDescription": "Eine Textschaltfläche, die beim Drücken eine Farbreaktion zeigt, aber nicht erhöht dargestellt wird. Du kannst Textschaltflächen auf Symbolleisten, in Dialogfeldern und inline mit Abständen verwenden.",
"demoElevatedButtonTitle": "Erhöhte Schaltfläche",
"demoElevatedButtonDescription": "Erhöhte Schaltflächen verleihen flachen Layouts mehr Dimension. Sie können verwendet werden, um Funktionen auf überladenen oder leeren Flächen hervorzuheben.",
"demoOutlinedButtonTitle": "Schaltflächen mit Umriss",
"demoOutlinedButtonDescription": "Schaltflächen mit Umriss werden undurchsichtig und erhöht dargestellt, wenn sie gedrückt werden. Sie werden häufig mit erhöhten Schaltflächen kombiniert, um eine alternative oder sekundäre Aktion zu kennzeichnen.",
"demoContainerTransformDemoInstructions": "Karten, Listen & UAS",
"demoNavigationDrawerSubtitle": "Leiste auf einer App-Leiste anzeigen",
"replyDescription": "Eine effiziente, funktionale E-Mail-App",
"demoNavigationDrawerDescription": "Ein Steuerfeld im Material Design, das sich quer vom Rand des Bildschirms nach innen bewegt und Navigationslinks in einer App anzeigt.",
"replyDraftsLabel": "Entwürfe",
"demoNavigationDrawerToPageOne": "Erstes Element",
"replyInboxLabel": "Posteingang",
"demoSharedXAxisDemoInstructions": "Schaltflächen „Weiter“ und „Zurück“",
"replySpamLabel": "Spam",
"replyTrashLabel": "Papierkorb",
"replySentLabel": "Gesendet",
"demoNavigationRailSecond": "Zweite Seite",
"demoNavigationDrawerToPageTwo": "Zweites Element",
"demoFadeScaleDemoInstructions": "Modal und UAS",
"demoFadeThroughDemoInstructions": "Navigation am unteren Rand",
"demoSharedZAxisDemoInstructions": "Symbolschaltfläche „Einstellungen“",
"demoSharedYAxisDemoInstructions": "Sortieren nach „Vor Kurzem angehört“",
"demoTextButtonTitle": "Textschaltfläche",
"demoSharedZAxisBeefSandwichRecipeTitle": "Rindfleisch-Sandwich",
"demoSharedZAxisDessertRecipeDescription": "Rezept für Desserts",
"demoSharedYAxisAlbumTileSubtitle": "Interpret",
"demoSharedYAxisAlbumTileTitle": "Album",
"demoSharedYAxisRecentSortTitle": "Vor Kurzem angehört",
"demoSharedYAxisAlphabeticalSortTitle": "A–Z",
"demoSharedYAxisAlbumCount": "268 Alben",
"demoSharedYAxisTitle": "Gemeinsame Y-Achse",
"demoSharedXAxisCreateAccountButtonText": "KONTO ERSTELLEN",
"demoFadeScaleAlertDialogDiscardButton": "VERWERFEN",
"demoSharedXAxisSignInTextFieldLabel": "E-Mail-Adresse oder Telefonnummer",
"demoSharedXAxisSignInSubtitleText": "melde dich mit deinem Konto an",
"demoSharedXAxisSignInWelcomeText": "Hallo David Park,",
"demoSharedXAxisIndividualCourseSubtitle": "Einzeln angezeigt",
"demoSharedXAxisBundledCourseSubtitle": "Gruppiert",
"demoFadeThroughAlbumsDestination": "Alben",
"demoSharedXAxisDesignCourseTitle": "Design",
"demoSharedXAxisIllustrationCourseTitle": "Illustration",
"demoSharedXAxisBusinessCourseTitle": "Wirtschaft",
"demoSharedXAxisArtsAndCraftsCourseTitle": "Kunst & Handwerk",
"demoMotionPlaceholderSubtitle": "Text für den Untertitel",
"demoFadeScaleAlertDialogCancelButton": "ABBRECHEN",
"demoFadeScaleAlertDialogHeader": "Dialogfeld einer Benachrichtigung",
"demoFadeScaleHideFabButton": "UAS AUSBLENDEN",
"demoFadeScaleShowFabButton": "UAS EINBLENDEN",
"demoFadeScaleShowAlertDialogButton": "DIALOGFELD ANZEIGEN",
"demoFadeScaleDescription": "Das Muster \"Überblenden\" wird für UI-Elemente verwendet, die innerhalb der Bildschirmgrenzen ein- oder ausgeblendet werden, z. B. ein Dialogfeld, das in der Bildschirmmitte ausgeblendet wird.",
"demoFadeScaleTitle": "Überblenden",
"demoFadeThroughTextPlaceholder": "123 Fotos",
"demoFadeThroughSearchDestination": "Suche",
"demoFadeThroughPhotosDestination": "Fotos",
"demoSharedXAxisCoursePageSubtitle": "Gruppierte Kategorien werden in deinem Feed zusammen angezeigt. Diese Einstellung kannst du später jederzeit ändern.",
"demoFadeThroughDescription": "Das Muster \"Durchblenden\" wird für Übergänge zwischen UI-Elementen verwendet, zwischen denen keine starke Verbindung besteht.",
"demoFadeThroughTitle": "Durchblenden",
"demoSharedZAxisHelpSettingLabel": "Hilfe",
"demoMotionSubtitle": "Alle vordefinierten Übergangsmuster",
"demoSharedZAxisNotificationSettingLabel": "Benachrichtigungen",
"demoSharedZAxisProfileSettingLabel": "Profil",
"demoSharedZAxisSavedRecipesListTitle": "Gespeicherte Rezepte",
"demoSharedZAxisBeefSandwichRecipeDescription": "Rezept für Rindfleisch-Sandwiches",
"demoSharedZAxisCrabPlateRecipeDescription": "Rezept für Krebsgerichte",
"demoSharedXAxisCoursePageTitle": "Kurse optimieren",
"demoSharedZAxisCrabPlateRecipeTitle": "Krebs",
"demoSharedZAxisShrimpPlateRecipeDescription": "Rezept für Garnelengerichte",
"demoSharedZAxisShrimpPlateRecipeTitle": "Garnelen",
"demoContainerTransformTypeFadeThrough": "DURCHBLENDEN",
"demoSharedZAxisDessertRecipeTitle": "Dessert",
"demoSharedZAxisSandwichRecipeDescription": "Rezept für Sandwiches",
"demoSharedZAxisSandwichRecipeTitle": "Sandwich",
"demoSharedZAxisBurgerRecipeDescription": "Rezept für Hamburger",
"demoSharedZAxisBurgerRecipeTitle": "Hamburger",
"demoSharedZAxisSettingsPageTitle": "Einstellungen",
"demoSharedZAxisTitle": "Gemeinsame Z-Achse",
"demoSharedZAxisPrivacySettingLabel": "Datenschutz",
"demoMotionTitle": "Motion",
"demoContainerTransformTitle": "Container-Übergangsmuster",
"demoContainerTransformDescription": "Das Container-Übergangsmuster wurde für Übergänge zwischen UI-Elementen konzipiert, die einen Container enthalten. Dieses Muster erzeugt eine sichtbare Verbindung zwischen zwei UI-Elementen.",
"demoContainerTransformModalBottomSheetTitle": "Überblendemodus",
"demoContainerTransformTypeFade": "ÜBERBLENDEN",
"demoSharedYAxisAlbumTileDurationUnit": "Min.",
"demoMotionPlaceholderTitle": "Titel",
"demoSharedXAxisForgotEmailButtonText": "E-MAIL-ADRESSE VERGESSEN?",
"demoMotionSmallPlaceholderSubtitle": "Untertitel",
"demoMotionDetailsPageTitle": "Detailseite",
"demoMotionListTileTitle": "Listeneintrag",
"demoSharedAxisDescription": "Das Muster \"Gemeinsame Achse\" wird für Übergänge zwischen UI-Elementen verwendet, die räumlich oder navigatorisch zueinander in einer Beziehung stehen. Dieses Muster verwendet gemeinsame Übergänge auf der X-, Y- oder Z-Achse, um den Zusammenhang der Elemente zu verstärken.",
"demoSharedXAxisTitle": "Gemeinsame X-Achse",
"demoSharedXAxisBackButtonText": "ZURÜCK",
"demoSharedXAxisNextButtonText": "WEITER",
"demoSharedXAxisCulinaryCourseTitle": "Kochkunst",
"githubRepo": "{repoName} GitHub-Repository",
"fortnightlyMenuUS": "USA",
"fortnightlyMenuBusiness": "Wirtschaft",
"fortnightlyMenuScience": "Wissenschaft",
"fortnightlyMenuSports": "Sport",
"fortnightlyMenuTravel": "Reisen",
"fortnightlyMenuCulture": "Kultur",
"fortnightlyTrendingTechDesign": "Technologiedesign",
"rallyBudgetDetailAmountLeft": "Verbleibender Betrag",
"fortnightlyHeadlineArmy": "Die Grüne Armee und ihre Reformierung von innen",
"fortnightlyDescription": "Eine News-App mit hoher inhaltlicher Qualität",
"rallyBillDetailAmountDue": "Fälliger Betrag",
"rallyBudgetDetailTotalCap": "Limit Gesamtbudget",
"rallyBudgetDetailAmountUsed": "Verbrauchter Betrag",
"fortnightlyTrendingHealthcareRevolution": "Revolution_im_Gesundheitswesen",
"fortnightlyMenuFrontPage": "Titelseite",
"fortnightlyMenuWorld": "Welt",
"rallyBillDetailAmountPaid": "Gezahlter Betrag",
"fortnightlyMenuPolitics": "Politik",
"fortnightlyHeadlineBees": "Bienen auf dem Land in Gefahr",
"fortnightlyHeadlineGasoline": "Die Zukunft des Benzins",
"fortnightlyTrendingGreenArmy": "Grüne_Armee",
"fortnightlyHeadlineFeminists": "Feministinnen bekämpfen Vetternwirtschaft",
"fortnightlyHeadlineFabrics": "Designer nutzen Technologie zur Entwicklung futuristischer Stoffe",
"fortnightlyHeadlineStocks": "Wenn Aktienkurse stagnieren, richtet sich der Blick auf die Währung",
"fortnightlyTrendingReform": "Reformierung",
"fortnightlyMenuTech": "Technologie",
"fortnightlyHeadlineWar": "Amerikanische Trennungsschicksale während des Krieges",
"fortnightlyHeadlineHealthcare": "Die stille, aber wirkungsvolle Revolution im Gesundheitswesen",
"fortnightlyLatestUpdates": "Aktuelles",
"fortnightlyTrendingStocks": "Aktien",
"rallyBillDetailTotalAmount": "Gesamtbetrag",
"demoCupertinoPickerDateTime": "Datum und Uhrzeit",
"signIn": "ANMELDEN",
"dataTableRowWithSugar": "{value} mit Zucker",
"dataTableRowApplePie": "Apfelkuchen",
"dataTableRowDonut": "Donut",
"dataTableRowHoneycomb": "Honeycomb",
"dataTableRowLollipop": "Lutscher",
"dataTableRowJellyBean": "Jelly Bean",
"dataTableRowGingerbread": "Lebkuchen",
"dataTableRowCupcake": "Cupcake",
"dataTableRowEclair": "Eclair",
"dataTableRowIceCreamSandwich": "Ice Cream Sandwich",
"dataTableRowFrozenYogurt": "Frozen Yogurt",
"dataTableColumnIron": "Eisen ( %)",
"dataTableColumnCalcium": "Kalzium ( %)",
"dataTableColumnSodium": "Natrium ( mg)",
"demoTimePickerTitle": "Element zur Uhrzeitauswahl",
"demo2dTransformationsResetTooltip": "Transformationen zurücksetzen",
"dataTableColumnFat": "Fett ( g)",
"dataTableColumnCalories": "Kalorien",
"dataTableColumnDessert": "Nachtisch (1 Portion)",
"cardsDemoTravelDestinationLocation1": "Thanjavur, Tamil Nadu",
"demoTimePickerDescription": "Zeigt ein Dialogfeld mit einem Material Design-Element zur Uhrzeitauswahl an.",
"demoPickersShowPicker": "AUSWAHLELEMENT ANZEIGEN",
"demoTabsScrollingTitle": "Tableiste zum Scrollen",
"demoTabsNonScrollingTitle": "Tableiste ohne Scrollen",
"craneHours": "{hours,plural,=1{1 Std.}other{{hours} Std.}}",
"craneMinutes": "{minutes,plural,=1{1 Min.}other{{minutes} Min.}}",
"craneFlightDuration": "{hoursShortForm} {minutesShortForm}",
"dataTableHeader": "Ernährung",
"demoDatePickerTitle": "Element zur Datumsauswahl",
"demoPickersSubtitle": "Auswahl von Datum und Uhrzeit",
"demoPickersTitle": "Auswahlelemente",
"demo2dTransformationsEditTooltip": "Kachel bearbeiten",
"demoDataTableDescription": "In Datentabellen werden Informationen in einem rasterähnlichen Format aus Zeilen und Spalten angezeigt. Dabei werden sie so angeordnet, dass sie leicht zu erfassen sind und Nutzer nach Mustern und anderen Auffälligkeiten suchen können.",
"demo2dTransformationsDescription": "Tippe, um Kacheln zu bearbeiten, und nutze Touch-Gesten, um dich in der Szene zu bewegen: zum Schwenken ziehen, zum Zoomen auseinander- und zusammenziehen, und zum Drehen eine entsprechende Bewegung mit zwei Fingern machen. Drück auf die Taste zum Zurücksetzen, um zur anfänglichen Ausrichtung zurückzukehren.",
"demo2dTransformationsSubtitle": "Schwenken, zoomen, drehen",
"demo2dTransformationsTitle": "2D-Transformationen",
"demoCupertinoTextFieldPIN": "PIN",
"demoCupertinoTextFieldDescription": "In einem Textfeld kann der Nutzer entweder mithilfe einer Hardware- oder einer Bildschirmtastatur etwas eingeben.",
"demoCupertinoTextFieldSubtitle": "Textfelder im Stil von iOS",
"demoCupertinoTextFieldTitle": "Textfelder",
"demoDatePickerDescription": "Zeigt ein Dialogfeld mit einem Material Design-Element zur Datumsauswahl an.",
"demoCupertinoPickerTime": "Uhrzeit",
"demoCupertinoPickerDate": "Datum",
"demoCupertinoPickerTimer": "Timer",
"demoCupertinoPickerDescription": "Ein Auswahlelement-Widget im iOS-Stil, das zum Auswählen von Strings, Daten, Uhrzeiten oder von sowohl Daten als auch Uhrzeiten verwendet werden kann.",
"demoCupertinoPickerSubtitle": "Auswahlelemente im Stil von iOS",
"demoCupertinoPickerTitle": "Auswahlelemente",
"dataTableRowWithHoney": "{value} mit Honig",
"cardsDemoTravelDestinationCity2": "Chettinad",
"bannerDemoResetText": "Banner zurücksetzen",
"bannerDemoMultipleText": "Mehrere Aktionen",
"bannerDemoLeadingText": "Vorangestelltes Symbol",
"dismiss": "AUSBLENDEN",
"cardsDemoTappable": "Antippbar",
"cardsDemoSelectable": "Auswählbar (lange drücken)",
"cardsDemoExplore": "Entdecken",
"cardsDemoExploreSemantics": "{destinationName} erkunden",
"cardsDemoShareSemantics": "{destinationName} teilen",
"cardsDemoTravelDestinationTitle1": "Die zehn schönsten Städte in Tamil Nadu, die man sich ansehen sollte",
"cardsDemoTravelDestinationDescription1": "Nummer 10",
"cardsDemoTravelDestinationCity1": "Thanjavur",
"dataTableColumnProtein": "Eiweiß ( g)",
"cardsDemoTravelDestinationTitle2": "Kunsthandwerker aus Südindien",
"cardsDemoTravelDestinationDescription2": "Seidenspinner",
"bannerDemoText": "Dein Passwort wurde auf einem anderen Gerät aktualisiert. Melde dich noch einmal an.",
"cardsDemoTravelDestinationLocation2": "Sivaganga, Tamil Nadu",
"cardsDemoTravelDestinationTitle3": "Brihadisvara-Tempel",
"cardsDemoTravelDestinationDescription3": "Tempel",
"demoBannerTitle": "Banner",
"demoBannerSubtitle": "Banner wird innerhalb einer Liste angezeigt",
"demoBannerDescription": "Ein Banner enthält eine kurze wichtige Botschaft sowie Handlungsanweisungen für den Nutzer – auch zum Ausblenden des Banners. Das Banner wird nicht ohne eine Aktion des Nutzers ausgeblendet.",
"demoCardTitle": "Karten",
"demoCardSubtitle": "Baseline-Karten mit abgerundeten Ecken",
"demoCardDescription": "Eine Karte enthält zusätzliche Informationen wie ein Album, einen geografischen Standort, ein Gericht, Kontaktdaten usw.",
"demoDataTableTitle": "Datentabellen",
"demoDataTableSubtitle": "Zeilen und Spalten mit Informationen",
"dataTableColumnCarbs": "Kohlenhydrate ( g)",
"placeTanjore": "Thanjavur",
"demoGridListsTitle": "Rasterlisten",
"placeFlowerMarket": "Blumenmarkt",
"placeBronzeWorks": "Bronzegießerei",
"placeMarket": "Markt",
"placeThanjavurTemple": "Thanjavur-Tempel",
"placeSaltFarm": "Salzfarm",
"placeScooters": "Roller",
"placeSilkMaker": "Werkzeug zur Seidenherstellung",
"placeLunchPrep": "Zubereitung von Mittagessen",
"placeBeach": "Strand",
"placeFisherman": "Fischer",
"demoMenuSelected": "Ausgewählt: {value}",
"demoMenuRemove": "Entfernen",
"demoMenuGetLink": "Link abrufen",
"demoMenuShare": "Teilen",
"demoBottomAppBarSubtitle": "Navigationselemente und Aktionen werden unten angezeigt",
"demoMenuAnItemWithASectionedMenu": "Ein Element mit einem Menü mit Abschnitten",
"demoMenuADisabledMenuItem": "Deaktiviertes Menüelement",
"demoLinearProgressIndicatorTitle": "Lineare Fortschrittsanzeige",
"demoMenuContextMenuItemOne": "Kontextmenüelement eins",
"demoMenuAnItemWithASimpleMenu": "Ein Element mit einem einfachen Menü",
"demoCustomSlidersTitle": "Benutzerdefinierte Schieberegler",
"demoMenuAnItemWithAChecklistMenu": "Ein Element mit einem Checklistenmenü",
"demoCupertinoActivityIndicatorTitle": "Aktivitätsanzeige",
"demoCupertinoActivityIndicatorSubtitle": "Aktivitätsanzeigen im Stil von iOS",
"demoCupertinoActivityIndicatorDescription": "Eine Aktivitätsanzeige im Stil von iOS, die sich im Uhrzeigersinn dreht.",
"demoCupertinoNavigationBarTitle": "Navigationsleiste",
"demoCupertinoNavigationBarSubtitle": "Navigationsleiste im Stil von iOS",
"demoCupertinoNavigationBarDescription": "Eine Navigationsleiste im Stil von iOS. Die Navigationsleiste ist eine Symbolleiste, die mindestens aus einem Seitentitel in der Mitte der Leiste besteht.",
"demoCupertinoPullToRefreshTitle": "Zum Aktualisieren nach unten wischen",
"demoCupertinoPullToRefreshSubtitle": "Steuerelement \"Zum Aktualisieren nach unten ziehen\" im Stil von iOS",
"demoCupertinoPullToRefreshDescription": "Ein Widget, das das Inhaltssteuerelement \"Zum Aktualisieren nach unten ziehen\" im Stil von iOS implementiert.",
"demoProgressIndicatorTitle": "Fortschrittsanzeigen",
"demoProgressIndicatorSubtitle": "Linear, kreisförmig, unbestimmt",
"demoCircularProgressIndicatorTitle": "Kreisförmige Fortschrittsanzeige",
"demoCircularProgressIndicatorDescription": "Eine kreisförmige Material Design-Fortschrittsanzeige, die sich dreht, wenn die App ausgelastet ist.",
"demoMenuFour": "Vier",
"demoLinearProgressIndicatorDescription": "Eine lineare Material Design-Fortschrittsanzeige.",
"demoTooltipTitle": "Kurzinfos",
"demoTooltipSubtitle": "Kurze Meldung, die erscheint, wenn ein Element lange gedrückt oder der Mauszeiger daraufbewegt wird",
"demoTooltipDescription": "Kurzinfos sind Beschriftungen, die die Funktion von Schaltflächen oder anderen Aktionen auf der Benutzeroberfläche beschreiben. Der Informationstext darin wird angezeigt, wenn Nutzer den Mauszeiger auf ein Element bewegen, den Fokus darauf legen oder es lange drücken.",
"demoTooltipInstructions": "Drücke ein Element lange oder bewege den Mauszeiger darauf, um dir die Kurzinfo anzeigen zu lassen.",
"placeChennai": "Chennai",
"demoMenuChecked": "Ausgewählt: {value}",
"placeChettinad": "Chettinad",
"demoMenuPreview": "Vorschau",
"demoBottomAppBarTitle": "Untere App-Leiste",
"demoBottomAppBarDescription": "App-Leisten am unteren Rand bieten Zugriff auf eine Navigationsleiste und bis zu vier Aktionen, einschließlich der unverankerten Aktionsschaltfläche.",
"bottomAppBarNotch": "Notch",
"bottomAppBarPosition": "Position der unverankerten Aktionsschaltfläche",
"bottomAppBarPositionDockedEnd": "Angedockt – Ende",
"bottomAppBarPositionDockedCenter": "Angedockt – Mitte",
"bottomAppBarPositionFloatingEnd": "Unverankert – Ende",
"bottomAppBarPositionFloatingCenter": "Unverankert – Mitte",
"demoSlidersEditableNumericalValue": "Bearbeitbarer Zahlenwert",
"demoGridListsSubtitle": "Zeilen- und Spaltenlayout",
"demoGridListsDescription": "Rasterlisten eignen sich bestens zur Darstellung von homogenen Daten. Sie werden oft für Bilder verwendet. Die einzelnen Elemente in einer Rasterliste werden Kacheln genannt.",
"demoGridListsImageOnlyTitle": "Nur Bild",
"demoGridListsHeaderTitle": "Mit Kopfzeile",
"demoGridListsFooterTitle": "Mit Fußzeile",
"demoSlidersTitle": "Schieberegler",
"demoSlidersSubtitle": "Widgets zur Auswahl eines Werts durch Ziehen",
"demoSlidersDescription": "Mit Schiebereglern auf einer Leiste wird ein Wertebereich dargestellt, aus dem Nutzer einen einzelnen Wert auswählen können. Sie eignen sich ideal zum Anpassen von Einstellungen wie Lautstärke und Helligkeit oder zum Anwenden von Bildfiltern.",
"demoRangeSlidersTitle": "Bereichsschieberegler",
"demoRangeSlidersDescription": "Mit Schiebereglern auf einer Leiste wird ein Wertebereich dargestellt. An beiden Enden der Leiste kann zur Definition des Wertebereichs ein Symbol stehen. Schieberegler eignen sich ideal zum Anpassen von Einstellungen wie Lautstärke und Helligkeit oder zum Anwenden von Bildfiltern.",
"demoMenuAnItemWithAContextMenuButton": "Ein Element mit einem Kontextmenü",
"demoCustomSlidersDescription": "Mit Schiebereglern auf einer Leiste wird ein Wertebereich dargestellt, aus dem Nutzer einen einzelnen Wert oder einen Wertebereich auswählen können. Die Schieberegler können individuell gestaltet und angepasst werden.",
"demoSlidersContinuousWithEditableNumericalValue": "Fortlaufend mit bearbeitbarem Zahlenwert",
"demoSlidersDiscrete": "Diskret",
"demoSlidersDiscreteSliderWithCustomTheme": "Schieberegler für diskrete Daten mit benutzerdefiniertem Design",
"demoSlidersContinuousRangeSliderWithCustomTheme": "Bereichsschieberegler für fortlaufende Daten mit benutzerdefiniertem Design",
"demoSlidersContinuous": "Fortlaufend",
"placePondicherry": "Puducherry",
"demoMenuTitle": "Menü",
"demoContextMenuTitle": "Kontextmenü",
"demoSectionedMenuTitle": "Menü mit Abschnitten",
"demoSimpleMenuTitle": "Einfaches Menü",
"demoChecklistMenuTitle": "Checklistenmenü",
"demoMenuSubtitle": "Menüschaltflächen und einfache Menüs",
"demoMenuDescription": "Ein Menü wird vorübergehend eingeblendet und enthält eine Liste mit Auswahlmöglichkeiten. Menüs erscheinen, wenn Nutzer mit Steuerelementen wie Schaltflächen interagieren.",
"demoMenuItemValueOne": "Menüpunkt eins",
"demoMenuItemValueTwo": "Menüpunkt zwei",
"demoMenuItemValueThree": "Menüpunkt drei",
"demoMenuOne": "Eins",
"demoMenuTwo": "Zwei",
"demoMenuThree": "Drei",
"demoMenuContextMenuItemThree": "Kontextmenüelement drei",
"demoCupertinoSwitchSubtitle": "Schalter im Stil von iOS",
"demoSnackbarsText": "Das ist eine Snackbar.",
"demoCupertinoSliderSubtitle": "Schieberegler im Stil von iOS",
"demoCupertinoSliderDescription": "Ein Schieberegler kann dazu verwendet werden, Werte stufenlos oder aus einer festgelegten Gruppe auszuwählen.",
"demoCupertinoSliderContinuous": "Stufenlos: {value}",
"demoCupertinoSliderDiscrete": "Gruppe: {value}",
"demoSnackbarsAction": "Du hast die Snackbar-Aktion ausgelöst.",
"backToGallery": "Zurück zur Galerie",
"demoCupertinoTabBarTitle": "Tableiste",
"demoCupertinoSwitchDescription": "Mit einem Schalter wird für eine einzelne Einstellung der Wert \"An\" oder \"Aus\" festgelegt.",
"demoSnackbarsActionButtonLabel": "AKTION",
"cupertinoTabBarProfileTab": "Profil",
"demoSnackbarsButtonLabel": "EINE SNACKBAR ANZEIGEN",
"demoSnackbarsDescription": "Snackbars informieren Nutzer über einen Vorgang, den eine App durchgeführt hat oder durchführen wird. Sie erscheinen vorübergehend auf dem unteren Teil des Bildschirms. Snackbars sollten Nutzer nicht unterbrechen und werden automatisch wieder ausgeblendet.",
"demoSnackbarsSubtitle": "Snackbars zeigen Meldungen unten auf dem Bildschirm an",
"demoSnackbarsTitle": "Snackbars",
"demoCupertinoSliderTitle": "Schieberegler",
"cupertinoTabBarChatTab": "Chat",
"cupertinoTabBarHomeTab": "Start",
"demoCupertinoTabBarDescription": "Eine untere Tab-Leiste zur Navigation im Stil von iOS. Darauf werden mehrere Tabs angezeigt, wobei jeweils ein Tab aktiv ist – standardmäßig der erste.",
"demoCupertinoTabBarSubtitle": "Untere Tab-Leiste im Stil von iOS",
"demoOptionsFeatureTitle": "Optionen für die Ansicht",
"demoOptionsFeatureDescription": "Tippe hier, um die verfügbaren Optionen für diese Demo anzuzeigen.",
"demoCodeViewerCopyAll": "ALLES KOPIEREN",
"shrineScreenReaderRemoveProductButton": "{product} entfernen",
"shrineScreenReaderProductAddToCart": "In den Einkaufswagen",
"shrineScreenReaderCart": "{quantity,plural,=0{Einkaufswagen, keine Artikel}=1{Einkaufswagen, 1 Artikel}other{Einkaufswagen, {quantity} Artikel}}",
"demoCodeViewerFailedToCopyToClipboardMessage": "Fehler beim Kopieren in die Zwischenablage: {error}",
"demoCodeViewerCopiedToClipboardMessage": "In die Zwischenablage kopiert.",
"craneSleep8SemanticLabel": "Maya-Ruinen auf einer Klippe oberhalb eines Strandes",
"craneSleep4SemanticLabel": "Hotel an einem See mit Bergen im Hintergrund",
"craneSleep2SemanticLabel": "Zitadelle von Machu Picchu",
"craneSleep1SemanticLabel": "Chalet in einer Schneelandschaft mit immergrünen Bäumen",
"craneSleep0SemanticLabel": "Overwater-Bungalows",
"craneFly13SemanticLabel": "Pool am Meer mit Palmen",
"craneFly12SemanticLabel": "Pool mit Palmen",
"craneFly11SemanticLabel": "Aus Ziegelsteinen gemauerter Leuchtturm am Meer",
"craneFly10SemanticLabel": "Minarette der al-Azhar-Moschee bei Sonnenuntergang",
"craneFly9SemanticLabel": "Mann, der sich gegen einen blauen Oldtimer lehnt",
"craneFly8SemanticLabel": "Supertree Grove",
"craneEat9SemanticLabel": "Café-Theke mit Gebäck",
"craneEat2SemanticLabel": "Hamburger",
"craneFly5SemanticLabel": "Hotel an einem See mit Bergen im Hintergrund",
"demoSelectionControlsSubtitle": "Kästchen, Optionsfelder und Schieberegler",
"craneEat10SemanticLabel": "Frau mit riesigem Pastrami-Sandwich",
"craneFly4SemanticLabel": "Overwater-Bungalows",
"craneEat7SemanticLabel": "Eingang einer Bäckerei",
"craneEat6SemanticLabel": "Garnelengericht",
"craneEat5SemanticLabel": "Sitzbereich eines künstlerisch eingerichteten Restaurants",
"craneEat4SemanticLabel": "Schokoladendessert",
"craneEat3SemanticLabel": "Koreanischer Taco",
"craneFly3SemanticLabel": "Zitadelle von Machu Picchu",
"craneEat1SemanticLabel": "Leere Bar mit Barhockern",
"craneEat0SemanticLabel": "Pizza in einem Holzofen",
"craneSleep11SemanticLabel": "Taipei 101",
"craneSleep10SemanticLabel": "Minarette der al-Azhar-Moschee bei Sonnenuntergang",
"craneSleep9SemanticLabel": "Aus Ziegelsteinen gemauerter Leuchtturm am Meer",
"craneEat8SemanticLabel": "Teller mit Flusskrebsen",
"craneSleep7SemanticLabel": "Bunte Häuser am Praça da Ribeira",
"craneSleep6SemanticLabel": "Pool mit Palmen",
"craneSleep5SemanticLabel": "Zelt auf einem Feld",
"settingsButtonCloseLabel": "Einstellungen schließen",
"demoSelectionControlsCheckboxDescription": "Über Kästchen können Nutzer mehrere Optionen gleichzeitig auswählen. Üblicherweise ist der Wert eines Kästchens entweder \"true\" (ausgewählt) oder \"false\" (nicht ausgewählt) – Kästchen mit drei Auswahlmöglichkeiten können jedoch auch den Wert \"null\" haben.",
"settingsButtonLabel": "Einstellungen",
"demoListsTitle": "Listen",
"demoListsSubtitle": "Layouts der scrollbaren Liste",
"demoListsDescription": "Eine Zeile in der Liste hat eine feste Höhe und enthält normalerweise Text und ein anführendes bzw. abschließendes Symbol.",
"demoOneLineListsTitle": "Eine Zeile",
"demoTwoLineListsTitle": "Zwei Zeilen",
"demoListsSecondary": "Sekundärer Text",
"demoSelectionControlsTitle": "Auswahlsteuerung",
"craneFly7SemanticLabel": "Mount Rushmore",
"demoSelectionControlsCheckboxTitle": "Kästchen",
"craneSleep3SemanticLabel": "Mann, der sich gegen einen blauen Oldtimer lehnt",
"demoSelectionControlsRadioTitle": "Optionsfeld",
"demoSelectionControlsRadioDescription": "Über Optionsfelder können Nutzer eine Option auswählen. Optionsfelder sind ideal, wenn nur eine einzige Option ausgewählt werden kann, aber alle verfügbaren Auswahlmöglichkeiten auf einen Blick erkennbar sein sollen.",
"demoSelectionControlsSwitchTitle": "Schalter",
"demoSelectionControlsSwitchDescription": "Mit Schiebereglern können Nutzer den Status einzelner Einstellungen ändern. Dabei sollte mit einem passenden Inline-Label deutlich gemacht werden, um welche Einstellung es sich handelt und wie ihr aktueller Status ist.",
"craneFly0SemanticLabel": "Chalet in einer Schneelandschaft mit immergrünen Bäumen",
"craneFly1SemanticLabel": "Zelt auf einem Feld",
"craneFly2SemanticLabel": "Gebetsfahnen vor einem schneebedeckten Berg",
"craneFly6SemanticLabel": "Luftbild des Palacio de Bellas Artes",
"rallySeeAllAccounts": "Alle Konten anzeigen",
"rallyBillAmount": "Rechnung \"{billName}\" in Höhe von {amount} am {date} fällig.",
"shrineTooltipCloseCart": "Seite \"Warenkorb\" schließen",
"shrineTooltipCloseMenu": "Menü schließen",
"shrineTooltipOpenMenu": "Menü öffnen",
"shrineTooltipSettings": "Einstellungen",
"shrineTooltipSearch": "Suchen",
"demoTabsDescription": "Mit Tabs lassen sich Inhalte über Bildschirme, Datensätze und andere Interaktionen hinweg organisieren.",
"demoTabsSubtitle": "Tabs mit unabhängig scrollbaren Ansichten",
"demoTabsTitle": "Tabs",
"rallyBudgetAmount": "Budget \"{budgetName}\" mit einem Gesamtbetrag von {amountTotal} ({amountUsed} verwendet, {amountLeft} verbleibend)",
"shrineTooltipRemoveItem": "Element entfernen",
"rallyAccountAmount": "Konto \"{accountName}\" {accountNumber} mit einem Kontostand von {amount}.",
"rallySeeAllBudgets": "Alle Budgets anzeigen",
"rallySeeAllBills": "Alle Rechnungen anzeigen",
"craneFormDate": "Datum auswählen",
"craneFormOrigin": "Abflugort auswählen",
"craneFly2": "Khumbu Valley, Nepal",
"craneFly3": "Machu Picchu, Peru",
"craneFly4": "Malé, Malediven",
"craneFly5": "Vitznau, Schweiz",
"craneFly6": "Mexiko-Stadt, Mexiko",
"craneFly7": "Mount Rushmore, USA",
"settingsTextDirectionLocaleBased": "Abhängig von der Sprache",
"craneFly9": "Havanna, Kuba",
"craneFly10": "Kairo, Ägypten",
"craneFly11": "Lissabon, Portugal",
"craneFly12": "Napa, USA",
"craneFly13": "Bali, Indonesien",
"craneSleep0": "Malé, Malediven",
"craneSleep1": "Aspen, USA",
"craneSleep2": "Machu Picchu, Peru",
"demoCupertinoSegmentedControlTitle": "Segmentierte Steuerung",
"craneSleep4": "Vitznau, Schweiz",
"craneSleep5": "Big Sur, USA",
"craneSleep6": "Napa, USA",
"craneSleep7": "Porto, Portugal",
"craneSleep8": "Tulum, Mexiko",
"craneEat5": "Seoul, Südkorea",
"demoChipTitle": "Chips",
"demoChipSubtitle": "Kompakte Elemente, die für eine Eingabe, ein Attribut oder eine Aktion stehen",
"demoActionChipTitle": "Aktions-Chip",
"demoActionChipDescription": "Aktions-Chips sind eine Gruppe von Optionen, die eine Aktion im Zusammenhang mit wichtigen Inhalten auslösen. Aktions-Chips sollten in der Benutzeroberfläche dynamisch und kontextorientiert erscheinen.",
"demoChoiceChipTitle": "Auswahl-Chip",
"demoChoiceChipDescription": "Auswahl-Chips stehen für eine einzelne Auswahl aus einer Gruppe von Optionen. Auswahl-Chips enthalten zugehörigen beschreibenden Text oder zugehörige Kategorien.",
"demoFilterChipTitle": "Filter Chip",
"demoFilterChipDescription": "Filter-Chips dienen zum Filtern von Inhalten anhand von Tags oder beschreibenden Wörtern.",
"demoInputChipTitle": "Eingabe-Chip",
"demoInputChipDescription": "Eingabe-Chips stehen für eine komplexe Information, wie eine Entität (Person, Ort oder Gegenstand) oder für Gesprächstext in kompakter Form.",
"craneSleep9": "Lissabon, Portugal",
"craneEat10": "Lissabon, Portugal",
"demoCupertinoSegmentedControlDescription": "Wird verwendet, um aus einer Reihe von Optionen zu wählen, die sich gegenseitig ausschließen. Wenn eine Option in der segmentierten Steuerung ausgewählt ist, wird dadurch die Auswahl für die anderen Optionen aufgehoben.",
"chipTurnOnLights": "Beleuchtung einschalten",
"chipSmall": "Klein",
"chipMedium": "Mittel",
"chipLarge": "Groß",
"chipElevator": "Fahrstuhl",
"chipWasher": "Waschmaschine",
"chipFireplace": "Kamin",
"chipBiking": "Radfahren",
"craneFormDiners": "Personenzahl",
"rallyAlertsMessageUnassignedTransactions": "{count,plural,=1{Erhöhe deine potenziellen Steuervergünstigungen! Du kannst 1 nicht zugewiesenen Transaktion Kategorien zuordnen.}other{Erhöhe deine potenziellen Steuervergünstigungen! Du kannst {count} nicht zugewiesenen Transaktionen Kategorien zuordnen.}}",
"craneFormTime": "Uhrzeit auswählen",
"craneFormLocation": "Ort auswählen",
"craneFormTravelers": "Reisende",
"craneEat8": "Atlanta, USA",
"craneFormDestination": "Reiseziel auswählen",
"craneFormDates": "Daten auswählen",
"craneFly": "FLIEGEN",
"craneSleep": "SCHLAFEN",
"craneEat": "ESSEN",
"craneFlySubhead": "Flüge nach Reiseziel suchen",
"craneSleepSubhead": "Unterkünfte am Zielort finden",
"craneEatSubhead": "Restaurants am Zielort finden",
"craneFlyStops": "{numberOfStops,plural,=0{Nonstop}=1{1 Zwischenstopp}other{{numberOfStops} Zwischenstopps}}",
"craneSleepProperties": "{totalProperties,plural,=0{Keine Unterkünfte verfügbar}=1{1 verfügbare Unterkunft}other{{totalProperties} verfügbare Unterkünfte}}",
"craneEatRestaurants": "{totalRestaurants,plural,=0{Keine Restaurants}=1{1 Restaurant}other{{totalRestaurants} Restaurants}}",
"craneFly0": "Aspen, USA",
"demoCupertinoSegmentedControlSubtitle": "Segmentierte Steuerung im Stil von iOS",
"craneSleep10": "Kairo, Ägypten",
"craneEat9": "Madrid, Spanien",
"craneFly1": "Big Sur, USA",
"craneEat7": "Nashville, USA",
"craneEat6": "Seattle, USA",
"craneFly8": "Singapur",
"craneEat4": "Paris, Frankreich",
"craneEat3": "Portland, USA",
"craneEat2": "Córdoba, Argentinien",
"craneEat1": "Dallas, USA",
"craneEat0": "Neapel, Italien",
"craneSleep11": "Taipeh, Taiwan",
"craneSleep3": "Havanna, Kuba",
"shrineLogoutButtonCaption": "ABMELDEN",
"rallyTitleBills": "RECHNUNGEN",
"rallyTitleAccounts": "KONTEN",
"shrineProductVagabondSack": "Vagabond-Tasche",
"rallyAccountDetailDataInterestYtd": "Zinsen seit Jahresbeginn",
"shrineProductWhitneyBelt": "Whitney-Gürtel",
"shrineProductGardenStrand": "Garden-Schmuck",
"shrineProductStrutEarrings": "Strut-Ohrringe",
"shrineProductVarsitySocks": "Varsity-Socken",
"shrineProductWeaveKeyring": "Weave-Schlüsselring",
"shrineProductGatsbyHat": "Gatsby-Hut",
"shrineProductShrugBag": "Shrug-Tasche",
"shrineProductGiltDeskTrio": "Goldenes Schreibtischtrio",
"shrineProductCopperWireRack": "Kupferdrahtkorb",
"shrineProductSootheCeramicSet": "Soothe-Keramikset",
"shrineProductHurrahsTeaSet": "Hurrahs-Teeservice",
"shrineProductBlueStoneMug": "Blauer Steinkrug",
"shrineProductRainwaterTray": "Regenwasserbehälter",
"shrineProductChambrayNapkins": "Chambray-Servietten",
"shrineProductSucculentPlanters": "Blumentöpfe für Sukkulenten",
"shrineProductQuartetTable": "Vierbeiniger Tisch",
"shrineProductKitchenQuattro": "Vierteiliges Küchen-Set",
"shrineProductClaySweater": "Clay-Pullover",
"shrineProductSeaTunic": "Sea-Tunika",
"shrineProductPlasterTunic": "Plaster-Tunika",
"rallyBudgetCategoryRestaurants": "Restaurants",
"shrineProductChambrayShirt": "Chambray-Hemd",
"shrineProductSeabreezeSweater": "Seabreeze-Pullover",
"shrineProductGentryJacket": "Gentry-Jacke",
"shrineProductNavyTrousers": "Navy-Hose",
"shrineProductWalterHenleyWhite": "Walter Henley (weiß)",
"shrineProductSurfAndPerfShirt": "Surf-and-perf-Hemd",
"shrineProductGingerScarf": "Ginger-Schal",
"shrineProductRamonaCrossover": "Ramona-Crossover",
"shrineProductClassicWhiteCollar": "Klassisch mit weißem Kragen",
"shrineProductSunshirtDress": "Sunshirt-Kleid",
"rallyAccountDetailDataInterestRate": "Zinssatz",
"rallyAccountDetailDataAnnualPercentageYield": "Jährlicher Ertrag in Prozent",
"rallyAccountDataVacation": "Urlaub",
"shrineProductFineLinesTee": "Fine Lines-T-Shirt",
"rallyAccountDataHomeSavings": "Ersparnisse für Zuhause",
"rallyAccountDataChecking": "Girokonto",
"rallyAccountDetailDataInterestPaidLastYear": "Letztes Jahr gezahlte Zinsen",
"rallyAccountDetailDataNextStatement": "Nächster Auszug",
"rallyAccountDetailDataAccountOwner": "Kontoinhaber",
"rallyBudgetCategoryCoffeeShops": "Cafés",
"rallyBudgetCategoryGroceries": "Lebensmittel",
"shrineProductCeriseScallopTee": "Cerise-Scallop-T-Shirt",
"rallyBudgetCategoryClothing": "Kleidung",
"rallySettingsManageAccounts": "Konten verwalten",
"rallyAccountDataCarSavings": "Ersparnisse für Auto",
"rallySettingsTaxDocuments": "Steuerdokumente",
"rallySettingsPasscodeAndTouchId": "Sicherheitscode und Touch ID",
"rallySettingsNotifications": "Benachrichtigungen",
"rallySettingsPersonalInformation": "Personenbezogene Daten",
"rallySettingsPaperlessSettings": "Papierloseinstellungen",
"rallySettingsFindAtms": "Geldautomaten finden",
"rallySettingsHelp": "Hilfe",
"rallySettingsSignOut": "Abmelden",
"rallyAccountTotal": "Summe",
"rallyBillsDue": "Fällig:",
"rallyBudgetLeft": "verbleibend",
"rallyAccounts": "Konten",
"rallyBills": "Rechnungen",
"rallyBudgets": "Budgets",
"rallyAlerts": "Benachrichtigungen",
"rallySeeAll": "ALLES ANZEIGEN",
"rallyFinanceLeft": "VERBLEIBEND",
"rallyTitleOverview": "ÜBERSICHT",
"shrineProductShoulderRollsTee": "Shoulder-rolls-T-Shirt",
"shrineNextButtonCaption": "WEITER",
"rallyTitleBudgets": "BUDGETS",
"rallyTitleSettings": "EINSTELLUNGEN",
"rallyLoginLoginToRally": "In Rally anmelden",
"rallyLoginNoAccount": "Du hast noch kein Konto?",
"rallyLoginSignUp": "REGISTRIEREN",
"rallyLoginUsername": "Nutzername",
"rallyLoginPassword": "Passwort",
"rallyLoginLabelLogin": "Anmelden",
"rallyLoginRememberMe": "Angemeldet bleiben",
"rallyLoginButtonLogin": "ANMELDEN",
"rallyAlertsMessageHeadsUpShopping": "Achtung: Du hast {percent} deines Einkaufsbudgets für diesen Monat verbraucht.",
"rallyAlertsMessageSpentOnRestaurants": "Du hast diese Woche {amount} in Restaurants ausgegeben.",
"rallyAlertsMessageATMFees": "Du hast diesen Monat {amount} Geldautomatengebühren bezahlt",
"rallyAlertsMessageCheckingAccount": "Sehr gut! Auf deinem Girokonto ist {percent} mehr Geld als im letzten Monat.",
"shrineMenuCaption": "MENÜ",
"shrineCategoryNameAll": "ALLE",
"shrineCategoryNameAccessories": "ACCESSOIRES",
"shrineCategoryNameClothing": "KLEIDUNG",
"shrineCategoryNameHome": "ZUHAUSE",
"shrineLoginUsernameLabel": "Nutzername",
"shrineLoginPasswordLabel": "Passwort",
"shrineCancelButtonCaption": "ABBRECHEN",
"shrineCartTaxCaption": "Steuern:",
"shrineCartPageCaption": "EINKAUFSWAGEN",
"shrineProductQuantity": "Anzahl: {quantity}",
"shrineProductPrice": "x {price}",
"shrineCartItemCount": "{quantity,plural,=0{KEINE ELEMENTE}=1{1 ELEMENT}other{{quantity} ELEMENTE}}",
"shrineCartClearButtonCaption": "EINKAUFSWAGEN LEEREN",
"shrineCartTotalCaption": "SUMME",
"shrineCartSubtotalCaption": "Zwischensumme:",
"shrineCartShippingCaption": "Versand:",
"shrineProductGreySlouchTank": "Graues Slouchy-Tanktop",
"shrineProductStellaSunglasses": "Stella-Sonnenbrille",
"shrineProductWhitePinstripeShirt": "Weißes Nadelstreifenhemd",
"demoTextFieldWhereCanWeReachYou": "Unter welcher Nummer können wir dich erreichen?",
"settingsTextDirectionLTR": "Rechtsläufig",
"settingsTextScalingLarge": "Groß",
"demoBottomSheetHeader": "Kopfzeile",
"demoBottomSheetItem": "Artikel: {value}",
"demoBottomTextFieldsTitle": "Textfelder",
"demoTextFieldTitle": "Textfelder",
"demoTextFieldSubtitle": "Einzelne Linie mit Text und Zahlen, die bearbeitet werden können",
"demoTextFieldDescription": "Über Textfelder können Nutzer Text auf einer Benutzeroberfläche eingeben. Sie sind in der Regel in Formularen und Dialogfeldern zu finden.",
"demoTextFieldShowPasswordLabel": "Passwort anzeigen",
"demoTextFieldHidePasswordLabel": "Passwort ausblenden",
"demoTextFieldFormErrors": "Bitte behebe vor dem Senden die rot markierten Probleme.",
"demoTextFieldNameRequired": "Name ist erforderlich.",
"demoTextFieldOnlyAlphabeticalChars": "Bitte gib nur Zeichen aus dem Alphabet ein.",
"demoTextFieldEnterUSPhoneNumber": "(###) ###-#### – Gib eine US-amerikanische Telefonnummer ein.",
"demoTextFieldEnterPassword": "Gib ein Passwort ein.",
"demoTextFieldPasswordsDoNotMatch": "Die Passwörter stimmen nicht überein",
"demoTextFieldWhatDoPeopleCallYou": "Wie lautet dein Name?",
"demoTextFieldNameField": "Name*",
"demoBottomSheetButtonText": "BLATT AM UNTEREN RAND ANZEIGEN",
"demoTextFieldPhoneNumber": "Telefonnummer*",
"demoBottomSheetTitle": "Blatt am unteren Rand",
"demoTextFieldEmail": "E-Mail-Adresse",
"demoTextFieldTellUsAboutYourself": "Erzähl uns etwas über dich (z. B., welcher Tätigkeit du nachgehst oder welche Hobbys du hast)",
"demoTextFieldKeepItShort": "Schreib nicht zu viel, das hier ist nur eine Demonstration.",
"starterAppGenericButton": "SCHALTFLÄCHE",
"demoTextFieldLifeStory": "Lebensgeschichte",
"demoTextFieldSalary": "Gehalt",
"demoTextFieldUSD": "USD",
"demoTextFieldNoMoreThan": "Nicht mehr als 8 Zeichen.",
"demoTextFieldPassword": "Passwort*",
"demoTextFieldRetypePassword": "Passwort wiederholen*",
"demoTextFieldSubmit": "SENDEN",
"demoBottomNavigationSubtitle": "Navigation am unteren Rand mit sich überblendenden Ansichten",
"demoBottomSheetAddLabel": "Hinzufügen",
"demoBottomSheetModalDescription": "Ein modales Blatt am unteren Rand ist eine Alternative zu einem Menü oder einem Dialogfeld und verhindert, dass Nutzer mit dem Rest der App interagieren.",
"demoBottomSheetModalTitle": "Modales Blatt am unteren Rand",
"demoBottomSheetPersistentDescription": "Auf einem persistenten Blatt am unteren Rand werden Informationen angezeigt, die den Hauptinhalt der App ergänzen. Ein solches Blatt bleibt immer sichtbar, auch dann, wenn der Nutzer mit anderen Teilen der App interagiert.",
"demoBottomSheetPersistentTitle": "Persistentes Blatt am unteren Rand",
"demoBottomSheetSubtitle": "Persistente und modale Blätter am unteren Rand",
"demoTextFieldNameHasPhoneNumber": "Telefonnummer von {name} ist {phoneNumber}",
"buttonText": "SCHALTFLÄCHE",
"demoTypographyDescription": "Definitionen für die verschiedenen Typografiestile im Material Design.",
"demoTypographySubtitle": "Alle vordefinierten Textstile",
"demoTypographyTitle": "Typografie",
"demoFullscreenDialogDescription": "Das Attribut \"fullscreenDialog\" gibt an, ob eine eingehende Seite ein modales Vollbild-Dialogfeld ist",
"demoFlatButtonDescription": "Eine flache Schaltfläche, die beim Drücken eine Farbreaktion zeigt, aber nicht erhöht dargestellt wird. Du kannst flache Schaltflächen in Symbolleisten, Dialogfeldern und inline mit Abständen verwenden.",
"demoBottomNavigationDescription": "Auf Navigationsleisten am unteren Bildschirmrand werden zwischen drei und fünf Zielseiten angezeigt. Jede Zielseite wird durch ein Symbol und eine optionale Beschriftung dargestellt. Wenn ein Navigationssymbol am unteren Rand angetippt wird, wird der Nutzer zur Zielseite auf der obersten Ebene der Navigation weitergeleitet, die diesem Symbol zugeordnet ist.",
"demoBottomNavigationSelectedLabel": "Ausgewähltes Label",
"demoBottomNavigationPersistentLabels": "Persistente Labels",
"starterAppDrawerItem": "Artikel: {value}",
"demoTextFieldRequiredField": "* Pflichtfeld",
"demoBottomNavigationTitle": "Navigation am unteren Rand",
"settingsLightTheme": "Hell",
"settingsTheme": "Design",
"settingsPlatformIOS": "iOS",
"settingsPlatformAndroid": "Android",
"settingsTextDirectionRTL": "Linksläufig",
"settingsTextScalingHuge": "Sehr groß",
"cupertinoButton": "Schaltfläche",
"settingsTextScalingNormal": "Normal",
"settingsTextScalingSmall": "Klein",
"settingsSystemDefault": "System",
"settingsTitle": "Einstellungen",
"rallyDescription": "Persönliche Finanz-App",
"aboutDialogDescription": "Den Quellcode dieser App findest du hier: {repoLink}.",
"bottomNavigationCommentsTab": "Kommentare",
"starterAppGenericBody": "Text",
"starterAppGenericHeadline": "Überschrift",
"starterAppGenericSubtitle": "Untertitel",
"starterAppGenericTitle": "Titel",
"starterAppTooltipSearch": "Suchen",
"starterAppTooltipShare": "Teilen",
"starterAppTooltipFavorite": "Zu Favoriten hinzufügen",
"starterAppTooltipAdd": "Hinzufügen",
"bottomNavigationCalendarTab": "Kalender",
"starterAppDescription": "Ein responsives Anfangslayout",
"starterAppTitle": "Start-App",
"aboutFlutterSamplesRepo": "GitHub-Repository mit Flutter-Beispielen",
"bottomNavigationContentPlaceholder": "Platzhalter für den Tab \"{title}\"",
"bottomNavigationCameraTab": "Kamera",
"bottomNavigationAlarmTab": "Weckruf",
"bottomNavigationAccountTab": "Konto",
"demoTextFieldYourEmailAddress": "Deine E-Mail-Adresse",
"demoToggleButtonDescription": "Ein-/Aus-Schaltflächen können verwendet werden, um ähnliche Optionen zu gruppieren. Die Gruppe sollte einen gemeinsamen Container haben, um hervorzuheben, dass die Ein-/Aus-Schaltflächen eine ähnliche Funktion erfüllen.",
"colorsGrey": "GRAU",
"colorsBrown": "BRAUN",
"colorsDeepOrange": "DUNKLES ORANGE",
"colorsOrange": "ORANGE",
"colorsAmber": "BERNSTEINGELB",
"colorsYellow": "GELB",
"colorsLime": "GELBGRÜN",
"colorsLightGreen": "HELLGRÜN",
"colorsGreen": "GRÜN",
"homeHeaderGallery": "Galerie",
"homeHeaderCategories": "Kategorien",
"shrineDescription": "Einzelhandels-App für Mode",
"craneDescription": "Personalisierte Reise-App",
"homeCategoryReference": "STILE & ANDERE",
"demoInvalidURL": "URL konnte nicht angezeigt werden:",
"demoOptionsTooltip": "Optionen",
"demoInfoTooltip": "Info",
"demoCodeTooltip": "Democode",
"demoDocumentationTooltip": "API-Dokumentation",
"demoFullscreenTooltip": "Vollbild",
"settingsTextScaling": "Textskalierung",
"settingsTextDirection": "Textrichtung",
"settingsLocale": "Sprache",
"settingsPlatformMechanics": "Funktionsweise der Plattform",
"settingsDarkTheme": "Dunkel",
"settingsSlowMotion": "Zeitlupe",
"settingsAbout": "Über Flutter Gallery",
"settingsFeedback": "Feedback geben",
"settingsAttribution": "Design von TOASTER, London",
"demoButtonTitle": "Schaltflächen",
"demoButtonSubtitle": "Mit Text, Erhöhung, Umriss und mehr",
"demoFlatButtonTitle": "Flache Schaltfläche",
"demoRaisedButtonDescription": "Erhöhte Schaltflächen verleihen flachen Layouts mehr Dimension. Sie können verwendet werden, um Funktionen auf überladenen oder leeren Flächen hervorzuheben.",
"demoRaisedButtonTitle": "Erhöhte Schaltfläche",
"demoOutlineButtonTitle": "Schaltfläche mit Umriss",
"demoOutlineButtonDescription": "Schaltflächen mit Umriss werden undurchsichtig und erhöht dargestellt, wenn sie gedrückt werden. Sie werden häufig mit erhöhten Schaltflächen kombiniert, um eine alternative oder sekundäre Aktion zu kennzeichnen.",
"demoToggleButtonTitle": "Ein-/Aus-Schaltflächen",
"colorsTeal": "BLAUGRÜN",
"demoFloatingButtonTitle": "Unverankerte Aktionsschaltfläche",
"demoFloatingButtonDescription": "Eine unverankerte Aktionsschaltfläche ist eine runde Symbolschaltfläche, die über dem Inhalt schwebt und Zugriff auf eine primäre Aktion der App bietet.",
"demoDialogTitle": "Dialogfelder",
"demoDialogSubtitle": "Einfach, Benachrichtigung und Vollbild",
"demoAlertDialogTitle": "Benachrichtigung",
"demoAlertDialogDescription": "Ein Benachrichtigungsdialog informiert Nutzer über Situationen, die ihre Aufmerksamkeit erfordern. Er kann einen Titel und eine Liste mit Aktionen enthalten. Beides ist optional.",
"demoAlertTitleDialogTitle": "Benachrichtigung mit Titel",
"demoSimpleDialogTitle": "Einfach",
"demoSimpleDialogDescription": "Ein einfaches Dialogfeld bietet Nutzern mehrere Auswahlmöglichkeiten. Optional kann über den Auswahlmöglichkeiten ein Titel angezeigt werden.",
"demoFullscreenDialogTitle": "Vollbild",
"demoCupertinoButtonsTitle": "Schaltflächen",
"demoCupertinoButtonsSubtitle": "Schaltflächen im Stil von iOS",
"demoCupertinoButtonsDescription": "Eine Schaltfläche im Stil von iOS. Sie kann Text und/oder ein Symbol enthalten, die bei Berührung aus- und eingeblendet werden. Optional ist auch ein Hintergrund möglich.",
"demoCupertinoAlertsTitle": "Benachrichtigungen",
"demoCupertinoAlertsSubtitle": "Dialogfelder für Benachrichtigungen im Stil von iOS",
"demoCupertinoAlertTitle": "Benachrichtigung",
"demoCupertinoAlertDescription": "Ein Benachrichtigungsdialog informiert den Nutzer über Situationen, die seine Aufmerksamkeit erfordern. Optional kann er einen Titel, Inhalt und eine Liste mit Aktionen enthalten. Der Titel wird über dem Inhalt angezeigt, die Aktionen darunter.",
"demoCupertinoAlertWithTitleTitle": "Benachrichtigung mit Titel",
"demoCupertinoAlertButtonsTitle": "Benachrichtigung mit Schaltflächen",
"demoCupertinoAlertButtonsOnlyTitle": "Nur Schaltflächen für Benachrichtigungen",
"demoCupertinoActionSheetTitle": "Aktionstabelle",
"demoCupertinoActionSheetDescription": "Eine Aktionstabelle ist eine Art von Benachrichtigung, bei der Nutzern zwei oder mehr Auswahlmöglichkeiten zum aktuellen Kontext angezeigt werden. Sie kann einen Titel, eine zusätzliche Nachricht und eine Liste von Aktionen enthalten.",
"demoColorsTitle": "Farben",
"demoColorsSubtitle": "Alle vordefinierten Farben",
"demoColorsDescription": "Farben und Farbmuster, die die Farbpalette von Material Design widerspiegeln.",
"buttonTextEnabled": "ENABLED",
"buttonTextDisabled": "DISABLED",
"buttonTextCreate": "Erstellen",
"dialogSelectedOption": "Deine Auswahl: \"{value}\"",
"dialogDiscardTitle": "Entwurf verwerfen?",
"dialogLocationTitle": "Standortdienst von Google nutzen?",
"dialogLocationDescription": "Die Standortdienste von Google erleichtern die Standortbestimmung durch Apps. Dabei werden anonyme Standortdaten an Google gesendet, auch wenn gerade keine Apps ausgeführt werden.",
"dialogCancel": "ABBRECHEN",
"dialogDiscard": "VERWERFEN",
"dialogDisagree": "NICHT ZUSTIMMEN",
"dialogAgree": "ZUSTIMMEN",
"dialogSetBackup": "Sicherungskonto einrichten",
"colorsBlueGrey": "BLAUGRAU",
"dialogShow": "DIALOGFELD ANZEIGEN",
"dialogFullscreenTitle": "Vollbild-Dialogfeld",
"dialogFullscreenSave": "SPEICHERN",
"dialogFullscreenDescription": "Demo eines Vollbild-Dialogfelds",
"cupertinoButtonEnabled": "Enabled",
"cupertinoButtonDisabled": "Disabled",
"cupertinoButtonWithBackground": "Mit Hintergrund",
"cupertinoAlertCancel": "Abbrechen",
"cupertinoAlertDiscard": "Verwerfen",
"cupertinoAlertLocationTitle": "Maps erlauben, während der Nutzung der App auf deinen Standort zuzugreifen?",
"cupertinoAlertLocationDescription": "Dein aktueller Standort wird auf der Karte angezeigt und für Wegbeschreibungen, Suchergebnisse für Dinge in der Nähe und zur Einschätzung von Fahrtzeiten verwendet.",
"cupertinoAlertAllow": "Zulassen",
"cupertinoAlertDontAllow": "Nicht zulassen",
"cupertinoAlertFavoriteDessert": "Lieblingsdessert auswählen",
"cupertinoAlertDessertDescription": "Bitte wähle in der Liste unten dein Lieblingsdessert aus. Mithilfe deiner Auswahl wird die Liste der Restaurantvorschläge in deiner Nähe personalisiert.",
"cupertinoAlertCheesecake": "Käsekuchen",
"cupertinoAlertTiramisu": "Tiramisu",
"cupertinoAlertApplePie": "Apfelkuchen",
"cupertinoAlertChocolateBrownie": "Schokoladenbrownie",
"cupertinoShowAlert": "Benachrichtigung anzeigen",
"colorsRed": "ROT",
"colorsPink": "PINK",
"colorsPurple": "LILA",
"colorsDeepPurple": "DUNKLES LILA",
"colorsIndigo": "INDIGO",
"colorsBlue": "BLAU",
"colorsLightBlue": "HELLBLAU",
"colorsCyan": "CYAN",
"dialogAddAccount": "Konto hinzufügen",
"Gallery": "Galerie",
"Categories": "Kategorien",
"SHRINE": "SCHREIN",
"Basic shopping app": "Einfache Shopping-App",
"RALLY": "RALLYE",
"CRANE": "KRAN",
"Travel app": "Reise-App",
"MATERIAL": "MATERIAL",
"CUPERTINO": "CUPERTINO",
"REFERENCE STYLES & MEDIA": "STIL DER REFERENZEN & MEDIEN"
}
| gallery/lib/l10n/intl_gsw.arb/0 | {
"file_path": "gallery/lib/l10n/intl_gsw.arb",
"repo_id": "gallery",
"token_count": 20432
} | 868 |
{
"loading": "Жүктөлүүдө",
"deselect": "Тандоодон чыгаруу",
"select": "Тандоо",
"selectable": "Тандалуучу (коё бербей басып туруу)",
"selected": "Тандалды",
"demo": "Демо",
"bottomAppBar": "Колдонмонун ылдый жакта жайгашкан тилкеси",
"notSelected": "Тандалган жок",
"demoCupertinoSearchTextFieldTitle": "Издөө текстинин талаасы",
"demoCupertinoPicker": "Тандагыч",
"demoCupertinoSearchTextFieldSubtitle": "iOS стилиндеги издөө текстинин талаасы",
"demoCupertinoSearchTextFieldDescription": "Колдонуучуга текстти терип издөө, сунуштарды көрүү жана аларды чыпкалоо мүмкүндүгүн берген издөө текстинин талаасы.",
"demoCupertinoSearchTextFieldPlaceholder": "Бир текстти териңиз",
"demoCupertinoScrollbarTitle": "Сыдыруу тилкеси",
"demoCupertinoScrollbarSubtitle": "iOS стилиндеги сыдыруу тилкеси",
"demoCupertinoScrollbarDescription": "Сыдыруу тилкеси башкы бетти ташыйт",
"demoTwoPaneItem": "Нерсе {value}",
"demoTwoPaneList": "Тизме",
"demoTwoPaneFoldableLabel": "Бүктөлүүчү",
"demoTwoPaneSmallScreenLabel": "Кичине экран",
"demoTwoPaneSmallScreenDescription": "TwoPane экраны кичинекей түзмөктөрдө ушинтип иштейт.",
"demoTwoPaneTabletLabel": "Планшет / Иш такта",
"demoTwoPaneTabletDescription": "TwoPane планшет же иш такта сыяктуу экраны чоңураак түзмөктөрдө ушинтип иштейт.",
"demoTwoPaneTitle": "TwoPane",
"demoTwoPaneSubtitle": "Бүктөлүүчү, чоң жана кичине экрандарга туура келүүчү калыптар",
"splashSelectDemo": "Демо версияны тандоо",
"demoTwoPaneFoldableDescription": "TwoPane бүктөлүүчү түзмөктө ушинтип иштейт.",
"demoTwoPaneDetails": "Чоо-жайы",
"demoTwoPaneSelectItem": "Нерсе тандоо",
"demoTwoPaneItemDetails": "Нерсенин {value} чоо-жайы",
"demoCupertinoContextMenuActionText": "Контексттик менюну көрүү үчүн Flutter логотибин коё бербей басып турңуз.",
"demoCupertinoContextMenuDescription": "iOS стилиндеги толук экрандагы контексттик меню элементти коё бербей басып турганда пайда болот.",
"demoAppBarTitle": "Колдонмонун тилкеси",
"demoAppBarDescription": "Колдонмонун тилкесинде учурдагы экранга байланыштуу контент жана аракеттер көрсөтүлөт. Ал брендди түзүү, экрандардын аталыштары, өтүү жана аракеттер үчүн колдонулат",
"demoDividerTitle": "Бөлгүч",
"demoDividerSubtitle": "Бөлгүч — тизмелердеги жана калыптардагы контентти топтоо үчүн колдонулган ичке сызык.",
"demoDividerDescription": "Бөлгүчтөр тизмелерде, суурмаларда жана башка жерлерде контентти бөлүү үчүн колдонулат.",
"demoVerticalDividerTitle": "Вертикалдык бөлгүч",
"demoCupertinoContextMenuTitle": "Контексттик меню",
"demoCupertinoContextMenuSubtitle": "iOS стилиндеги контексттик меню",
"demoAppBarSubtitle": "Учурдагы экранга байланыштуу маалыматты жана аракеттерди көрсөтөт",
"demoCupertinoContextMenuActionOne": "Биринчи аракет",
"demoCupertinoContextMenuActionTwo": "Экинчи аракет",
"demoDateRangePickerDescription": "Material Design даталар диапазонун тандагыч камтылган диалогду көрсөтөт.",
"demoDateRangePickerTitle": "Даталар диапазонун тандагыч",
"demoNavigationDrawerUserName": "Колдонуучунун аты",
"demoNavigationDrawerUserEmail": "[email protected]",
"demoNavigationDrawerText": "Суурманы көрүү үчүн кырын сүрүңүз же жогорку сол жактагы сүрөтчөнү басып коюңуз",
"demoNavigationRailTitle": "Өтүү тилкеси",
"demoNavigationRailSubtitle": "Колдонмодогу өтүү тилкеси көрсөтүлүүдө",
"demoNavigationRailDescription": "Аз сандагы, адатта үчтөн бешке чейинки, көрүнүштөрдүн ортосунда солго же оңго өтүү үчүн колдонулган материалдык виджет.",
"demoNavigationRailFirst": "Биринчи",
"demoNavigationDrawerTitle": "Чабыттоо суурмасы",
"demoNavigationRailThird": "Үчүнчү",
"replyStarredLabel": "Белгиленгендер",
"demoTextButtonDescription": "Текст баскычын басканда сыя чыгат, бирок баскыч көтөрүлбөйт. Текст баскычтарын куралдар тилкелеринде, диалогдордо жана кемтик менен бирге колдонуңуз",
"demoElevatedButtonTitle": "Көтөрүлгөн баскыч",
"demoElevatedButtonDescription": "Көтөрүлгөн баскычтар көбүнчө түз калыптарга чен-өлчөм кошот. Алар бош эмес же кең мейкиндиктердеги функциялар болуп эсептелет.",
"demoOutlinedButtonTitle": "Контурланган баскыч",
"demoOutlinedButtonDescription": "Контурланган баскычтар басылганда алар тунук эмес болуп, көтөрүлүп калат. Алар көп учурда көтөрүлгөн баскычтар менен жупташтырылып, альтернативдүү жана кошумча аракетти билдирет.",
"demoContainerTransformDemoInstructions": "Кыйытмалар, тизмелер жана КАБ",
"demoNavigationDrawerSubtitle": "Суурма колдонмонун тилкесинде көрсөтүлүүдө",
"replyDescription": "Натыйжалуу жана пайдалуу электрондук почта колдонмосу",
"demoNavigationDrawerDescription": "Колдонмодогу шилтемелер көрсөтүлгөн, экрандын кырында жайгашан горизонталдык багытта сүрүлгөн Material Design панели.",
"replyDraftsLabel": "Долбоорлор",
"demoNavigationDrawerToPageOne": "Биринчи нерсе",
"replyInboxLabel": "Келген каттар кутусу",
"demoSharedXAxisDemoInstructions": "Кийинки жана артка баскычтары",
"replySpamLabel": "Спам",
"replyTrashLabel": "Таштанды",
"replySentLabel": "Жөнөтүлдү",
"demoNavigationRailSecond": "Экинчи",
"demoNavigationDrawerToPageTwo": "Экинчи нерсе",
"demoFadeScaleDemoInstructions": "Модалдык тилке жана КАБ",
"demoFadeThroughDemoInstructions": "Ылдый өтүү",
"demoSharedZAxisDemoInstructions": "Параметрлердин сүрөтчөсү баскычы",
"demoSharedYAxisDemoInstructions": "\"Акыркы ойнолгондор\" боюнча иреттөө",
"demoTextButtonTitle": "Текст баскычы",
"demoSharedZAxisBeefSandwichRecipeTitle": "Уй этинен жасалган сэндвич",
"demoSharedZAxisDessertRecipeDescription": "Десерттин рецепти",
"demoSharedYAxisAlbumTileSubtitle": "Аткаруучу",
"demoSharedYAxisAlbumTileTitle": "Альбом",
"demoSharedYAxisRecentSortTitle": "Акыркы ойнотулгандар",
"demoSharedYAxisAlphabeticalSortTitle": "А-Я",
"demoSharedYAxisAlbumCount": "268 альбом",
"demoSharedYAxisTitle": "Бөлүшүлгөн y-огу",
"demoSharedXAxisCreateAccountButtonText": "АККАУНТ ТҮЗҮҮ",
"demoFadeScaleAlertDialogDiscardButton": "ӨЧҮРҮҮ",
"demoSharedXAxisSignInTextFieldLabel": "Электрондук почта дареги же телефон номери",
"demoSharedXAxisSignInSubtitleText": "Аккаунтуңуз менен кириңиз",
"demoSharedXAxisSignInWelcomeText": "Салам, David Park",
"demoSharedXAxisIndividualCourseSubtitle": "Жалгыздан көрсөтүлүүдө",
"demoSharedXAxisBundledCourseSubtitle": "Таңылган",
"demoFadeThroughAlbumsDestination": "Альбомдор",
"demoSharedXAxisDesignCourseTitle": "Жасалгалоо",
"demoSharedXAxisIllustrationCourseTitle": "Иллюстрация",
"demoSharedXAxisBusinessCourseTitle": "Ишкердик",
"demoSharedXAxisArtsAndCraftsCourseTitle": "Өнөр жана устачылык",
"demoMotionPlaceholderSubtitle": "Кошумча текст",
"demoFadeScaleAlertDialogCancelButton": "ЖОККО ЧЫГАРУУ",
"demoFadeScaleAlertDialogHeader": "Шашылыш билдирүү диалогу",
"demoFadeScaleHideFabButton": "КАБ'ДЫ ЖАШЫРУУ",
"demoFadeScaleShowFabButton": "КАБ'ДЫ КӨРСӨТҮҮ",
"demoFadeScaleShowAlertDialogButton": "МОДАЛДЫК ДИАЛОГДУ КӨРСӨТҮҮ",
"demoFadeScaleDescription": "Бозоруу шаблону экрандын чегинин ичиндеги колдонуучу интерфейсинин кирүүчү же чыгуучу элементтери үчүн колдонулат. Мисалы, экрандын борборундагы өңү бозоруп барып көрүнбөй калган диалог.",
"demoFadeScaleTitle": "Бозоруу",
"demoFadeThroughTextPlaceholder": "123 сүрөттөр",
"demoFadeThroughSearchDestination": "Издөө",
"demoFadeThroughPhotosDestination": "Фото",
"demoSharedXAxisCoursePageSubtitle": "Таңылган категориялар түрмөгүңүздө топтор катары көрүнөт. Муну кийин каалаган убакта өзгөртүп алсаңыз болот.",
"demoFadeThroughDescription": "Ортосунан баштап бозоруу шаблону колдонуучу интерфейсинин бири-бирине болгон күчтүү байланышы жок элеметтерин өзгөртүү үчүн колдонулат.",
"demoFadeThroughTitle": "Ортосунан баштап бозоруу",
"demoSharedZAxisHelpSettingLabel": "Жардам",
"demoMotionSubtitle": "Бардык алдын ала аныкталган өтмө шаблондор",
"demoSharedZAxisNotificationSettingLabel": "Билдирмелер",
"demoSharedZAxisProfileSettingLabel": "Профиль",
"demoSharedZAxisSavedRecipesListTitle": "Сакталган рецепттер",
"demoSharedZAxisBeefSandwichRecipeDescription": "Уй этинен жасалган сэндвичтин рецепти",
"demoSharedZAxisCrabPlateRecipeDescription": "Крабдан жасалган тамактын рецепти",
"demoSharedXAxisCoursePageTitle": "Курстарыңызды жөнөкөйлөтүңүз",
"demoSharedZAxisCrabPlateRecipeTitle": "Краб",
"demoSharedZAxisShrimpPlateRecipeDescription": "Креветкадан жасалган тамактын рецепти",
"demoSharedZAxisShrimpPlateRecipeTitle": "Креветка",
"demoContainerTransformTypeFadeThrough": "ОРТОСУНАН БАШТАП БОЗОРУУ",
"demoSharedZAxisDessertRecipeTitle": "Десерт",
"demoSharedZAxisSandwichRecipeDescription": "Сэндвичтин рецепти",
"demoSharedZAxisSandwichRecipeTitle": "Сэндвич",
"demoSharedZAxisBurgerRecipeDescription": "Бургердин рецепти",
"demoSharedZAxisBurgerRecipeTitle": "Бургер",
"demoSharedZAxisSettingsPageTitle": "Параметрлер",
"demoSharedZAxisTitle": "Бөлүшүлгөн z-огу",
"demoSharedZAxisPrivacySettingLabel": "Купуялык",
"demoMotionTitle": "Кыймыл",
"demoContainerTransformTitle": "Контейнерди трансформациялоо",
"demoContainerTransformDescription": "Контейнерди өзгөртүү шаблону колдонуучу интерфейсинин контейнер камтылган элементтерин өзгөртүү үчүн түзүлгөн. Бул шаблон колдонуучу интерфейсинин элементтеринин ортосундагы көрүнүктүү байланышты түзөт",
"demoContainerTransformModalBottomSheetTitle": "Бозоруу режими",
"demoContainerTransformTypeFade": "БОЗОРУУ",
"demoSharedYAxisAlbumTileDurationUnit": "мүн",
"demoMotionPlaceholderTitle": "Аталышы",
"demoSharedXAxisForgotEmailButtonText": "ЭЛЕКТРОНДУК ПОЧТА ДАРЕГИН УНУТУП КАЛДЫҢЫЗБЫ?",
"demoMotionSmallPlaceholderSubtitle": "Кошумча",
"demoMotionDetailsPageTitle": "Чоо-жайынын баракчасы",
"demoMotionListTileTitle": "Тизмедеги нерсе",
"demoSharedAxisDescription": "Бөлүшүлгөн ок шаблону колдонуучу интерфейсинин мейкиндик же чабыттоо катнашы бар элементтерин өзгөртүү үчүн колдонулат. Бул шаблон x, y, же z огунда элементтердин арасындагы байланышты күчүнө киргизүү үчүн, бөлүшүлгөн трансформацияны колдонот.",
"demoSharedXAxisTitle": "Бөлүшүлгөн x-огу",
"demoSharedXAxisBackButtonText": "АРТКА",
"demoSharedXAxisNextButtonText": "КИЙИНКИ",
"demoSharedXAxisCulinaryCourseTitle": "Кулинария",
"githubRepo": "{repoName} GitHub сактоочу жайы",
"fortnightlyMenuUS": "АКШ",
"fortnightlyMenuBusiness": "Ишкердик",
"fortnightlyMenuScience": "Илим",
"fortnightlyMenuSports": "Спорт",
"fortnightlyMenuTravel": "Саякат",
"fortnightlyMenuCulture": "Маданият",
"fortnightlyTrendingTechDesign": "Техникалык дизайн",
"rallyBudgetDetailAmountLeft": "Калган сумма",
"fortnightlyHeadlineArmy": "Жашыл армиянын ичинен реформалоо",
"fortnightlyDescription": "Мазмунга басым жасаган жаңылыктар колдонмосу",
"rallyBillDetailAmountDue": "Төлөнүүчү сумма",
"rallyBudgetDetailTotalCap": "Жалпы чек",
"rallyBudgetDetailAmountUsed": "Сарпталган сумма",
"fortnightlyTrendingHealthcareRevolution": "Саламаттыкты сактоодогу революция",
"fortnightlyMenuFrontPage": "Башкы бет",
"fortnightlyMenuWorld": "Дүйнө",
"rallyBillDetailAmountPaid": "Төлөнгөн сумма",
"fortnightlyMenuPolitics": "Саясат",
"fortnightlyHeadlineBees": "Чарбалык аарылар дефицитте болууда",
"fortnightlyHeadlineGasoline": "Газдын келечеги",
"fortnightlyTrendingGreenArmy": "Жашыл армия",
"fortnightlyHeadlineFeminists": "Феминисттер партизандык согуш жүргүзүүдө",
"fortnightlyHeadlineFabrics": "Футуристтик кездемелерди даярдоодо дизайнерлер жаңы технологияларды колдонушат",
"fortnightlyHeadlineStocks": "Акциялардын стагнациясы учурунда көп адамдар валютага көз салышат",
"fortnightlyTrendingReform": "Реформа",
"fortnightlyMenuTech": "Техника",
"fortnightlyHeadlineWar": "Согуш учурунда бөлүнүп калган америкалык адамдардын тагдырлары",
"fortnightlyHeadlineHealthcare": "Тынч, бирок күчтүү Саламаттыкты сактоодогу революция",
"fortnightlyLatestUpdates": "Эң акыркы жаңылыктар",
"fortnightlyTrendingStocks": "Акциялар",
"rallyBillDetailTotalAmount": "Жалпы сумма",
"demoCupertinoPickerDateTime": "Күнү жана убакыты",
"signIn": "КИРҮҮ",
"dataTableRowWithSugar": "Кант кошулган {value}",
"dataTableRowApplePie": "Алма пирогу",
"dataTableRowDonut": "Пончик",
"dataTableRowHoneycomb": "Аары уюгу",
"dataTableRowLollipop": "Чупачупс",
"dataTableRowJellyBean": "Килкилдек момпосуй",
"dataTableRowGingerbread": "Имбир",
"dataTableRowCupcake": "Кекс",
"dataTableRowEclair": "Эклер",
"dataTableRowIceCreamSandwich": "Балмуздак сендвичи",
"dataTableRowFrozenYogurt": "Тоңдурулган йогурт",
"dataTableColumnIron": "Темир (%)",
"dataTableColumnCalcium": "Кальций (%)",
"dataTableColumnSodium": "Натрий (мг.)",
"demoTimePickerTitle": "Убакыт тандагыч",
"demo2dTransformationsResetTooltip": "Өзгөртүүлөрдү баштапкы абалга келтирүү",
"dataTableColumnFat": "Май (г.)",
"dataTableColumnCalories": "Калориялар",
"dataTableColumnDessert": "Десерт (1 порция)",
"cardsDemoTravelDestinationLocation1": "Танжавур, Тамилнад",
"demoTimePickerDescription": "Material Design убакыт тандагычы камтылган диалогду көрсөтөт.",
"demoPickersShowPicker": "ТАНДАГЫЧТЫ КӨРСӨТҮҮ",
"demoTabsScrollingTitle": "Сыдырылма",
"demoTabsNonScrollingTitle": "Сыдырылма эмес",
"craneHours": "{hours,plural,=1{1 с.}other{{hours} с.}}",
"craneMinutes": "{minutes,plural,=1{1 мүн.}other{{minutes} мүн.}}",
"craneFlightDuration": "{hoursShortForm} {minutesShortForm}",
"dataTableHeader": "Тамактануу",
"demoDatePickerTitle": "Күн тандагыч",
"demoPickersSubtitle": "Күн менен убакытты тандоо",
"demoPickersTitle": "Тандагычтар",
"demo2dTransformationsEditTooltip": "Мозаиканы түзөтүү",
"demoDataTableDescription": "Маалымат жадыбалдарында маалымат саптар менен тилкелерден турган торчонун форматында берилет. Аларда маалымат текшерүүгө оңой жолдо иреттелип, колдонуучулар үлгүлөрдү жана статистиканы оңой таба алышат.",
"demo2dTransformationsDescription": "Мозаиканы түзөтүү үчүн таптап, көрүнүштөрдү жаңсап жылдырыңыз. Жылдырып кароо үчүн сүйрөңүз, чоңойтуп/кичирейтүү үчүн эки манжаңызды бириктириңиз жана эки манжаңыз менен буруңуз. Баштапкы багытка кайтаруу үчүн \"Баштапкы абалга келтирүү\" баскычын басыңыз.",
"demo2dTransformationsSubtitle": "Жылдырып кароо, чоңойтуп/кичирейтүү, буруу",
"demo2dTransformationsTitle": "2D өзгөрүүлөрү",
"demoCupertinoTextFieldPIN": "PIN код",
"demoCupertinoTextFieldDescription": "Текст киргизүүчү талаа колдонуучуга текстти, кадимки же экрандагы баскычтоп менен киргизүүгө мүмкүнчүлүк берет.",
"demoCupertinoTextFieldSubtitle": "iOS стилиндеги текст талаалары",
"demoCupertinoTextFieldTitle": "Текст киргизилүүчү талаалар",
"demoDatePickerDescription": "Material Design күн тандагычы камтылган диалогду көрсөтөт.",
"demoCupertinoPickerTime": "Качан",
"demoCupertinoPickerDate": "Күн",
"demoCupertinoPickerTimer": "Таймер",
"demoCupertinoPickerDescription": "iOS стилиндеги саптарды, күндөрдү, убакыттарды же күн менен убакытты тандагыч виджети.",
"demoCupertinoPickerSubtitle": "iOS стилиндеги тандагыч",
"demoCupertinoPickerTitle": "Тандагычтар",
"dataTableRowWithHoney": "Бал кошулган {value}",
"cardsDemoTravelDestinationCity2": "Четтинад",
"bannerDemoResetText": "Көрнөк-жарнакты баштапкы абалга келтирүү",
"bannerDemoMultipleText": "Бир нече аракет",
"bannerDemoLeadingText": "Көрсөтмө сүрөтчөсү",
"dismiss": "ЧЕТКЕ КАГУУ",
"cardsDemoTappable": "Таптап коюу мүмкүн",
"cardsDemoSelectable": "Тандалуучу (кое бербей басып туруу)",
"cardsDemoExplore": "Изилдөө",
"cardsDemoExploreSemantics": "Төмөнкүнү изилдөө: {destinationName}",
"cardsDemoShareSemantics": "Төмөнкүнү бөлүшүү: {destinationName}",
"cardsDemoTravelDestinationTitle1": "Тамилнадда бара турган мыкты 10 шаар",
"cardsDemoTravelDestinationDescription1": "10-номер",
"cardsDemoTravelDestinationCity1": "Танжавур",
"dataTableColumnProtein": "Протеин (г.)",
"cardsDemoTravelDestinationTitle2": "Түштүк Индиянын усталары",
"cardsDemoTravelDestinationDescription2": "Жибек жасоочулар",
"bannerDemoText": "Сырсөзүңүз башка түзмөктө жаңырган. Кайра кириңиз.",
"cardsDemoTravelDestinationLocation2": "Сиваганга, Тамилнад",
"cardsDemoTravelDestinationTitle3": "Брахадисвара сыйынуучу жайы",
"cardsDemoTravelDestinationDescription3": "Сыйынуучу жайлар",
"demoBannerTitle": "Көрнөк-жарнак",
"demoBannerSubtitle": "Тизмедеги көрнөк-жарнак көрсөтүлүүдө",
"demoBannerDescription": "Көрнөк-жарнакта маанилүү жана кыска, колдонуучуларды белгилүү бир аракетке үндөгөн билдирүү (же көрнөк-жарнакты жабуу тандоосу) көрүнөт. Аны колдонуучу жаба алат.",
"demoCardTitle": "Карталар",
"demoCardSubtitle": "Четтери тегеректелген баштапкы карталар",
"demoCardDescription": "Картада Material камтылган барак көрсөтүлүп, анда тийиштүү маалымат берилет, мисалы, альбом, географиялык жер, тамак-аш, байланыштын чоо-жайы, ж.б.",
"demoDataTableTitle": "Маалымат жадыбалдары",
"demoDataTableSubtitle": "Маалымат камтылган саптар жана тилкелер",
"dataTableColumnCarbs": "Углеводдор (г.)",
"placeTanjore": "Танжавур",
"demoGridListsTitle": "Торчо тизмелери",
"placeFlowerMarket": "Гүл базары",
"placeBronzeWorks": "Колодон жасалган буюмдар",
"placeMarket": "Базар",
"placeThanjavurTemple": "Танжавур сыйынуучу жайы",
"placeSaltFarm": "Туз фермасы",
"placeScooters": "Скутерлер",
"placeSilkMaker": "Жибек жасоочу",
"placeLunchPrep": "Түшкү тамакты даярдоо",
"placeBeach": "Кумжээк",
"placeFisherman": "Балыкчы",
"demoMenuSelected": "Тандалды: {value}",
"demoMenuRemove": "Өчүрүү",
"demoMenuGetLink": "Шилтеме алуу",
"demoMenuShare": "Бөлүшүү",
"demoBottomAppBarSubtitle": "Чабыттоону жана аракеттерди ылдый жакта көрсөтөт",
"demoMenuAnItemWithASectionedMenu": "Бөлүмдөр менюсундагы элемент",
"demoMenuADisabledMenuItem": "Менюдагы элемент өчүрүлдү",
"demoLinearProgressIndicatorTitle": "Түз кыймылдын аткарылышынын индикатору",
"demoMenuContextMenuItemOne": "Контексттик менюдагы биринчи элемент",
"demoMenuAnItemWithASimpleMenu": "Жөнөкөй менюдагы элемент",
"demoCustomSlidersTitle": "Ыңгайлаштырылган сыдырмалар",
"demoMenuAnItemWithAChecklistMenu": "Тизме менюсундагы элемент",
"demoCupertinoActivityIndicatorTitle": "Аракет индикатору",
"demoCupertinoActivityIndicatorSubtitle": "iOS стилиндеги аракеттердин индикаторлору",
"demoCupertinoActivityIndicatorDescription": "Сааттын жебеси боюнча айланган iOS стилиндеги аракеттердин индикатору.",
"demoCupertinoNavigationBarTitle": "Чабыттоо тилкеси",
"demoCupertinoNavigationBarSubtitle": "iOS стилиндеги чабыттоо тилкеси",
"demoCupertinoNavigationBarDescription": "iOS стилиндеги чабыттоо менюсу. Чабыттоо тилкеси – кеминде ортосунда барактын аталышы көрсөтүлгөн тилке.",
"demoCupertinoPullToRefreshTitle": "Жаңыртуу үчүн ылдый тартыңыз",
"demoCupertinoPullToRefreshSubtitle": "iOS стилиндеги жаңыртуу үчүн ылдый тартуу көзөмөлү",
"demoCupertinoPullToRefreshDescription": "iOS стилиндеги жаңыртуу үчүн ылдый тартуу көзөмөлүн иштеткен виджет",
"demoProgressIndicatorTitle": "Аткарылыштын индикаторлору",
"demoProgressIndicatorSubtitle": "Түз кыймыл, тегеренме кыймыл, белгисиз",
"demoCircularProgressIndicatorTitle": "Тегеренме кыймылдын аткарылышынын индикатору",
"demoCircularProgressIndicatorDescription": "Material Design тегеренме кыймылдын аткарылышынын индикатору колдонмо иштеп жатканын көрсөтүп, айланат.",
"demoMenuFour": "Төрт",
"demoLinearProgressIndicatorDescription": "Material Design түз кыймылдын аткарылышынын индикатору \"аткаруу көрсөткүчү\" катары да белгилүү.",
"demoTooltipTitle": "Калкып чыгуучу кеңештер",
"demoTooltipSubtitle": "Коё бербей басып турганда же үстүнө алып келгенде көрсөтүлгөн кыска билдирүү",
"demoTooltipDescription": "Калкып чыгуучу кеңештер баскычтын же колдонуучунун интерфейсиндеги башка аракеттин функциясын түшүндүргөн тексттер. Калкып чыгуучу кеңештер колдонуучу чычканды элементтин үстүнө алып келгенде, элементти тандаганда же коё бербей басып турганда көрсөтүлүүчү маалымат камтылган текст.",
"demoTooltipInstructions": "Калкып чыгуучу кеңешти көрүү үчүн коё бербей басып туруңуз же чычканды элементтин үстүнө алып келиңиз.",
"placeChennai": "Ченнаи",
"demoMenuChecked": "Белгиленди: {value}",
"placeChettinad": "Четтинад",
"demoMenuPreview": "Алдын ала көрүү",
"demoBottomAppBarTitle": "Колдонмонун ылдый жакта жайгашкан тилкеси",
"demoBottomAppBarDescription": "Колдонмолордун ылдый жакта жайгашкан тилкелери төмөндө жайгашкан чабыттоо суурмаларын колдонуп, төрт аракетке чейин, анын ичинде калкыма аракеттер баскычын кошууга мүмкүнчүлүк берет.",
"bottomAppBarNotch": "Белги",
"bottomAppBarPosition": "Калкыма аракеттер баскычынын абалы",
"bottomAppBarPositionDockedEnd": "Туташтырылды - Аягы",
"bottomAppBarPositionDockedCenter": "Туташтырылды - Борбору",
"bottomAppBarPositionFloatingEnd": "Калкыма - Аягы",
"bottomAppBarPositionFloatingCenter": "Калкыма - Борбору",
"demoSlidersEditableNumericalValue": "Түзөтүлүүчү сан",
"demoGridListsSubtitle": "Катар менен тилкенин калыбы",
"demoGridListsDescription": "Торчо тизмелери бир түрдүү маалыматты, адатта сүрөттөрдү көрсөтүү үчүн ыңгайлуу. Ар бир торчодогу нерсе \"мозаика\" деп аталат.",
"demoGridListsImageOnlyTitle": "Сүрөт гана",
"demoGridListsHeaderTitle": "Жогорку колонтитул менен",
"demoGridListsFooterTitle": "Төмөнкү колонтитул менен",
"demoSlidersTitle": "Сыдырмалар",
"demoSlidersSubtitle": "Экранды сүрүп, маанини тандоо виджеттери",
"demoSlidersDescription": "Сыдырмалардын жардамы менен, колдонуучулар тилкеде көрсөтүлгөн маанилердин диапазонунан бир маанини тандай алышат. Алар үндүн көлөмүн, экрандын жарыктыгын же сүрөттүн чыпкаларын колдонууда абдан пайдалуу.",
"demoRangeSlidersTitle": "Диапазон сыдырмалары",
"demoRangeSlidersDescription": "Сыдырмалар тилкедеги маанилердин диапазонун чагылдырып турат. Сыдырмалардын эки жагында маанилердин диапазонун чагылдырган сүрөтчөлөрдүн тилкеси бар. Алар үндүн көлөмүн, экрандын жарыктыгын же сүрөттүн чыпкаларын колдонууда абдан пайдалуу.",
"demoMenuAnItemWithAContextMenuButton": "Контексттик менюдагы элемент",
"demoCustomSlidersDescription": "Сыдырмалардын жардамы менен, колдонуучулар тилкеде көрсөтүлгөн маанилердин диапазонунан бир же бир нече маанини тандай алышат. Сыдырмалар темаларга бөлүштүрүлгөн жана ыңгайлаштырылган болушу мүмкүн.",
"demoSlidersContinuousWithEditableNumericalValue": "Үзгүлтүксүз жана түзөтүлүүчү сан",
"demoSlidersDiscrete": "Дискреттик",
"demoSlidersDiscreteSliderWithCustomTheme": "Ыңгайлаштырылган темаларга бөлүнгөн дискреттик сыдырма",
"demoSlidersContinuousRangeSliderWithCustomTheme": "Ыңгайлаштырылган темаларга бөлүнгөн үзгүлтүксүз маанилер камтылган сыдырма",
"demoSlidersContinuous": "Үзгүлтүксүз",
"placePondicherry": "Путтуччери",
"demoMenuTitle": "Меню",
"demoContextMenuTitle": "Мазмундук меню",
"demoSectionedMenuTitle": "Бөлүмдөр менюсу",
"demoSimpleMenuTitle": "Жөнөкөй меню",
"demoChecklistMenuTitle": "Тизме менюсу",
"demoMenuSubtitle": "Менюнун баскычтары жана жөнөкөй менюлар",
"demoMenuDescription": "Менюда убактылуу беттеги тандоолордун тизмеси көрүнөт. Алар колдонуучу баскычты басканда, аракетти аткарганда же башка башкаруу элементтерин колдонгондо көрүнөт.",
"demoMenuItemValueOne": "Менюдагы биринчи элемент",
"demoMenuItemValueTwo": "Менюдагы экинчи элемент",
"demoMenuItemValueThree": "Менюдагы үчүнчү элемент",
"demoMenuOne": "Бир",
"demoMenuTwo": "Эки",
"demoMenuThree": "Үч",
"demoMenuContextMenuItemThree": "Контексттик менюдагы үчүнчү элемент",
"demoCupertinoSwitchSubtitle": "iOS стилиндеги өзгөчө которгуч",
"demoSnackbarsText": "Бул маалымат тактасы.",
"demoCupertinoSliderSubtitle": "iOS стилиндеги сыдырма",
"demoCupertinoSliderDescription": "Сыдырманы үзгүлтүксүз же дискреттик маанилерди тандоо үчүн колдонууга болот.",
"demoCupertinoSliderContinuous": "Үзгүлтүксүз: {value}",
"demoCupertinoSliderDiscrete": "Дискреттик: {value}",
"demoSnackbarsAction": "Маалымат тактасындагы аракетти бастыңыз.",
"backToGallery": "Галереяга кайтуу",
"demoCupertinoTabBarTitle": "Өтмөк тилкеси",
"demoCupertinoSwitchDescription": "Өзгөчө которгуч жалгыз жөндөөнүн абалын күйгүзүү/өчүрүү үчүн колдонулат.",
"demoSnackbarsActionButtonLabel": "АРАКЕТ",
"cupertinoTabBarProfileTab": "Профиль",
"demoSnackbarsButtonLabel": "МААЛЫМАТ ТАКТАСЫН КӨРСӨТҮҮ",
"demoSnackbarsDescription": "Маалымат такталары колдонмо аткарган же аткарганы жаткан процесс тууралуу кабарлап турушат. Алар экрандын ылдый жагында убактылуу пайда болушат. Алар колдонуучуга тоскоол болушпайт жана өздөрү эле көрүнбөй калышат.",
"demoSnackbarsSubtitle": "Маалымат такталары билдирүүлөрдү экрандын ылдый жагында көрсөтөт",
"demoSnackbarsTitle": "Маалымат такталары",
"demoCupertinoSliderTitle": "Сыдырма",
"cupertinoTabBarChatTab": "Чат",
"cupertinoTabBarHomeTab": "Башкы бет",
"demoCupertinoTabBarDescription": "iOS стилиндеги ылдый жакта жайгашкан чабыттоо өтмөгүнүн тилкеси. Демейки катары биринчи өтмөк жигердүү болгон бир нече өтмөктү көрсөтөт.",
"demoCupertinoTabBarSubtitle": "iOS стилиндеги ылдый жакта жайгашкан өтмөк тилкеси",
"demoOptionsFeatureTitle": "Параметрлерди көрүү",
"demoOptionsFeatureDescription": "Бул демо версиядагы жеткиликтүү параметрлерди көрүү үчүн бул жерди таптап коюңуз.",
"demoCodeViewerCopyAll": "БААРЫН КӨЧҮРҮҮ",
"shrineScreenReaderRemoveProductButton": "{product} алып салуу",
"shrineScreenReaderProductAddToCart": "Арабага кошуу",
"shrineScreenReaderCart": "{quantity,plural,=0{Арабада эч нерсе жок}=1{Арабада 1 нерсе бар}other{Арабада {quantity} нерсе бар}}",
"demoCodeViewerFailedToCopyToClipboardMessage": "Алмашуу буферине көчүрүлгөн жок: {error}",
"demoCodeViewerCopiedToClipboardMessage": "Алмашуу буферине көчүрүлдү.",
"craneSleep8SemanticLabel": "Жээктеги асканын үстүндөгү Майя цивилизациясынын урандылары",
"craneSleep4SemanticLabel": "Тоолордун этегиндеги көлдүн жеегинде жайгашкан мейманкана",
"craneSleep2SemanticLabel": "Мачу-Пичу цитадели",
"craneSleep1SemanticLabel": "Карга жамынган жашыл дарактардын арасындагы шале",
"craneSleep0SemanticLabel": "Суунун үстүндө жайгашкан бунгалолор",
"craneFly13SemanticLabel": "Пальма бактары бар деңиздин жээгиндеги бассейн",
"craneFly12SemanticLabel": "Пальмалары бар бассейн",
"craneFly11SemanticLabel": "Деңиздеги кирпичтен курулган маяк",
"craneFly10SemanticLabel": "Аль-Ажар мечитинин мунаралары күн баткан учурда",
"craneFly9SemanticLabel": "Антиквардык көк унаага таянган киши",
"craneFly8SemanticLabel": "Супертри багы",
"craneEat9SemanticLabel": "Кафедеги таттуу азыктар коюлган текче",
"craneEat2SemanticLabel": "Бургер",
"craneFly5SemanticLabel": "Тоолордун этегиндеги көлдүн жеегинде жайгашкан мейманкана",
"demoSelectionControlsSubtitle": "Белгилөө кутучалары, радио баскычтар жана которуштургучтар",
"craneEat10SemanticLabel": "Бастурма менен жасалган чоң сэндвич кармаган аял",
"craneFly4SemanticLabel": "Суунун үстүндө жайгашкан бунгалолор",
"craneEat7SemanticLabel": "Наабайканага кире бериш",
"craneEat6SemanticLabel": "Креветкадан жасалган тамак",
"craneEat5SemanticLabel": "Artsy ресторанындагы эс алуу аймагы",
"craneEat4SemanticLabel": "Шоколаддан жасалган десерт",
"craneEat3SemanticLabel": "Корей такосу",
"craneFly3SemanticLabel": "Мачу-Пичу цитадели",
"craneEat1SemanticLabel": "Жеңил тамак ичүүгө арналган бийик отургучтар коюлган бош бар",
"craneEat0SemanticLabel": "Жыгач отун менен меште бышырылган пицца",
"craneSleep11SemanticLabel": "Тайпейдеги 101 кабаттан турган асман тиреген бийик имарат",
"craneSleep10SemanticLabel": "Аль-Ажар мечитинин мунаралары күн баткан учурда",
"craneSleep9SemanticLabel": "Деңиздеги кирпичтен курулган маяк",
"craneEat8SemanticLabel": "Лангуст табагы",
"craneSleep7SemanticLabel": "Рибейра аянтындагы түстүү батирлер",
"craneSleep6SemanticLabel": "Пальмалары бар бассейн",
"craneSleep5SemanticLabel": "Талаадагы чатыр",
"settingsButtonCloseLabel": "Параметрлерди жабуу",
"demoSelectionControlsCheckboxDescription": "Белгилөө кутучалары колдонуучуга топтомдогу бир нече параметрди тандоо үчүн керек. Кадимки белгилөө кутучасынын мааниси \"true\" же \"false\", ал эми үч абалды көрсөтүүчү белгилөө кутучасынын мааниси \"null\" болушу мүмкүн.",
"settingsButtonLabel": "Параметрлер",
"demoListsTitle": "Тизмелер",
"demoListsSubtitle": "Тизме калыптарын сыдыруу",
"demoListsDescription": "Адатта текст жана сүрөтчө камтылган, бийиктиги бекитилген жалгыз сап.",
"demoOneLineListsTitle": "Бир сап",
"demoTwoLineListsTitle": "Эки сап",
"demoListsSecondary": "Кошумча текст",
"demoSelectionControlsTitle": "Тандоону башкаруу каражаттары",
"craneFly7SemanticLabel": "Рашмор тоосу",
"demoSelectionControlsCheckboxTitle": "Белгилөө кутучасы",
"craneSleep3SemanticLabel": "Антиквардык көк унаага таянган киши",
"demoSelectionControlsRadioTitle": "Радио",
"demoSelectionControlsRadioDescription": "Радио баскычтар колдонуучуга топтомдогу бир параметрди тандоо үчүн керек. Эгер колдонуучу бардык жеткиликтүү параметрлерди катары менен көрсүн десеңиз, радио баскычтарды колдонуңуз.",
"demoSelectionControlsSwitchTitle": "Которулуу",
"demoSelectionControlsSwitchDescription": "Которгучтардын жардамы менен колдонуучу өзүнчө параметрди күйгүзүп жана өчүрө алат. Которгучтун жанында параметрдин аталышы жана абалы ачык көрсөтүлүшү керек.",
"craneFly0SemanticLabel": "Карга жамынган жашыл дарактардын арасындагы шале",
"craneFly1SemanticLabel": "Талаадагы чатыр",
"craneFly2SemanticLabel": "Кар жамынган тоонун алдындагы сыйынуу желектери",
"craneFly6SemanticLabel": "Көркөм өнөр сарайынын бийиктиктен көрүнүшү",
"rallySeeAllAccounts": "Бардык аккаунттарды көрүү",
"rallyBillAmount": "{amount} суммасындагы {billName} эсеби {date} төлөнүшү керек.",
"shrineTooltipCloseCart": "Арабаны жабуу",
"shrineTooltipCloseMenu": "Менюну жабуу",
"shrineTooltipOpenMenu": "Менюну ачуу",
"shrineTooltipSettings": "Параметрлер",
"shrineTooltipSearch": "Издөө",
"demoTabsDescription": "Өтмөктөр ар башка экрандардагы, дайындар топтомдорундагы жана башка аракеттердеги мазмунду иреттешет.",
"demoTabsSubtitle": "Өз-өзүнчө сыдырылма көрүнүштөрү бар өтмөктөр",
"demoTabsTitle": "Өтмөктөр",
"rallyBudgetAmount": "{budgetName} бюджетинен {amountUsed} өлчөмүндөгү сумма {amountTotal} үчүн сарпталып, {amountLeft} калды",
"shrineTooltipRemoveItem": "Нерсени алып салуу",
"rallyAccountAmount": "{accountNumber} номериндеги {accountName} аккаунтунда {amount} бар.",
"rallySeeAllBudgets": "Бардык бюджеттерди көрүү",
"rallySeeAllBills": "Бардык эсептерди көрүү",
"craneFormDate": "Күн тандоо",
"craneFormOrigin": "Учуп чыккан шаарды тандоо",
"craneFly2": "Хумбу өрөөнү, Непал",
"craneFly3": "Мачу-Пичу, Перу",
"craneFly4": "Мале, Мальдив аралдары",
"craneFly5": "Витзнау, Швейцария",
"craneFly6": "Мехико, Мексика",
"craneFly7": "Рашмор тоосу, Америка Кошмо Штаттары",
"settingsTextDirectionLocaleBased": "Тилдин негизинде",
"craneFly9": "Гавана, Куба",
"craneFly10": "Каир, Египет",
"craneFly11": "Лиссабон, Португалия",
"craneFly12": "Напа, Америка Кошмо Штаттары",
"craneFly13": "Бали, Индонезия",
"craneSleep0": "Мале, Мальдив аралдары",
"craneSleep1": "Аспен, Америка Кошмо Штаттары",
"craneSleep2": "Мачу-Пичу, Перу",
"demoCupertinoSegmentedControlTitle": "Сегменттер боюнча көзөмөлдөө",
"craneSleep4": "Витзнау, Швейцария",
"craneSleep5": "Биг-Сур, Америка Кошмо Штаттары",
"craneSleep6": "Напа, Америка Кошмо Штаттары",
"craneSleep7": "Порто, Португалия",
"craneSleep8": "Тулум, Мексика",
"craneEat5": "Сеул, Түштүк Корея",
"demoChipTitle": "Чиптер",
"demoChipSubtitle": "Киргизүүнү, атрибутту же аракетти көрсөткөн жыйнактуу элементтер",
"demoActionChipTitle": "Аракет чиби",
"demoActionChipDescription": "Аракет чиптери негизги мазмунга тийиштүү аракетти ишке киргизүүчү параметрлердин топтому. Аракет чиптери колдонуучунун интерфейсинде динамикалык жана мазмундук формада көрүнүшү керек.",
"demoChoiceChipTitle": "Тандоо чиби",
"demoChoiceChipDescription": "Тандоо чиптери топтомдогу бир тандоону көрсөтөт. Тандоо чиптери тийиштүү сүрөттөөчү текстти же категорияларды камтыйт.",
"demoFilterChipTitle": "Чыпкалоо чиби",
"demoFilterChipDescription": "Чыпка чиптери мазмунду чыпкалоо үчүн тэгдерди же сүрөттөөчү сөздөрдү колдонот.",
"demoInputChipTitle": "Киргизүү чиби",
"demoInputChipDescription": "Киргизүү чиптери объект (адам, жер же нерсе) же жазышуу тексти сыяктуу татаал маалыматты жыйнактуу формада көрсөтөт.",
"craneSleep9": "Лиссабон, Португалия",
"craneEat10": "Лиссабон, Португалия",
"demoCupertinoSegmentedControlDescription": "Бири-бирин четтеткен бир нече параметрдин ичинен тандоо үчүн колдонулат. Сегмент боюнча көзөмөлдөнгөн аракет үчүн бир параметр тандалганда башка параметрлерди тандоо мүмкүн болбой калат.",
"chipTurnOnLights": "Жарыкты күйгүзүү",
"chipSmall": "Кичине",
"chipMedium": "Орточо",
"chipLarge": "Чоң",
"chipElevator": "Лифт",
"chipWasher": "Жуугуч",
"chipFireplace": "Камин",
"chipBiking": "Велосипед тебүү",
"craneFormDiners": "Коноктор",
"rallyAlertsMessageUnassignedTransactions": "{count,plural,=1{Мүмкүн болгон салыктын өлчөмүн чоңойтуңуз! Белгиленбеген 1 транзакциянын категориясын белгилеңиз.}other{Мүмкүн болгон салыктын өлчөмүн чоңойтуңуз! Белгиленбеген {count} транзакциянын категориясын белгилеңиз.}}",
"craneFormTime": "Убакыт тандоо",
"craneFormLocation": "Жайгашкан жерди тандоо",
"craneFormTravelers": "Жүргүнчүлөр",
"craneEat8": "Атланта, Америка Кошмо Штаттары",
"craneFormDestination": "Бара турган жерди тандоо",
"craneFormDates": "Күндөрдү тандоо",
"craneFly": "УЧУУ",
"craneSleep": "УКТОО",
"craneEat": "ТАМАК-АШ",
"craneFlySubhead": "Аба каттамдарын бара турган жер боюнча изилдөө",
"craneSleepSubhead": "Жайларды бара турган жер боюнча изилдөө",
"craneEatSubhead": "Ресторандарды бара турган жер боюнча изилдөө",
"craneFlyStops": "{numberOfStops,plural,=0{Үзгүлтүксүз}=1{1 жолу токтойт}other{{numberOfStops} жолу токтойт}}",
"craneSleepProperties": "{totalProperties,plural,=0{Жеткиликтүү жайлар жок}=1{1 жеткиликтүү жай бар}other{{totalProperties} жеткиликтүү жай бар}}",
"craneEatRestaurants": "{totalRestaurants,plural,=0{Ресторандар жок}=1{1 ресторан}other{{totalRestaurants} ресторан}}",
"craneFly0": "Аспен, Америка Кошмо Штаттары",
"demoCupertinoSegmentedControlSubtitle": "iOS стилиндеги сегменттер боюнча көзөмөлдөө",
"craneSleep10": "Каир, Египет",
"craneEat9": "Мадрид, Испания",
"craneFly1": "Биг-Сур, Америка Кошмо Штаттары",
"craneEat7": "Нашвилл, Америка Кошмо Штаттары",
"craneEat6": "Сиетл, Америка Кошмо Штаттары",
"craneFly8": "Сингапур",
"craneEat4": "Париж, Франция",
"craneEat3": "Портлэнд, Америка Кошмо Штаттары",
"craneEat2": "Кордоба, Аргентина",
"craneEat1": "Даллас, Америка Кошмо Штаттары",
"craneEat0": "Неаполь, Италия",
"craneSleep11": "Тайпей, Тайвань",
"craneSleep3": "Гавана, Куба",
"shrineLogoutButtonCaption": "ЧЫГУУ",
"rallyTitleBills": "ЭСЕПТЕР",
"rallyTitleAccounts": "АККАУНТТАР",
"shrineProductVagabondSack": "Вагабонд кабы",
"rallyAccountDetailDataInterestYtd": "Үстөк YTD",
"shrineProductWhitneyBelt": "Уитни куру",
"shrineProductGardenStrand": "Бакча тирөөчү",
"shrineProductStrutEarrings": "Сөйкөлөр",
"shrineProductVarsitySocks": "Университет байпактары",
"shrineProductWeaveKeyring": "Токулма ачкычка таккыч",
"shrineProductGatsbyHat": "Гэтсби шляпасы",
"shrineProductShrugBag": "Ийинге асып алма баштык",
"shrineProductGiltDeskTrio": "Үч столдон турган топтом",
"shrineProductCopperWireRack": "Жез тордон жасалган тосмо",
"shrineProductSootheCeramicSet": "Керамика топтому",
"shrineProductHurrahsTeaSet": "Hurrahs чай сервиси",
"shrineProductBlueStoneMug": "Көк таштан жасалган кружка",
"shrineProductRainwaterTray": "Жаандын суусу үчүн батыныс",
"shrineProductChambrayNapkins": "Шамбрай майлыктары",
"shrineProductSucculentPlanters": "Ширелүү өсүмдүк өстүргүчтөр",
"shrineProductQuartetTable": "Квартет столу",
"shrineProductKitchenQuattro": "Кватро ашканасы",
"shrineProductClaySweater": "Свитер",
"shrineProductSeaTunic": "Деңиз туникасы",
"shrineProductPlasterTunic": "Туника",
"rallyBudgetCategoryRestaurants": "Ресторандар",
"shrineProductChambrayShirt": "Пахта көйнөгү",
"shrineProductSeabreezeSweater": "Деңиз свитери",
"shrineProductGentryJacket": "Жентри кемсели",
"shrineProductNavyTrousers": "Кара-көк шым",
"shrineProductWalterHenleyWhite": "Walter henley (ак)",
"shrineProductSurfAndPerfShirt": "Серфинг футболкасы",
"shrineProductGingerScarf": "Шарф",
"shrineProductRamonaCrossover": "Рамона кроссовери",
"shrineProductClassicWhiteCollar": "Классикалык ак жака",
"shrineProductSunshirtDress": "Жайкы көйнөк",
"rallyAccountDetailDataInterestRate": "Үстөк баасы",
"rallyAccountDetailDataAnnualPercentageYield": "Жылдык пайыздык киреше",
"rallyAccountDataVacation": "Эс алуу",
"shrineProductFineLinesTee": "Ичке сызыктуу футболка",
"rallyAccountDataHomeSavings": "Үйгө чогултулуп жаткан каражат",
"rallyAccountDataChecking": "Текшерилүүдө",
"rallyAccountDetailDataInterestPaidLastYear": "Өткөн жылы төлөнгөн пайыз",
"rallyAccountDetailDataNextStatement": "Кийинки билдирүү",
"rallyAccountDetailDataAccountOwner": "Аккаунттун ээси",
"rallyBudgetCategoryCoffeeShops": "Кофейнялар",
"rallyBudgetCategoryGroceries": "Азык-түлүк",
"shrineProductCeriseScallopTee": "Футболка",
"rallyBudgetCategoryClothing": "Кийим-кече",
"rallySettingsManageAccounts": "Аккаунттарды башкаруу",
"rallyAccountDataCarSavings": "Унаага чогултулуп жаткан каражат",
"rallySettingsTaxDocuments": "Салык документтери",
"rallySettingsPasscodeAndTouchId": "Өткөрүүчү код жана басуу идентификатору",
"rallySettingsNotifications": "Билдирмелер",
"rallySettingsPersonalInformation": "Жеке маалымат",
"rallySettingsPaperlessSettings": "Кагазсыз жөндөөлөр",
"rallySettingsFindAtms": "Банкоматтарды табуу",
"rallySettingsHelp": "Жардам",
"rallySettingsSignOut": "Чыгуу",
"rallyAccountTotal": "Жалпы",
"rallyBillsDue": "Мөөнөтү",
"rallyBudgetLeft": "Бюджетте калган сумма",
"rallyAccounts": "Аккаунттар",
"rallyBills": "Эсептер",
"rallyBudgets": "Бюджеттер",
"rallyAlerts": "Эскертүүлөр",
"rallySeeAll": "БААРЫН КӨРҮҮ",
"rallyFinanceLeft": "КАЛДЫ",
"rallyTitleOverview": "СЕРЕП САЛУУ",
"shrineProductShoulderRollsTee": "Ийинден ылдый түшкөн футболка",
"shrineNextButtonCaption": "КИЙИНКИ",
"rallyTitleBudgets": "БЮДЖЕТТЕР",
"rallyTitleSettings": "ЖӨНДӨӨЛӨР",
"rallyLoginLoginToRally": "Раллиге кирүү",
"rallyLoginNoAccount": "Аккаунтуңуз жокпу?",
"rallyLoginSignUp": "КАТТАЛУУ",
"rallyLoginUsername": "Колдонуучунун аты",
"rallyLoginPassword": "Сырсөз",
"rallyLoginLabelLogin": "Кирүү",
"rallyLoginRememberMe": "Мени эстеп калсын",
"rallyLoginButtonLogin": "КИРҮҮ",
"rallyAlertsMessageHeadsUpShopping": "Көңүл буруңуз, бул айда Соода кылуу бюджетиңиздин {percent} сарптадыңыз.",
"rallyAlertsMessageSpentOnRestaurants": "Бул аптада ресторандарда {amount} сарптадыңыз.",
"rallyAlertsMessageATMFees": "Бул айда банкомат сыйакылары катары {amount} төлөдүңүз",
"rallyAlertsMessageCheckingAccount": "Азаматсыз! Текшерүү эсебиңиз акыркы айга салыштырмалуу {percent} жогорураак болду.",
"shrineMenuCaption": "МЕНЮ",
"shrineCategoryNameAll": "БААРЫ",
"shrineCategoryNameAccessories": "АКСЕССУАРЛАР",
"shrineCategoryNameClothing": "КИЙИМ-КЕЧЕ",
"shrineCategoryNameHome": "ҮЙ",
"shrineLoginUsernameLabel": "Колдонуучунун аты",
"shrineLoginPasswordLabel": "Сырсөз",
"shrineCancelButtonCaption": "ЖОККО ЧЫГАРУУ",
"shrineCartTaxCaption": "Салык:",
"shrineCartPageCaption": "АРАБА",
"shrineProductQuantity": "Саны: {quantity}",
"shrineProductPrice": "x {price}",
"shrineCartItemCount": "{quantity,plural,=0{ЭЧ НЕРСЕ ЖОК}=1{1 НЕРСЕ}other{{quantity} НЕРСЕ}}",
"shrineCartClearButtonCaption": "АРАБАНЫ ТАЗАЛОО",
"shrineCartTotalCaption": "ЖАЛПЫ",
"shrineCartSubtotalCaption": "Орто-аралык сумма:",
"shrineCartShippingCaption": "Жеткирүү",
"shrineProductGreySlouchTank": "Боз түстөгү майка",
"shrineProductStellaSunglasses": "Стелла көз айнеги",
"shrineProductWhitePinstripeShirt": "Ак сызыктуу көйнөк",
"demoTextFieldWhereCanWeReachYou": "Сиз менен кантип байланыша алабыз?",
"settingsTextDirectionLTR": "СО",
"settingsTextScalingLarge": "Чоң",
"demoBottomSheetHeader": "Жогорку колонтитул",
"demoBottomSheetItem": "Нерсе {value}",
"demoBottomTextFieldsTitle": "Текст киргизилүүчү талаалар",
"demoTextFieldTitle": "Текст киргизилүүчү талаалар",
"demoTextFieldSubtitle": "Түзөтүлүүчү текст жана сандардан турган жалгыз сап",
"demoTextFieldDescription": "Текст киргизилүүчү талаалар аркылуу колдонуучулар колдонуучу интерфейсине текст киргизе алышат. Адатта алар диалог формасында көрүнөт.",
"demoTextFieldShowPasswordLabel": "Сырсөздү көрсөтүү",
"demoTextFieldHidePasswordLabel": "Сырсөздү жашыруу",
"demoTextFieldFormErrors": "Тапшыруудан мурда кызыл болуп белгиленген каталарды оңдоңуз.",
"demoTextFieldNameRequired": "Аталышы талап кылынат.",
"demoTextFieldOnlyAlphabeticalChars": "Алфавиттеги тамгаларды гана киргизиңиз.",
"demoTextFieldEnterUSPhoneNumber": "(###) ###-#### – АКШ телефон номерин киргизиңиз.",
"demoTextFieldEnterPassword": "Сырсөз киргизиңиз.",
"demoTextFieldPasswordsDoNotMatch": "Сырсөздөр дал келген жок",
"demoTextFieldWhatDoPeopleCallYou": "Башкалар сизге кантип кайрылат?",
"demoTextFieldNameField": "Аталышы*",
"demoBottomSheetButtonText": "ЫЛДЫЙ ЖАКТАГЫ МЕНЮНУ КӨРСӨТҮҮ",
"demoTextFieldPhoneNumber": "Телефон номери*",
"demoBottomSheetTitle": "Ылдый жактагы меню",
"demoTextFieldEmail": "Электрондук почта",
"demoTextFieldTellUsAboutYourself": "Өзүңүз жөнүндө айтып бериңиз (мис., эмне иш кыларыңызды же кандай хоббилериңиз бар экенин айтып бериңиз)",
"demoTextFieldKeepItShort": "Кыскараак жазыңыз. Бул болгону демо версия.",
"starterAppGenericButton": "БАСКЫЧ",
"demoTextFieldLifeStory": "Өмүр баян",
"demoTextFieldSalary": "Маяна",
"demoTextFieldUSD": "АКШ доллары",
"demoTextFieldNoMoreThan": "8 белгиден ашпашы керек.",
"demoTextFieldPassword": "Сырсөз*",
"demoTextFieldRetypePassword": "Сырсөздү кайра териңиз*",
"demoTextFieldSubmit": "ТАПШЫРУУ",
"demoBottomNavigationSubtitle": "Өчүүчү көрүнүштөрү бар ылдый жактагы чабыттоо тилкеси",
"demoBottomSheetAddLabel": "Кошуу",
"demoBottomSheetModalDescription": "Ылдый жакта жайгашкан модалдык барак менюга же диалогго кошумча келип, колдонуучунун колдонмонун башка бөлүмдөрү менен иштешине тоскоол болот.",
"demoBottomSheetModalTitle": "Ылдый жактагы модалдык барак",
"demoBottomSheetPersistentDescription": "Ылдый жакта жайгашкан туруктуу барак колдонмодогу негизги мазмунга кошумча маалыматты көрсөтөт. Ылдый жакта жайгашкан туруктуу барак колдонуучу колдонмонун башка бөлүмдөрүн колдонуп жатса да, ар дайым көрүнүп турат.",
"demoBottomSheetPersistentTitle": "Ылдый жактагы туруктуу барак",
"demoBottomSheetSubtitle": "Ылдый жакта жайгашкан туруктуу жана модалдык барактар",
"demoTextFieldNameHasPhoneNumber": "{name} телефон номери {phoneNumber}",
"buttonText": "БАСКЫЧ",
"demoTypographyDescription": "Material Design кызматындагы ар түрдүү типографиялык стилдердин аныктамалары.",
"demoTypographySubtitle": "Бардык алдын ала аныкталган текст стилдери",
"demoTypographyTitle": "Типография",
"demoFullscreenDialogDescription": "Кирүүчү барак толук экрандуу модалдык диалог экени толук экрандуу диалогдун касиеттеринде аныкталган",
"demoFlatButtonDescription": "Түз баскычты басканда сыя чыгат, бирок баскыч көтөрүлбөйт. Түз баскычтарды куралдар тилкелеринде, диалогдордо жана кемтик менен бирге колдонуңуз",
"demoBottomNavigationDescription": "Ылдый жакта жайгашкан чабыттоо тилкелеринде экрандын ылдый жагында үчтөн бешке чейинки бара турган жерлер көрүнөт. Ар бир бара турган жердин сүрөтчөсү жана энбелгиде текст көрүнөт. Ылдый жактагы чабыттоо сүрөтчөсүн басканда колдонуучу ал сүрөтчө менен байланышкан жогорку деңгээлдеги бара турган жерге чабытталат.",
"demoBottomNavigationSelectedLabel": "Тандалган энбелги",
"demoBottomNavigationPersistentLabels": "Туруктуу энбелгилер",
"starterAppDrawerItem": "Нерсе {value}",
"demoTextFieldRequiredField": "* сөзсүз түрдө толтурулушу керек",
"demoBottomNavigationTitle": "Ылдый чабыттоо",
"settingsLightTheme": "Жарык",
"settingsTheme": "Тема",
"settingsPlatformIOS": "iOS",
"settingsPlatformAndroid": "Android",
"settingsTextDirectionRTL": "ОС",
"settingsTextScalingHuge": "Өтө чоң",
"cupertinoButton": "Баскыч",
"settingsTextScalingNormal": "Орточо",
"settingsTextScalingSmall": "Кичине",
"settingsSystemDefault": "Тутум",
"settingsTitle": "Параметрлер",
"rallyDescription": "Жеке каржы колдонмосу",
"aboutDialogDescription": "Бул колдонмонун кодун көрүү үчүн төмөнкүгө баш багыңыз: {repoLink}.",
"bottomNavigationCommentsTab": "Пикирлер",
"starterAppGenericBody": "Негизги текст",
"starterAppGenericHeadline": "Башкы сап",
"starterAppGenericSubtitle": "Коштомо жазуу",
"starterAppGenericTitle": "Аталышы",
"starterAppTooltipSearch": "Издөө",
"starterAppTooltipShare": "Бөлүшүү",
"starterAppTooltipFavorite": "Тандалмаларга кошуу боюнча кеңештер",
"starterAppTooltipAdd": "Кошуу",
"bottomNavigationCalendarTab": "Жылнаама",
"starterAppDescription": "Адаптивдүү баштапкы калык",
"starterAppTitle": "Жаңы колдонуучулар үчүн даярдалган колдонмо",
"aboutFlutterSamplesRepo": "GitHub repo'нун Flutter үлгүлөрү",
"bottomNavigationContentPlaceholder": "{title} өтмөгү үчүн толтургуч",
"bottomNavigationCameraTab": "Камера",
"bottomNavigationAlarmTab": "Ойготкуч",
"bottomNavigationAccountTab": "Аккаунт",
"demoTextFieldYourEmailAddress": "Электрондук почта дарегиңиз",
"demoToggleButtonDescription": "Күйгүзүү/өчүрүү баскычтары тиешелүү варианттарды топтоо үчүн колдонулушу мүмкүн. Тиешелүү күйгүзүү/өчүрүү баскычтарынын топторун белгилөө үчүн топтун жалпы контейнери болушу мүмкүн",
"colorsGrey": "БОЗ",
"colorsBrown": "КҮРӨҢ",
"colorsDeepOrange": "КОЧКУЛ КЫЗГЫЛТ САРЫ",
"colorsOrange": "КЫЗГЫЛТ САРЫ",
"colorsAmber": "ЯНТАРДАЙ",
"colorsYellow": "САРЫ",
"colorsLime": "АЧЫК ЖАШЫЛ",
"colorsLightGreen": "МАЛА ЖАШЫЛ",
"colorsGreen": "ЖАШЫЛ",
"homeHeaderGallery": "Галерея",
"homeHeaderCategories": "Категориялар",
"shrineDescription": "Саркеч кийимдерди сатуу колдонмосу",
"craneDescription": "Жекелештирилген саякат колдонмосу",
"homeCategoryReference": "СТИЛДЕР ЖАНА БАШКАЛАР",
"demoInvalidURL": "URL'ди чагылдыруу мүмкүн эмес:",
"demoOptionsTooltip": "Параметрлер",
"demoInfoTooltip": "Маалымат",
"demoCodeTooltip": "Демо код",
"demoDocumentationTooltip": "API документтери",
"demoFullscreenTooltip": "Толук экран",
"settingsTextScaling": "Тексттин өлчөмүн тууралоо",
"settingsTextDirection": "Тексттин багыты",
"settingsLocale": "Тил параметри",
"settingsPlatformMechanics": "Платформанын механикасы",
"settingsDarkTheme": "Караңгы",
"settingsSlowMotion": "Жай кыймыл",
"settingsAbout": "Flutter галереясы жөнүндө маалымат",
"settingsFeedback": "Пикир билдирүү",
"settingsAttribution": "Лондондогу TOASTER тарабынан жасалгаланды",
"demoButtonTitle": "Баскычтар",
"demoButtonSubtitle": "Текст, көтөрүлгөн, контурланган жана башкалар",
"demoFlatButtonTitle": "Жалпак баскыч",
"demoRaisedButtonDescription": "Көтөрүлгөн баскычтар көбүнчө түз калыптарга чен-өлчөм кошот. Алар бош эмес же кең мейкиндиктердеги функциялар болуп эсептелет.",
"demoRaisedButtonTitle": "Көтөрүлгөн баскыч",
"demoOutlineButtonTitle": "Четки сызыктар баскычы",
"demoOutlineButtonDescription": "Четки сызыктар баскычтар басылганда алар тунук эмес болуп, көтөрүлүп калат. Алар көп учурда көтөрүлгөн баскычтар менен жупташтырылып, альтернативдүү жана кошумча аракетти билдирет.",
"demoToggleButtonTitle": "Күйгүзүү/өчүрүү баскычтары",
"colorsTeal": "КӨГҮШ ЖАШЫЛ",
"demoFloatingButtonTitle": "Калкыма аракеттер баскычы",
"demoFloatingButtonDescription": "Аракеттердин калкыма баскычы бул колдонмодогу негизги аракетти жүргүзүү үчүн курсорду мазмундун үстүнө алып келген сүрөтчөсү бар тегерек баскыч.",
"demoDialogTitle": "Диалогдор",
"demoDialogSubtitle": "Жөнөкөй, шашылыш жана толук экран",
"demoAlertDialogTitle": "Билдирме",
"demoAlertDialogDescription": "Билдирме диалогу колдонуучуга анын ырастоосун талап кылган кырдаалдар тууралуу кабар берет. Билдирме диалогунун аталышы жана аракеттер тизмеси болушу мүмкүн.",
"demoAlertTitleDialogTitle": "Аталышы бар билдирме",
"demoSimpleDialogTitle": "Жөнөкөй",
"demoSimpleDialogDescription": "Жөнөкөй диалог колдонуучуга бир нече варианттардын бирин тандоо мүмкүнчүлүгүн берет. Жөнөкөй диалогдо тандоолордун жогору жагында жайгашкан аталышы болушу мүмкүн.",
"demoFullscreenDialogTitle": "Толук экран",
"demoCupertinoButtonsTitle": "Баскычтар",
"demoCupertinoButtonsSubtitle": "iOS стилиндеги баскычтар",
"demoCupertinoButtonsDescription": "iOS стилиндеги баскыч. Ал текст же сүрөтчө формасында болуп, жана тийгенде көрүнбөй калышы мүмкүн. Фону бар болушу мүмкүн.",
"demoCupertinoAlertsTitle": "Эскертүүлөр",
"demoCupertinoAlertsSubtitle": "iOS стилиндеги билдирме диалогдору",
"demoCupertinoAlertTitle": "Эскертүү",
"demoCupertinoAlertDescription": "Билдирме диалогу колдонуучуга анын ырастоосун талап кылган кырдаалдар тууралуу кабар берет. Билдирме диалогунун аталышы, мазмуну жана аракеттер тизмеси болушу мүмкүн. Аталышы мазмундун жогору жагында, ал эми аракеттер мазмундун төмөн жагында жайгашкан.",
"demoCupertinoAlertWithTitleTitle": "Аталышы бар билдирме",
"demoCupertinoAlertButtonsTitle": "Баскычтар аркылуу эскертүү",
"demoCupertinoAlertButtonsOnlyTitle": "Билдирме баскычтары гана",
"demoCupertinoActionSheetTitle": "Аракеттер барагы",
"demoCupertinoActionSheetDescription": "Аракеттер барагы бул учурдагы мазмунга тиешелүү эки же андан көп тандоолордун топтомун көрсөткөн билдирмелердин белгилүү бир стили. Аракеттер барагынын аталышы болуп, кошумча билдирүү менен аракеттер тизмеси камтылышы мүмкүн.",
"demoColorsTitle": "Түстөр",
"demoColorsSubtitle": "Бардык алдын ала аныкталган түстөр",
"demoColorsDescription": "Material Design кызматынын түстөр топтомун аныктаган түс жана түс үлгүлөрү.",
"buttonTextEnabled": "ENABLED",
"buttonTextDisabled": "DISABLED",
"buttonTextCreate": "Түзүү",
"dialogSelectedOption": "Сиз төмөнкүнү тандадыңыз: \"{value}\"",
"dialogDiscardTitle": "Сомдомо өчүрүлсүнбү?",
"dialogLocationTitle": "Google'дун жайгашкан жерди аныктоо кызматы колдонулсунбу?",
"dialogLocationDescription": "Google'га колдонмолорго жайгашкан жерди аныктоого уруксат бериңиз. Бул жайгашкан жердин дайындары Google'га колдонмолор иштебей турганда да жашырууун жөнөтүлөрүн түшүндүрөт.",
"dialogCancel": "ЖОККО ЧЫГАРУУ",
"dialogDiscard": "ӨЧҮРҮҮ",
"dialogDisagree": "МАКУЛ ЭМЕСМИН",
"dialogAgree": "МАКУЛ",
"dialogSetBackup": "Көмөкчү аккаунтту жөндөө",
"colorsBlueGrey": "КӨГҮШ БОЗ",
"dialogShow": "ДИАЛОГДУ КӨРСӨТҮҮ",
"dialogFullscreenTitle": "Толук экрандуу диалог",
"dialogFullscreenSave": "САКТОО",
"dialogFullscreenDescription": "Толук экрандуу диалогдун демо версиясы",
"cupertinoButtonEnabled": "Enabled",
"cupertinoButtonDisabled": "Disabled",
"cupertinoButtonWithBackground": "Фону менен",
"cupertinoAlertCancel": "Жокко чыгаруу",
"cupertinoAlertDiscard": "Өчүрүү",
"cupertinoAlertLocationTitle": "\"Карталарга\" сиз колдонмону пайдаланып жаткан учурда жайгашкан жериңизге кирүүгө уруксат берилсинби?",
"cupertinoAlertLocationDescription": "Учурдагы жайгашкан жериңиз картада көрсөтүлүп, багыттарды, жакын жерлерди издөө жыйынтыктарын жана болжолдуу саякаттоо убакытын аныктоо үчүн колдонулат.",
"cupertinoAlertAllow": "Уруксат берүү",
"cupertinoAlertDontAllow": "Уруксат берилбесин",
"cupertinoAlertFavoriteDessert": "Жакшы көргөн десертти тандоо",
"cupertinoAlertDessertDescription": "Төмөнкү тизмеден жакшы көргөн десертиңизди тандаңыз. Тандооңуз сиздин аймагыңыздагы тамак-аш жайларынын сунушталган тизмесин ыңгайлаштыруу үчүн колдонулат.",
"cupertinoAlertCheesecake": "Чизкейк",
"cupertinoAlertTiramisu": "Тирамису",
"cupertinoAlertApplePie": "Алма пирогу",
"cupertinoAlertChocolateBrownie": "Брауни шоколады",
"cupertinoShowAlert": "Билдирмени көрсөтүү",
"colorsRed": "КЫЗЫЛ",
"colorsPink": "КЫЗГЫЛТЫМ",
"colorsPurple": "КЫЗГЫЛТЫМ КӨГҮШ",
"colorsDeepPurple": "КОЧКУЛ КЫЗГЫЛТ КӨГҮШ",
"colorsIndigo": "ИНДИГО",
"colorsBlue": "КӨК",
"colorsLightBlue": "МАЛА КӨК",
"colorsCyan": "КӨГҮЛТҮР",
"dialogAddAccount": "Аккаунт кошуу",
"Gallery": "Галерея",
"Categories": "Категориялар",
"SHRINE": "SHRINE",
"Basic shopping app": "Негизги соода кылуу колдонмосу",
"RALLY": "RALLY",
"CRANE": "CRANE",
"Travel app": "Саякат колдонмосу",
"MATERIAL": "МАТЕРИАЛ",
"CUPERTINO": "CUPERTINO",
"REFERENCE STYLES & MEDIA": "ҮЛГҮ СТИЛДЕР ЖАНА МЕДИА"
}
| gallery/lib/l10n/intl_ky.arb/0 | {
"file_path": "gallery/lib/l10n/intl_ky.arb",
"repo_id": "gallery",
"token_count": 40213
} | 869 |
{
"loading": "Carregando",
"deselect": "Desmarcar",
"select": "Selecionar",
"selectable": "Selecionável (tocar pressionar)",
"selected": "Selecionado",
"demo": "Demonstração",
"bottomAppBar": "Barra de apps da parte de baixo",
"notSelected": "Não selecionado",
"demoCupertinoSearchTextFieldTitle": "Campo de texto da pesquisa",
"demoCupertinoPicker": "Seletor",
"demoCupertinoSearchTextFieldSubtitle": "Campo de texto da pesquisa no estilo do iOS",
"demoCupertinoSearchTextFieldDescription": "Um campo que permite ao usuário fazer pesquisas inserindo texto e que pode oferecer e filtrar sugestões.",
"demoCupertinoSearchTextFieldPlaceholder": "Digite um texto",
"demoCupertinoScrollbarTitle": "Barra de rolagem",
"demoCupertinoScrollbarSubtitle": "Barra de rolagem no estilo do iOS",
"demoCupertinoScrollbarDescription": "Uma barra de rolagem que envolve o elemento filho específico",
"demoTwoPaneItem": "Item {value}",
"demoTwoPaneList": "Lista",
"demoTwoPaneFoldableLabel": "Dobrável",
"demoTwoPaneSmallScreenLabel": "Tela pequena",
"demoTwoPaneSmallScreenDescription": "O TwoPane se comporta dessa forma em dispositivos com tela pequena.",
"demoTwoPaneTabletLabel": "Tablet / computador",
"demoTwoPaneTabletDescription": "O TwoPane se comporta dessa forma em dispositivos com tela grande, como tablets ou computadores.",
"demoTwoPaneTitle": "TwoPane",
"demoTwoPaneSubtitle": "Layouts responsivos em telas grandes, pequenas e dobráveis",
"splashSelectDemo": "Selecione uma demonstração",
"demoTwoPaneFoldableDescription": "O TwoPane se comporta dessa forma em dispositivos dobráveis.",
"demoTwoPaneDetails": "Detalhes",
"demoTwoPaneSelectItem": "Selecione um item",
"demoTwoPaneItemDetails": "Detalhes do item {value}",
"demoCupertinoContextMenuActionText": "Toque no logotipo do Flutter e o pressione para ver o menu de contexto.",
"demoCupertinoContextMenuDescription": "Um menu de contexto em tela cheia no estilo iOS que aparece ao tocar em um elemento pressionar.",
"demoAppBarTitle": "Barra de apps",
"demoAppBarDescription": "A barra de apps mostra ações e conteúdos relacionados à tela atual. Ela é usada para branding, títulos de telas, ações e navegação.",
"demoDividerTitle": "Divisor",
"demoDividerSubtitle": "Um divisor é uma linha fina que agrupa conteúdos em listas e layouts.",
"demoDividerDescription": "Divisores podem ser usados em listas, gavetas e outros lugares para separar conteúdos.",
"demoVerticalDividerTitle": "Divisor vertical",
"demoCupertinoContextMenuTitle": "Menu de contexto",
"demoCupertinoContextMenuSubtitle": "Menu de contexto no estilo iOS",
"demoAppBarSubtitle": "Mostra informações e ações relacionadas à tela atual",
"demoCupertinoContextMenuActionOne": "Primeira ação",
"demoCupertinoContextMenuActionTwo": "Segunda ação",
"demoDateRangePickerDescription": "Mostra uma caixa de diálogo com um seletor de período do Material Design.",
"demoDateRangePickerTitle": "Seletor de período",
"demoNavigationDrawerUserName": "Nome do usuário",
"demoNavigationDrawerUserEmail": "[email protected]",
"demoNavigationDrawerText": "Deslize da borda para dentro ou toque no ícone no canto superior esquerdo para ver a gaveta",
"demoNavigationRailTitle": "Coluna de navegação",
"demoNavigationRailSubtitle": "Exibindo uma coluna de navegação em um app",
"demoNavigationRailDescription": "Um widget do Material Design criado para ser exibido do lado esquerdo ou direito de um app para navegar entre um pequeno número de visualizações, geralmente entre três e cinco.",
"demoNavigationRailFirst": "Primeiro",
"demoNavigationDrawerTitle": "Gaveta de navegação",
"demoNavigationRailThird": "Terceiro",
"replyStarredLabel": "Com estrela",
"demoTextButtonDescription": "Um botão de texto exibe um borrão de tinta ao ser pressionado, mas sem elevação. Use botões de texto em barras de ferramentas, caixas de diálogo e in-line com padding",
"demoElevatedButtonTitle": "Botão elevado",
"demoElevatedButtonDescription": "Botões elevados adicionam dimensão a layouts praticamente planos. Eles enfatizam funções em espaços cheios ou amplos.",
"demoOutlinedButtonTitle": "Botão circunscrito",
"demoOutlinedButtonDescription": "Botões circunscritos ficam opacos e elevados quando pressionados. Geralmente, são combinados com botões em relevo para indicar uma ação secundária e alternativa.",
"demoContainerTransformDemoInstructions": "Cards, listas e FAB",
"demoNavigationDrawerSubtitle": "Exibindo uma gaveta em uma appbar",
"replyDescription": "Um app de e-mails eficiente e focado",
"demoNavigationDrawerDescription": "Um painel do Material Design que desliza horizontalmente de fora para dentro na tela para mostrar links de navegação em um aplicativo.",
"replyDraftsLabel": "Rascunhos",
"demoNavigationDrawerToPageOne": "Item um",
"replyInboxLabel": "Caixa de entrada",
"demoSharedXAxisDemoInstructions": "Botões \"Avançar\" e \"Voltar\"",
"replySpamLabel": "Spam",
"replyTrashLabel": "Lixeira",
"replySentLabel": "Enviado",
"demoNavigationRailSecond": "Segundo",
"demoNavigationDrawerToPageTwo": "Item dois",
"demoFadeScaleDemoInstructions": "Modal e FAB",
"demoFadeThroughDemoInstructions": "Navegação inferior",
"demoSharedZAxisDemoInstructions": "Botão do ícone \"Configurações\"",
"demoSharedYAxisDemoInstructions": "Ordenar por \"Tocados recentemente\"",
"demoTextButtonTitle": "Botão de texto",
"demoSharedZAxisBeefSandwichRecipeTitle": "Sanduíche de carne",
"demoSharedZAxisDessertRecipeDescription": "Receita de sobremesa",
"demoSharedYAxisAlbumTileSubtitle": "Artista",
"demoSharedYAxisAlbumTileTitle": "Álbum",
"demoSharedYAxisRecentSortTitle": "Reproduzidas recentemente",
"demoSharedYAxisAlphabeticalSortTitle": "A-Z",
"demoSharedYAxisAlbumCount": "268 álbuns",
"demoSharedYAxisTitle": "Eixo y compartilhado",
"demoSharedXAxisCreateAccountButtonText": "CRIAR CONTA",
"demoFadeScaleAlertDialogDiscardButton": "DESCARTAR",
"demoSharedXAxisSignInTextFieldLabel": "E-mail ou número de telefone",
"demoSharedXAxisSignInSubtitleText": "Fazer login com sua conta",
"demoSharedXAxisSignInWelcomeText": "Olá, David Park",
"demoSharedXAxisIndividualCourseSubtitle": "Mostrado individualmente",
"demoSharedXAxisBundledCourseSubtitle": "Incluído",
"demoFadeThroughAlbumsDestination": "Álbuns",
"demoSharedXAxisDesignCourseTitle": "Design",
"demoSharedXAxisIllustrationCourseTitle": "Ilustração",
"demoSharedXAxisBusinessCourseTitle": "Negócios",
"demoSharedXAxisArtsAndCraftsCourseTitle": "Artes e artesanatos",
"demoMotionPlaceholderSubtitle": "Texto secundário",
"demoFadeScaleAlertDialogCancelButton": "CANCELAR",
"demoFadeScaleAlertDialogHeader": "Caixa de diálogo de alerta",
"demoFadeScaleHideFabButton": "OCULTAR FAB",
"demoFadeScaleShowFabButton": "MOSTRAR FAB",
"demoFadeScaleShowAlertDialogButton": "MOSTRAR MODAL",
"demoFadeScaleDescription": "O padrão de esmaecimento é usado para elementos da IU dentro ou fora dos limites da tela, como uma caixa de diálogo que é esmaecida no centro da visualização.",
"demoFadeScaleTitle": "Esmaecer",
"demoFadeThroughTextPlaceholder": "123 fotos",
"demoFadeThroughSearchDestination": "Pesquisa",
"demoFadeThroughPhotosDestination": "Fotos",
"demoSharedXAxisCoursePageSubtitle": "As categorias agrupadas aparecem como grupos no seu feed. É possível mudar essa configuração a qualquer momento.",
"demoFadeThroughDescription": "O padrão de esmaecimento é usado para transições entre elementos da IU que não têm uma relação forte entre si.",
"demoFadeThroughTitle": "Esmaecer",
"demoSharedZAxisHelpSettingLabel": "Ajuda",
"demoMotionSubtitle": "Todos os padrões de transição pré-definidos",
"demoSharedZAxisNotificationSettingLabel": "Notificações",
"demoSharedZAxisProfileSettingLabel": "Perfil",
"demoSharedZAxisSavedRecipesListTitle": "Receitas salvas",
"demoSharedZAxisBeefSandwichRecipeDescription": "Receita de sanduíche de carne",
"demoSharedZAxisCrabPlateRecipeDescription": "Receita de prato de caranguejo",
"demoSharedXAxisCoursePageTitle": "Simplificar seus cursos",
"demoSharedZAxisCrabPlateRecipeTitle": "Caranguejo",
"demoSharedZAxisShrimpPlateRecipeDescription": "Receita de prato de camarão",
"demoSharedZAxisShrimpPlateRecipeTitle": "Camarão",
"demoContainerTransformTypeFadeThrough": "ESMAECER",
"demoSharedZAxisDessertRecipeTitle": "Sobremesa",
"demoSharedZAxisSandwichRecipeDescription": "Receita de sanduíche",
"demoSharedZAxisSandwichRecipeTitle": "Sanduíche",
"demoSharedZAxisBurgerRecipeDescription": "Receita de hambúrguer",
"demoSharedZAxisBurgerRecipeTitle": "Hambúrguer",
"demoSharedZAxisSettingsPageTitle": "Configurações",
"demoSharedZAxisTitle": "Eixo z compartilhado",
"demoSharedZAxisPrivacySettingLabel": "Privacidade",
"demoMotionTitle": "Movimento",
"demoContainerTransformTitle": "Transformação de contêiner",
"demoContainerTransformDescription": "O padrão de transformação de contêiner foi projetado para transições entre elemento da IU que incluem um contêiner. Ele cria uma conexão visível entre dois elementos da IU",
"demoContainerTransformModalBottomSheetTitle": "Modo esmaecer",
"demoContainerTransformTypeFade": "ESMAECER",
"demoSharedYAxisAlbumTileDurationUnit": "min",
"demoMotionPlaceholderTitle": "Título",
"demoSharedXAxisForgotEmailButtonText": "ESQUECEU O E-MAIL?",
"demoMotionSmallPlaceholderSubtitle": "Secundário",
"demoMotionDetailsPageTitle": "Página de detalhes",
"demoMotionListTileTitle": "Item da lista",
"demoSharedAxisDescription": "O padrão do eixo compartilhado é usado para transições entre os elementos da IU que têm uma relação especial ou de navegação. Ele usa uma transformação compartilhada nos eixos x, y ou z para reforçar a relação entre os elementos.",
"demoSharedXAxisTitle": "Eixo x compartilhado",
"demoSharedXAxisBackButtonText": "VOLTAR",
"demoSharedXAxisNextButtonText": "PRÓXIMA",
"demoSharedXAxisCulinaryCourseTitle": "Culinária",
"githubRepo": "Repositório {repoName} do GitHub",
"fortnightlyMenuUS": "EUA",
"fortnightlyMenuBusiness": "Negócios",
"fortnightlyMenuScience": "Ciência",
"fortnightlyMenuSports": "Esportes",
"fortnightlyMenuTravel": "Viagens",
"fortnightlyMenuCulture": "Cultura",
"fortnightlyTrendingTechDesign": "DesignDeTecnologia",
"rallyBudgetDetailAmountLeft": "Quantidade restante",
"fortnightlyHeadlineArmy": "Reforma interna do Exército Verde",
"fortnightlyDescription": "Um app de notícias com foco em conteúdo",
"rallyBillDetailAmountDue": "Valor devido",
"rallyBudgetDetailTotalCap": "Valor máximo total",
"rallyBudgetDetailAmountUsed": "Quantidade usada",
"fortnightlyTrendingHealthcareRevolution": "RevoluçãoNaSaúde",
"fortnightlyMenuFrontPage": "Primeira página",
"fortnightlyMenuWorld": "Mundo",
"rallyBillDetailAmountPaid": "Valor pago",
"fortnightlyMenuPolitics": "Política",
"fortnightlyHeadlineBees": "Escassez do fornecimento das abelhas de cultivo",
"fortnightlyHeadlineGasoline": "O futuro da gasolina",
"fortnightlyTrendingGreenArmy": "ExércitoVerde",
"fortnightlyHeadlineFeminists": "Feministas lidam com o partidarismo",
"fortnightlyHeadlineFabrics": "Designers usam a tecnologia para criar tecidos futuristas",
"fortnightlyHeadlineStocks": "Com a estagnação das ações, muitos se voltam às moedas",
"fortnightlyTrendingReform": "Reforma",
"fortnightlyMenuTech": "Tecnologia",
"fortnightlyHeadlineWar": "Vidas norte-americanas divididas durante a guerra",
"fortnightlyHeadlineHealthcare": "A revolução silenciosa, mas poderosa, dos serviços de saúde",
"fortnightlyLatestUpdates": "Atualizações mais recentes",
"fortnightlyTrendingStocks": "Ações",
"rallyBillDetailTotalAmount": "Valor total",
"demoCupertinoPickerDateTime": "Data e hora",
"signIn": "FAZER LOGIN",
"dataTableRowWithSugar": "{value} com açúcar",
"dataTableRowApplePie": "Torta de maçã",
"dataTableRowDonut": "Donut",
"dataTableRowHoneycomb": "Favo de mel",
"dataTableRowLollipop": "Pirulito",
"dataTableRowJellyBean": "Jujuba",
"dataTableRowGingerbread": "Biscoito de gengibre",
"dataTableRowCupcake": "Cupcake",
"dataTableRowEclair": "Bomba",
"dataTableRowIceCreamSandwich": "Sanduíche de sorvete",
"dataTableRowFrozenYogurt": "Frozen yogurt",
"dataTableColumnIron": "Ferro (%)",
"dataTableColumnCalcium": "Cálcio (%)",
"dataTableColumnSodium": "Sódio (mg)",
"demoTimePickerTitle": "Seletor de horário",
"demo2dTransformationsResetTooltip": "Redefinir transformações",
"dataTableColumnFat": "Gordura (g)",
"dataTableColumnCalories": "Calorias",
"dataTableColumnDessert": "Sobremesa (1 porção)",
"cardsDemoTravelDestinationLocation1": "Thanjavur, Tamil Nadu",
"demoTimePickerDescription": "Mostra uma caixa de diálogo com um seletor de horário do Material Design.",
"demoPickersShowPicker": "MOSTRAR SELETOR",
"demoTabsScrollingTitle": "Rolagem",
"demoTabsNonScrollingTitle": "Sem rolagem",
"craneHours": "{hours,plural,=1{1h}other{{hours}h}}",
"craneMinutes": "{minutes,plural,=1{1min}other{{minutes}min}}",
"craneFlightDuration": "{hoursShortForm} e {minutesShortForm}",
"dataTableHeader": "Valor nutricional",
"demoDatePickerTitle": "Seletor de data",
"demoPickersSubtitle": "Seleção de data e horário",
"demoPickersTitle": "Seletores",
"demo2dTransformationsEditTooltip": "Editar bloco",
"demoDataTableDescription": "As tabelas de dados apresentam informações em grades com linhas e colunas. As informações são organizadas para facilitar a leitura, permitindo que os usuários procurem por padrões e insights.",
"demo2dTransformationsDescription": "Toque para editar blocos e use gestos para se mover pela cena. Arraste para se movimentar, faça um gesto de pinça para aplicar o zoom e gire com dois dedos. Pressione o botão de redefinição para voltar à orientação inicial.",
"demo2dTransformationsSubtitle": "Movimentar, aplicar zoom, girar",
"demo2dTransformationsTitle": "Transformações 2D",
"demoCupertinoTextFieldPIN": "PIN",
"demoCupertinoTextFieldDescription": "Um campo de texto permite que o usuário digite com um teclado físico ou virtual.",
"demoCupertinoTextFieldSubtitle": "Campos de texto no estilo iOS",
"demoCupertinoTextFieldTitle": "Campos de texto",
"demoDatePickerDescription": "Mostra uma caixa de diálogo com um seletor de data do Material Design.",
"demoCupertinoPickerTime": "Hora",
"demoCupertinoPickerDate": "Data",
"demoCupertinoPickerTimer": "Timer",
"demoCupertinoPickerDescription": "Um widget de seleção no estilo do iOS que pode ser usado para escolher strings, datas, horários ou data e hora.",
"demoCupertinoPickerSubtitle": "Seletores no estilo do iOS",
"demoCupertinoPickerTitle": "Seletores",
"dataTableRowWithHoney": "{value} com mel",
"cardsDemoTravelDestinationCity2": "Chettinad",
"bannerDemoResetText": "Redefinir banner",
"bannerDemoMultipleText": "Várias ações",
"bannerDemoLeadingText": "Ícone principal",
"dismiss": "DISPENSAR",
"cardsDemoTappable": "Tocável",
"cardsDemoSelectable": "Selecionável (tocar e manter pressionado)",
"cardsDemoExplore": "Confira",
"cardsDemoExploreSemantics": "Confira o destino: {destinationName}",
"cardsDemoShareSemantics": "Compartilhar o destino: {destinationName}",
"cardsDemoTravelDestinationTitle1": "10 principais cidades para visitar em Tamil Nadu",
"cardsDemoTravelDestinationDescription1": "Número 10",
"cardsDemoTravelDestinationCity1": "Thanjavur",
"dataTableColumnProtein": "Proteína (g)",
"cardsDemoTravelDestinationTitle2": "Artesãos do sul da Índia",
"cardsDemoTravelDestinationDescription2": "Fiandeiros de seda",
"bannerDemoText": "A senha foi atualizada no seu outro dispositivo. Faça login novamente.",
"cardsDemoTravelDestinationLocation2": "Sivaganga, Tamil Nadu",
"cardsDemoTravelDestinationTitle3": "Templo de Brihadisvara",
"cardsDemoTravelDestinationDescription3": "Templos",
"demoBannerTitle": "Banner",
"demoBannerSubtitle": "Como mostrar um banner em uma lista",
"demoBannerDescription": "Um banner mostra uma mensagem importante e concisa, além de oferecer ações para os usuários, que também podem dispensar o banner. Uma ação do usuário é necessária para que o banner seja dispensado.",
"demoCardTitle": "Cards",
"demoCardSubtitle": "Cards de valor de referência com cantos arredondados",
"demoCardDescription": "Um card é um item do Material usado para representar informações relacionadas, como um álbum, uma localização geográfica, uma refeição, detalhes de contato etc.",
"demoDataTableTitle": "Tabelas de dados",
"demoDataTableSubtitle": "Linhas e colunas de informações",
"dataTableColumnCarbs": "Carboidratos (g)",
"placeTanjore": "Tanjore",
"demoGridListsTitle": "Listas de grade",
"placeFlowerMarket": "Mercado de flores",
"placeBronzeWorks": "Fundição de bronze",
"placeMarket": "Mercado",
"placeThanjavurTemple": "Templo Thanjavur",
"placeSaltFarm": "Fazenda de sal",
"placeScooters": "Scooters",
"placeSilkMaker": "Fábrica de seda",
"placeLunchPrep": "Preparo do almoço",
"placeBeach": "Praia",
"placeFisherman": "Pescador",
"demoMenuSelected": "Selecionado: {value}",
"demoMenuRemove": "Remover",
"demoMenuGetLink": "Gerar link",
"demoMenuShare": "Compartilhar",
"demoBottomAppBarSubtitle": "Exibe a navegação e as ações na parte inferior da tela",
"demoMenuAnItemWithASectionedMenu": "Um item com um menu em seções",
"demoMenuADisabledMenuItem": "Item de menu desativado",
"demoLinearProgressIndicatorTitle": "Indicador de progresso linear",
"demoMenuContextMenuItemOne": "Item um do menu de contexto",
"demoMenuAnItemWithASimpleMenu": "Um item com um menu simples",
"demoCustomSlidersTitle": "Controles deslizantes personalizados",
"demoMenuAnItemWithAChecklistMenu": "Um item com um menu de lista de verificação",
"demoCupertinoActivityIndicatorTitle": "Indicador de atividade",
"demoCupertinoActivityIndicatorSubtitle": "Indicadores de atividade no estilo iOS",
"demoCupertinoActivityIndicatorDescription": "Um indicador de atividade no estilo iOS que gira em sentido horário.",
"demoCupertinoNavigationBarTitle": "Barra de navegação",
"demoCupertinoNavigationBarSubtitle": "Barra de navegação no estilo iOS",
"demoCupertinoNavigationBarDescription": "Uma barra de navegação no estilo iOS. A barra de navegação é uma barra de ferramentas que consiste basicamente em um título de página no meio da barra de ferramentas.",
"demoCupertinoPullToRefreshTitle": "Deslize para baixo para atualizar",
"demoCupertinoPullToRefreshSubtitle": "Controle de atualização no estilo iOS",
"demoCupertinoPullToRefreshDescription": "Um widget que implementa o estilo iOS no controle de atualização de conteúdo.",
"demoProgressIndicatorTitle": "Indicadores de progresso",
"demoProgressIndicatorSubtitle": "Lineares, circulares, indeterminados",
"demoCircularProgressIndicatorTitle": "Indicador de progresso circular",
"demoCircularProgressIndicatorDescription": "Um indicador de progresso circular com Material Design que gira para indicar que o aplicativo está ocupado.",
"demoMenuFour": "Quatro",
"demoLinearProgressIndicatorDescription": "Um indicador de progresso linear do Material Design, também conhecido como barra de progresso.",
"demoTooltipTitle": "Dicas",
"demoTooltipSubtitle": "Mensagem curta exibida ao tocar em um elemento e mantê-lo pressionado ou passar o cursor sobre ele",
"demoTooltipDescription": "As dicas mostram etiquetas que ajudam a explicar a função de um botão ou outra ação da interface do usuário. Elas exibem textos informativos quando os usuários passam o cursor por um elemento, focam nele ou tocam nele e o mantêm pressionado.",
"demoTooltipInstructions": "Toque no elemento e o pressione ou passe o cursor sobre ele para exibir a dica.",
"placeChennai": "Chennai",
"demoMenuChecked": "Marcado: {value}",
"placeChettinad": "Chettinad",
"demoMenuPreview": "Visualizar",
"demoBottomAppBarTitle": "Barra de apps inferior",
"demoBottomAppBarDescription": "As barras de apps inferiores fornecem acesso a uma gaveta de navegação e até quatro ações, incluindo o botão de ação flutuante.",
"bottomAppBarNotch": "Entalhe",
"bottomAppBarPosition": "Posição do botão de ação flutuante",
"bottomAppBarPositionDockedEnd": "Na base: fim",
"bottomAppBarPositionDockedCenter": "Na base: centro",
"bottomAppBarPositionFloatingEnd": "Flutuando: extremidade",
"bottomAppBarPositionFloatingCenter": "Flutuando: centro",
"demoSlidersEditableNumericalValue": "Valor numérico editável",
"demoGridListsSubtitle": "Layout de linhas e colunas",
"demoGridListsDescription": "Listas de grade são melhores para apresentar dados homogêneos, como imagens. Cada item em uma lista de grade é chamado de bloco.",
"demoGridListsImageOnlyTitle": "Somente imagens",
"demoGridListsHeaderTitle": "Com cabeçalho",
"demoGridListsFooterTitle": "Com rodapé",
"demoSlidersTitle": "Controles deslizantes",
"demoSlidersSubtitle": "Widgets para selecionar um valor deslizando",
"demoSlidersDescription": "Os controles deslizantes refletem um intervalo de valores em uma barra, em que os usuários podem selecionar um único valor. Eles são ideais para ajustar configurações como volume e brilho ou aplicar filtros de imagem.",
"demoRangeSlidersTitle": "Controles deslizantes de intervalo",
"demoRangeSlidersDescription": "Os controles deslizantes refletem um intervalo de valores em uma barra. Eles podem ter ícones em ambas as extremidades da barra, refletindo um intervalo de valores. São ideais para ajustar configurações como volume e brilho ou aplicar filtros de imagem.",
"demoMenuAnItemWithAContextMenuButton": "Um item com um menu de contexto",
"demoCustomSlidersDescription": "Os controles deslizantes refletem um intervalo de valores em uma barra, em que os usuários podem selecionar um valor ou um intervalo. Eles podem ter um tema e ser personalizados.",
"demoSlidersContinuousWithEditableNumericalValue": "Contínuo com valor numérico editável",
"demoSlidersDiscrete": "Discreto",
"demoSlidersDiscreteSliderWithCustomTheme": "Controle deslizante discreto com tema personalizado",
"demoSlidersContinuousRangeSliderWithCustomTheme": "Controle deslizante de intervalo contínuo com tema personalizado",
"demoSlidersContinuous": "Contínuo",
"placePondicherry": "Pondicherry",
"demoMenuTitle": "Menu",
"demoContextMenuTitle": "Menu de contexto",
"demoSectionedMenuTitle": "Menu em seções",
"demoSimpleMenuTitle": "Menu simples",
"demoChecklistMenuTitle": "Menu de lista de verificação",
"demoMenuSubtitle": "Botões de menu e menus simples",
"demoMenuDescription": "Um menu mostra uma lista de escolhas em uma superfície temporária. Eles aparecem quando os usuários interagem com um botão, uma ação ou outro controle.",
"demoMenuItemValueOne": "Item um do menu",
"demoMenuItemValueTwo": "Item dois do menu",
"demoMenuItemValueThree": "Item três do menu",
"demoMenuOne": "Um",
"demoMenuTwo": "Dois",
"demoMenuThree": "Três",
"demoMenuContextMenuItemThree": "Item três do menu de contexto",
"demoCupertinoSwitchSubtitle": "Chave no estilo iOS",
"demoSnackbarsText": "Isto é um snackbar.",
"demoCupertinoSliderSubtitle": "Controle deslizante no estilo iOS",
"demoCupertinoSliderDescription": "Um controle deslizante que pode ser usado para selecionar dentre um conjunto de valores contínuos ou pontuais.",
"demoCupertinoSliderContinuous": "Contínuo: {value}",
"demoCupertinoSliderDiscrete": "Pontual: {value}",
"demoSnackbarsAction": "Você pressionou a ação de snackbar.",
"backToGallery": "Voltar à galeria",
"demoCupertinoTabBarTitle": "Barra de guias",
"demoCupertinoSwitchDescription": "A chave é usada para alternar o estado ativado/desativado de uma única configuração.",
"demoSnackbarsActionButtonLabel": "AÇÃO",
"cupertinoTabBarProfileTab": "Perfil",
"demoSnackbarsButtonLabel": "MOSTRAR UM SNACKBAR",
"demoSnackbarsDescription": "Os snackbars informam os usuários sobre processos que o app realizou ou vai realizar. Eles aparecem temporariamente, na parte de baixo da tela e não interrompem a experiência do usuário. Nenhuma ação é necessária para que eles desapareçam.",
"demoSnackbarsSubtitle": "Os snackbars exibem mensagens na parte interior da tela",
"demoSnackbarsTitle": "Snackbars",
"demoCupertinoSliderTitle": "Controle deslizante",
"cupertinoTabBarChatTab": "Chat",
"cupertinoTabBarHomeTab": "Início",
"demoCupertinoTabBarDescription": "Uma barra de guias inferior no estilo iOS. Ela exibe várias guias com uma ativa, a primeira, por padrão.",
"demoCupertinoTabBarSubtitle": "Barra de guias inferior no estilo iOS",
"demoOptionsFeatureTitle": "Ver opções",
"demoOptionsFeatureDescription": "Toque aqui para ver as opções disponíveis para esta demonstração.",
"demoCodeViewerCopyAll": "COPIAR TUDO",
"shrineScreenReaderRemoveProductButton": "Remover {product}",
"shrineScreenReaderProductAddToCart": "Adicionar ao carrinho",
"shrineScreenReaderCart": "{quantity,plural,=0{Carrinho de compras, nenhum item}=1{Carrinho de compras, 1 item}other{Carrinho de compras, {quantity} itens}}",
"demoCodeViewerFailedToCopyToClipboardMessage": "Falha ao copiar para a área de transferência: {error}",
"demoCodeViewerCopiedToClipboardMessage": "Copiado para a área de transferência.",
"craneSleep8SemanticLabel": "Ruínas maias em um penhasco acima da praia",
"craneSleep4SemanticLabel": "Hotel às margens de um lago em frente às montanhas",
"craneSleep2SemanticLabel": "Cidadela de Machu Picchu",
"craneSleep1SemanticLabel": "Chalé em uma paisagem com neve e árvores perenes",
"craneSleep0SemanticLabel": "Bangalô sobre a água",
"craneFly13SemanticLabel": "Piscina com palmeiras à beira-mar",
"craneFly12SemanticLabel": "Piscina com palmeiras",
"craneFly11SemanticLabel": "Farol de tijolos no mar",
"craneFly10SemanticLabel": "Torres da mesquita de Al-Azhar no pôr do sol",
"craneFly9SemanticLabel": "Homem apoiado sobre um carro azul antigo",
"craneFly8SemanticLabel": "Supertree Grove",
"craneEat9SemanticLabel": "Balcão de um café com itens de padaria",
"craneEat2SemanticLabel": "Hambúrguer",
"craneFly5SemanticLabel": "Hotel às margens de um lago em frente às montanhas",
"demoSelectionControlsSubtitle": "Caixas de seleção, botões de opção e chaves",
"craneEat10SemanticLabel": "Mulher segurando um sanduíche de pastrami",
"craneFly4SemanticLabel": "Bangalô sobre a água",
"craneEat7SemanticLabel": "Entrada da padaria",
"craneEat6SemanticLabel": "Prato de camarão",
"craneEat5SemanticLabel": "Área para se sentar em um restaurante artístico",
"craneEat4SemanticLabel": "Sobremesa de chocolate",
"craneEat3SemanticLabel": "Taco coreano",
"craneFly3SemanticLabel": "Cidadela de Machu Picchu",
"craneEat1SemanticLabel": "Balcão vazio com banquetas",
"craneEat0SemanticLabel": "Pizza em um fogão à lenha",
"craneSleep11SemanticLabel": "Arranha-céu Taipei 101",
"craneSleep10SemanticLabel": "Torres da mesquita de Al-Azhar no pôr do sol",
"craneSleep9SemanticLabel": "Farol de tijolos no mar",
"craneEat8SemanticLabel": "Prato de lagostim",
"craneSleep7SemanticLabel": "Apartamentos coloridos na Praça da Ribeira",
"craneSleep6SemanticLabel": "Piscina com palmeiras",
"craneSleep5SemanticLabel": "Barraca em um campo",
"settingsButtonCloseLabel": "Fechar configurações",
"demoSelectionControlsCheckboxDescription": "As caixas de seleção permitem que o usuário escolha várias opções de um conjunto. O valor normal de uma caixa de seleção é verdadeiro ou falso, e uma com três estados também pode ter seu valor como nulo.",
"settingsButtonLabel": "Configurações",
"demoListsTitle": "Listas",
"demoListsSubtitle": "Layouts de lista rolável",
"demoListsDescription": "Uma única linha com altura fixa e que normalmente contém algum texto, assim como um ícone à direita ou esquerda.",
"demoOneLineListsTitle": "Uma linha",
"demoTwoLineListsTitle": "Duas linhas",
"demoListsSecondary": "Texto secundário",
"demoSelectionControlsTitle": "Controles de seleção",
"craneFly7SemanticLabel": "Monte Rushmore",
"demoSelectionControlsCheckboxTitle": "Caixa de seleção",
"craneSleep3SemanticLabel": "Homem apoiado sobre um carro azul antigo",
"demoSelectionControlsRadioTitle": "Opções",
"demoSelectionControlsRadioDescription": "Os botões de opção permitem que o usuário selecione uma opção em um conjunto delas. Use botões de opção para seleções exclusivas se você achar que o usuário precisa ver todas as opções disponíveis lado a lado.",
"demoSelectionControlsSwitchTitle": "Chave",
"demoSelectionControlsSwitchDescription": "A chave ativar/desativar alterna o estado de uma única opção das configurações. A opção controlada por ela e o estado em que ela está precisam ficar claros no marcador inline correspondente.",
"craneFly0SemanticLabel": "Chalé em uma paisagem com neve e árvores perenes",
"craneFly1SemanticLabel": "Barraca em um campo",
"craneFly2SemanticLabel": "Bandeiras de oração em frente a montanhas com neve",
"craneFly6SemanticLabel": "Vista aérea do Palácio de Bellas Artes",
"rallySeeAllAccounts": "Ver todas as contas",
"rallyBillAmount": "A fatura {billName} de {amount} vence em {date}.",
"shrineTooltipCloseCart": "Fechar carrinho",
"shrineTooltipCloseMenu": "Fechar menu",
"shrineTooltipOpenMenu": "Abrir menu",
"shrineTooltipSettings": "Configurações",
"shrineTooltipSearch": "Pesquisar",
"demoTabsDescription": "As guias organizam conteúdo entre diferentes telas, conjuntos de dados e outras interações.",
"demoTabsSubtitle": "Guias com visualizações roláveis independentes",
"demoTabsTitle": "Guias",
"rallyBudgetAmount": "O orçamento {budgetName} com {amountUsed} usados de {amountTotal}. Valor restante: {amountLeft}",
"shrineTooltipRemoveItem": "Remover item",
"rallyAccountAmount": "Conta {accountName} {accountNumber} com {amount}.",
"rallySeeAllBudgets": "Ver todos os orçamentos",
"rallySeeAllBills": "Ver todas as faturas",
"craneFormDate": "Selecionar data",
"craneFormOrigin": "Escolha a origem",
"craneFly2": "Vale do Khumbu, Nepal",
"craneFly3": "Machu Picchu, Peru",
"craneFly4": "Malé, Maldivas",
"craneFly5": "Vitznau, Suíça",
"craneFly6": "Cidade do México, México",
"craneFly7": "Monte Rushmore, Estados Unidos",
"settingsTextDirectionLocaleBased": "Com base na localidade",
"craneFly9": "Havana, Cuba",
"craneFly10": "Cairo, Egito",
"craneFly11": "Lisboa, Portugal",
"craneFly12": "Napa, Estados Unidos",
"craneFly13": "Bali, Indonésia",
"craneSleep0": "Malé, Maldivas",
"craneSleep1": "Aspen, Estados Unidos",
"craneSleep2": "Machu Picchu, Peru",
"demoCupertinoSegmentedControlTitle": "Controle segmentado",
"craneSleep4": "Vitznau, Suíça",
"craneSleep5": "Big Sur, Estados Unidos",
"craneSleep6": "Napa, Estados Unidos",
"craneSleep7": "Porto, Portugal",
"craneSleep8": "Tulum, México",
"craneEat5": "Seul, Coreia do Sul",
"demoChipTitle": "Ícones",
"demoChipSubtitle": "Elementos compactos que representam uma entrada, um atributo ou uma ação",
"demoActionChipTitle": "Ícone de ação",
"demoActionChipDescription": "Ícones de ação são um conjunto de opções que ativam uma ação relacionada a um conteúdo principal. Eles aparecem de modo dinâmico e contextual em uma IU.",
"demoChoiceChipTitle": "Ícone de escolha",
"demoChoiceChipDescription": "Os ícones de escolha representam uma única escolha de um conjunto. Eles contêm categorias ou textos descritivos relacionados.",
"demoFilterChipTitle": "Ícone de filtro",
"demoFilterChipDescription": "Os ícones de filtro usam tags ou palavras descritivas para filtrar conteúdo.",
"demoInputChipTitle": "Ícone de entrada",
"demoInputChipDescription": "Os ícones de entrada representam um formato compacto de informações complexas, como uma entidade (pessoa, lugar ou coisa) ou o texto de uma conversa.",
"craneSleep9": "Lisboa, Portugal",
"craneEat10": "Lisboa, Portugal",
"demoCupertinoSegmentedControlDescription": "Usado para escolher entre opções mutuamente exclusivas. Quando uma das opções no controle segmentado é selecionada, as outras são desmarcadas.",
"chipTurnOnLights": "Acender as luzes",
"chipSmall": "Pequeno",
"chipMedium": "Médio",
"chipLarge": "Grande",
"chipElevator": "Elevador",
"chipWasher": "Máquina de lavar roupas",
"chipFireplace": "Lareira",
"chipBiking": "Bicicleta",
"craneFormDiners": "Lanchonetes",
"rallyAlertsMessageUnassignedTransactions": "{count,plural,=1{Aumente seu potencial de dedução de taxas. Defina categorias para 1 transação não atribuída.}other{Aumente seu potencial de dedução de taxas. Defina categorias para {count} transações não atribuídas.}}",
"craneFormTime": "Selecionar horário",
"craneFormLocation": "Selecionar local",
"craneFormTravelers": "Viajantes",
"craneEat8": "Atlanta, Estados Unidos",
"craneFormDestination": "Escolha o destino",
"craneFormDates": "Selecionar datas",
"craneFly": "VOAR",
"craneSleep": "SONO",
"craneEat": "ALIMENTAÇÃO",
"craneFlySubhead": "Ver voos por destino",
"craneSleepSubhead": "Ver propriedades por destino",
"craneEatSubhead": "Ver restaurantes por destino",
"craneFlyStops": "{numberOfStops,plural,=0{Sem escalas}=1{1 escala}other{{numberOfStops} escalas}}",
"craneSleepProperties": "{totalProperties,plural,=0{Nenhuma propriedade disponível}=1{1 propriedade disponível}other{{totalProperties} propriedades disponíveis}}",
"craneEatRestaurants": "{totalRestaurants,plural,=0{Nenhum restaurante}=1{1 restaurante}other{{totalRestaurants} restaurantes}}",
"craneFly0": "Aspen, Estados Unidos",
"demoCupertinoSegmentedControlSubtitle": "Controle segmentado no estilo iOS",
"craneSleep10": "Cairo, Egito",
"craneEat9": "Madri, Espanha",
"craneFly1": "Big Sur, Estados Unidos",
"craneEat7": "Nashville, Estados Unidos",
"craneEat6": "Seattle, Estados Unidos",
"craneFly8": "Singapura",
"craneEat4": "Paris, França",
"craneEat3": "Portland, Estados Unidos",
"craneEat2": "Córdoba, Argentina",
"craneEat1": "Dallas, Estados Unidos",
"craneEat0": "Nápoles, Itália",
"craneSleep11": "Taipei, Taiwan",
"craneSleep3": "Havana, Cuba",
"shrineLogoutButtonCaption": "SAIR",
"rallyTitleBills": "FATURAS",
"rallyTitleAccounts": "CONTAS",
"shrineProductVagabondSack": "Mochila Vagabond",
"rallyAccountDetailDataInterestYtd": "Juros acumulados do ano",
"shrineProductWhitneyBelt": "Cinto Whitney",
"shrineProductGardenStrand": "Fio de jardinagem",
"shrineProductStrutEarrings": "Brincos Strut",
"shrineProductVarsitySocks": "Meias Varsity",
"shrineProductWeaveKeyring": "Chaveiro trançado",
"shrineProductGatsbyHat": "Chapéu Gatsby",
"shrineProductShrugBag": "Bolsa Shrug",
"shrineProductGiltDeskTrio": "Trio de acessórios dourados para escritório",
"shrineProductCopperWireRack": "Prateleira de fios de cobre",
"shrineProductSootheCeramicSet": "Kit de cerâmica relaxante",
"shrineProductHurrahsTeaSet": "Jogo de chá Hurrahs",
"shrineProductBlueStoneMug": "Caneca Blue Stone",
"shrineProductRainwaterTray": "Recipiente para água da chuva",
"shrineProductChambrayNapkins": "Guardanapos em chambray",
"shrineProductSucculentPlanters": "Vasos de suculentas",
"shrineProductQuartetTable": "Mesa de quatro pernas",
"shrineProductKitchenQuattro": "Conjunto com quatro itens para cozinha",
"shrineProductClaySweater": "Suéter na cor argila",
"shrineProductSeaTunic": "Túnica azul-mar",
"shrineProductPlasterTunic": "Túnica na cor gesso",
"rallyBudgetCategoryRestaurants": "Restaurantes",
"shrineProductChambrayShirt": "Camisa em chambray",
"shrineProductSeabreezeSweater": "Suéter na cor brisa do mar",
"shrineProductGentryJacket": "Casaco chique",
"shrineProductNavyTrousers": "Calças azul-marinho",
"shrineProductWalterHenleyWhite": "Camiseta de manga longa (branca)",
"shrineProductSurfAndPerfShirt": "Camiseta de surfista",
"shrineProductGingerScarf": "Cachecol laranja",
"shrineProductRamonaCrossover": "Camiseta estilo crossover Ramona",
"shrineProductClassicWhiteCollar": "Gola branca clássica",
"shrineProductSunshirtDress": "Vestido Sunshirt",
"rallyAccountDetailDataInterestRate": "Taxa de juros",
"rallyAccountDetailDataAnnualPercentageYield": "Porcentagem de rendimento anual",
"rallyAccountDataVacation": "Férias",
"shrineProductFineLinesTee": "Camiseta com listras finas",
"rallyAccountDataHomeSavings": "Economias domésticas",
"rallyAccountDataChecking": "Conta corrente",
"rallyAccountDetailDataInterestPaidLastYear": "Juros pagos no ano passado",
"rallyAccountDetailDataNextStatement": "Próximo extrato",
"rallyAccountDetailDataAccountOwner": "Proprietário da conta",
"rallyBudgetCategoryCoffeeShops": "Cafés",
"rallyBudgetCategoryGroceries": "Supermercado",
"shrineProductCeriseScallopTee": "Camisa abaulada na cor cereja",
"rallyBudgetCategoryClothing": "Roupas",
"rallySettingsManageAccounts": "Gerenciar contas",
"rallyAccountDataCarSavings": "Economia em transporte",
"rallySettingsTaxDocuments": "Documentos fiscais",
"rallySettingsPasscodeAndTouchId": "Senha e Touch ID",
"rallySettingsNotifications": "Notificações",
"rallySettingsPersonalInformation": "Informações pessoais",
"rallySettingsPaperlessSettings": "Configurações sem papel",
"rallySettingsFindAtms": "Encontrar caixas eletrônicos",
"rallySettingsHelp": "Ajuda",
"rallySettingsSignOut": "Sair",
"rallyAccountTotal": "Total",
"rallyBillsDue": "A pagar",
"rallyBudgetLeft": "Restantes",
"rallyAccounts": "Contas",
"rallyBills": "Faturas",
"rallyBudgets": "Orçamentos",
"rallyAlerts": "Alertas",
"rallySeeAll": "VER TUDO",
"rallyFinanceLeft": "RESTANTES",
"rallyTitleOverview": "VISÃO GERAL",
"shrineProductShoulderRollsTee": "Camiseta com mangas dobradas",
"shrineNextButtonCaption": "PRÓXIMA",
"rallyTitleBudgets": "ORÇAMENTOS",
"rallyTitleSettings": "CONFIGURAÇÕES",
"rallyLoginLoginToRally": "Fazer login no Rally",
"rallyLoginNoAccount": "Não tem uma conta?",
"rallyLoginSignUp": "INSCREVER-SE",
"rallyLoginUsername": "Nome de usuário",
"rallyLoginPassword": "Senha",
"rallyLoginLabelLogin": "Fazer login",
"rallyLoginRememberMe": "Lembrar meus dados",
"rallyLoginButtonLogin": "FAZER LOGIN",
"rallyAlertsMessageHeadsUpShopping": "Atenção! Você usou {percent} do seu orçamento de compras para este mês.",
"rallyAlertsMessageSpentOnRestaurants": "Você gastou {amount} em restaurantes nesta semana.",
"rallyAlertsMessageATMFees": "Você gastou {amount} em taxas de caixa eletrônico neste mês.",
"rallyAlertsMessageCheckingAccount": "Bom trabalho! Sua conta corrente está {percent} maior do que no mês passado.",
"shrineMenuCaption": "MENU",
"shrineCategoryNameAll": "TODOS",
"shrineCategoryNameAccessories": "ACESSÓRIOS",
"shrineCategoryNameClothing": "ROUPAS",
"shrineCategoryNameHome": "CASA",
"shrineLoginUsernameLabel": "Nome de usuário",
"shrineLoginPasswordLabel": "Senha",
"shrineCancelButtonCaption": "CANCELAR",
"shrineCartTaxCaption": "Tributos:",
"shrineCartPageCaption": "CARRINHO",
"shrineProductQuantity": "Quantidade: {quantity}",
"shrineProductPrice": "x {price}",
"shrineCartItemCount": "{quantity,plural,=0{NENHUM ITEM}=1{1 ITEM}other{{quantity} ITENS}}",
"shrineCartClearButtonCaption": "LIMPAR CARRINHO",
"shrineCartTotalCaption": "TOTAL",
"shrineCartSubtotalCaption": "Subtotal:",
"shrineCartShippingCaption": "Entrega:",
"shrineProductGreySlouchTank": "Regata larga cinza",
"shrineProductStellaSunglasses": "Óculos escuros Stella",
"shrineProductWhitePinstripeShirt": "Camisa branca listrada",
"demoTextFieldWhereCanWeReachYou": "Como podemos falar com você?",
"settingsTextDirectionLTR": "LTR",
"settingsTextScalingLarge": "Grande",
"demoBottomSheetHeader": "Cabeçalho",
"demoBottomSheetItem": "Item {value}",
"demoBottomTextFieldsTitle": "Campos de texto",
"demoTextFieldTitle": "Campos de texto",
"demoTextFieldSubtitle": "Uma linha de números e texto editáveis",
"demoTextFieldDescription": "Os campos de texto permitem que o usuário digite texto em uma IU. Eles geralmente aparecem em formulários e caixas de diálogo.",
"demoTextFieldShowPasswordLabel": "Mostrar senha",
"demoTextFieldHidePasswordLabel": "Ocultar senha",
"demoTextFieldFormErrors": "Corrija os erros em vermelho antes de enviar.",
"demoTextFieldNameRequired": "O campo \"Nome\" é obrigatório.",
"demoTextFieldOnlyAlphabeticalChars": "Digite apenas caracteres alfabéticos.",
"demoTextFieldEnterUSPhoneNumber": "(##) ###-#### - Digite um número de telefone dos EUA.",
"demoTextFieldEnterPassword": "Insira uma senha.",
"demoTextFieldPasswordsDoNotMatch": "As senhas não correspondem",
"demoTextFieldWhatDoPeopleCallYou": "Como as pessoas chamam você?",
"demoTextFieldNameField": "Nome*",
"demoBottomSheetButtonText": "MOSTRAR PÁGINA INFERIOR",
"demoTextFieldPhoneNumber": "Número de telefone*",
"demoBottomSheetTitle": "Página inferior",
"demoTextFieldEmail": "E-mail",
"demoTextFieldTellUsAboutYourself": "Fale um pouco sobre você, por exemplo, escreva o que você faz ou quais são seus hobbies",
"demoTextFieldKeepItShort": "Seja breve. Isto é apenas uma demonstração.",
"starterAppGenericButton": "BOTÃO",
"demoTextFieldLifeStory": "Biografia",
"demoTextFieldSalary": "Salário",
"demoTextFieldUSD": "USD",
"demoTextFieldNoMoreThan": "No máximo 8 caracteres",
"demoTextFieldPassword": "Senha*",
"demoTextFieldRetypePassword": "Digite a senha novamente*",
"demoTextFieldSubmit": "ENVIAR",
"demoBottomNavigationSubtitle": "Navegação da parte inferior com visualização de esmaecimento cruzado",
"demoBottomSheetAddLabel": "Adicionar",
"demoBottomSheetModalDescription": "Uma página inferior modal é uma alternativa a um menu ou uma caixa de diálogo e evita que o usuário interaja com o restante do app.",
"demoBottomSheetModalTitle": "Página inferior modal",
"demoBottomSheetPersistentDescription": "Uma página inferior persistente mostra informações que suplementam o conteúdo principal do app. Essa página permanece visível mesmo quando o usuário interage com outras partes do app.",
"demoBottomSheetPersistentTitle": "Página inferior persistente",
"demoBottomSheetSubtitle": "Páginas inferiores persistente e modal",
"demoTextFieldNameHasPhoneNumber": "O número de telefone de {name} é {phoneNumber}",
"buttonText": "BOTÃO",
"demoTypographyDescription": "Definições para os vários estilos tipográficos encontrados no Material Design.",
"demoTypographySubtitle": "Todos os estilos de texto pré-definidos",
"demoTypographyTitle": "Tipografia",
"demoFullscreenDialogDescription": "A propriedade fullscreenDialog especifica se a página recebida é uma caixa de diálogo modal em tela cheia",
"demoFlatButtonDescription": "Um botão plano exibe um borrão de tinta ao ser pressionado, mas sem elevação. Use botões planos em barras de ferramenta, caixas de diálogo e inline com padding",
"demoBottomNavigationDescription": "As barras de navegação inferiores exibem de três a cinco destinos na parte inferior da tela. Cada destino é representado por um ícone e uma etiqueta de texto opcional. Quando um ícone de navegação da parte inferior é tocado, o usuário é levado para o nível superior do destino de navegação associado a esse ícone.",
"demoBottomNavigationSelectedLabel": "Etiqueta selecionada",
"demoBottomNavigationPersistentLabels": "Etiquetas persistentes",
"starterAppDrawerItem": "Item {value}",
"demoTextFieldRequiredField": "* indica um campo obrigatório",
"demoBottomNavigationTitle": "Navegação na parte inferior",
"settingsLightTheme": "Claro",
"settingsTheme": "Tema",
"settingsPlatformIOS": "iOS",
"settingsPlatformAndroid": "Android",
"settingsTextDirectionRTL": "RTL",
"settingsTextScalingHuge": "Enorme",
"cupertinoButton": "Botão",
"settingsTextScalingNormal": "Normal",
"settingsTextScalingSmall": "Pequeno",
"settingsSystemDefault": "Sistema",
"settingsTitle": "Configurações",
"rallyDescription": "Um app de finanças pessoais",
"aboutDialogDescription": "Para ver o código-fonte desse app, acesse {repoLink}.",
"bottomNavigationCommentsTab": "Comentários",
"starterAppGenericBody": "Corpo",
"starterAppGenericHeadline": "Título",
"starterAppGenericSubtitle": "Subtítulo",
"starterAppGenericTitle": "Título",
"starterAppTooltipSearch": "Pesquisar",
"starterAppTooltipShare": "Compartilhar",
"starterAppTooltipFavorite": "Favorito",
"starterAppTooltipAdd": "Adicionar",
"bottomNavigationCalendarTab": "Agenda",
"starterAppDescription": "Um layout inicial responsivo",
"starterAppTitle": "App Starter",
"aboutFlutterSamplesRepo": "Amostra do Flutter no repositório GitHub",
"bottomNavigationContentPlaceholder": "Marcador para a guia {title}",
"bottomNavigationCameraTab": "Câmera",
"bottomNavigationAlarmTab": "Alarme",
"bottomNavigationAccountTab": "Conta",
"demoTextFieldYourEmailAddress": "Seu endereço de e-mail",
"demoToggleButtonDescription": "Botões ativar podem ser usados para opções relacionadas a grupos. Para enfatizar grupos de botões ativar relacionados, um grupo precisa compartilhar um mesmo contêiner",
"colorsGrey": "CINZA",
"colorsBrown": "MARROM",
"colorsDeepOrange": "LARANJA INTENSO",
"colorsOrange": "LARANJA",
"colorsAmber": "ÂMBAR",
"colorsYellow": "AMARELO",
"colorsLime": "VERDE-LIMÃO",
"colorsLightGreen": "VERDE-CLARO",
"colorsGreen": "VERDE",
"homeHeaderGallery": "Galeria",
"homeHeaderCategories": "Categorias",
"shrineDescription": "Um app de varejo da moda",
"craneDescription": "Um app de viagens personalizado",
"homeCategoryReference": "ESTILOS E OUTRAS",
"demoInvalidURL": "Não foi possível exibir o URL:",
"demoOptionsTooltip": "Opções",
"demoInfoTooltip": "Informações",
"demoCodeTooltip": "Código de demonstração",
"demoDocumentationTooltip": "Documentação da API",
"demoFullscreenTooltip": "Tela cheia",
"settingsTextScaling": "Tamanho do texto",
"settingsTextDirection": "Orientação do texto",
"settingsLocale": "Localidade",
"settingsPlatformMechanics": "Mecânica da plataforma",
"settingsDarkTheme": "Escuro",
"settingsSlowMotion": "Câmera lenta",
"settingsAbout": "Sobre a Flutter Gallery",
"settingsFeedback": "Enviar feedback",
"settingsAttribution": "Criado pela TOASTER em Londres",
"demoButtonTitle": "Botões",
"demoButtonSubtitle": "Texto, elevado, circunscrito e muito mais",
"demoFlatButtonTitle": "Botão plano",
"demoRaisedButtonDescription": "Botões em relevo adicionam dimensão a layouts praticamente planos. Eles enfatizam funções em espaços cheios ou amplos.",
"demoRaisedButtonTitle": "Botão em relevo",
"demoOutlineButtonTitle": "Botão circunscrito",
"demoOutlineButtonDescription": "Botões circunscritos ficam opacos e elevados quando pressionados. Geralmente, são combinados com botões em relevo para indicar uma ação secundária e alternativa.",
"demoToggleButtonTitle": "Botões ativar",
"colorsTeal": "AZUL-PETRÓLEO",
"demoFloatingButtonTitle": "Botão de ação flutuante",
"demoFloatingButtonDescription": "Um botão de ação flutuante é um botão de ícone circular que paira sobre o conteúdo para promover uma ação principal no aplicativo.",
"demoDialogTitle": "Caixas de diálogo",
"demoDialogSubtitle": "Simples, alerta e tela cheia",
"demoAlertDialogTitle": "Alerta",
"demoAlertDialogDescription": "Uma caixa de diálogo de alerta informa o usuário sobre situações que precisam ser confirmadas. A caixa de diálogo de alerta tem uma lista de ações e um título opcionais.",
"demoAlertTitleDialogTitle": "Alerta com título",
"demoSimpleDialogTitle": "Simples",
"demoSimpleDialogDescription": "Uma caixa de diálogo simples oferece ao usuário uma escolha entre várias opções. A caixa de diálogo simples tem um título opcional que é exibido acima das opções.",
"demoFullscreenDialogTitle": "Tela cheia",
"demoCupertinoButtonsTitle": "Botões",
"demoCupertinoButtonsSubtitle": "Botões no estilo iOS",
"demoCupertinoButtonsDescription": "Um botão no estilo iOS. Ele engloba um texto e/ou um ícone que desaparece e reaparece com o toque. Pode conter um plano de fundo.",
"demoCupertinoAlertsTitle": "Alertas",
"demoCupertinoAlertsSubtitle": "Caixas de diálogos de alerta no estilo iOS",
"demoCupertinoAlertTitle": "Alerta",
"demoCupertinoAlertDescription": "Uma caixa de diálogo de alerta informa o usuário sobre situações que precisam ser confirmadas. A caixa de diálogo de alerta tem uma lista de ações, um título e conteúdo opcionais. O título é exibido acima do conteúdo, e as ações são exibidas abaixo dele.",
"demoCupertinoAlertWithTitleTitle": "Alerta com título",
"demoCupertinoAlertButtonsTitle": "Alerta com botões",
"demoCupertinoAlertButtonsOnlyTitle": "Apenas botões de alerta",
"demoCupertinoActionSheetTitle": "Página de ações",
"demoCupertinoActionSheetDescription": "Uma página de ações é um estilo específico de alerta que apresenta ao usuário um conjunto de duas ou mais opções relacionadas ao contexto atual. A página de ações pode ter um título, uma mensagem adicional e uma lista de ações.",
"demoColorsTitle": "Cores",
"demoColorsSubtitle": "Todas as cores predefinidas",
"demoColorsDescription": "Constantes de cores e de amostras de cores que representam a paleta do Material Design.",
"buttonTextEnabled": "ENABLED",
"buttonTextDisabled": "DISABLED",
"buttonTextCreate": "Criar",
"dialogSelectedOption": "Você selecionou: \"{value}\"",
"dialogDiscardTitle": "Descartar rascunho?",
"dialogLocationTitle": "Usar serviço de localização do Google?",
"dialogLocationDescription": "Deixe o Google ajudar os apps a determinar locais. Isso significa enviar dados de local anônimos para o Google, mesmo quando nenhum app estiver em execução.",
"dialogCancel": "CANCELAR",
"dialogDiscard": "DESCARTAR",
"dialogDisagree": "DISCORDO",
"dialogAgree": "CONCORDO",
"dialogSetBackup": "Definir conta de backup",
"colorsBlueGrey": "CINZA-AZULADO",
"dialogShow": "MOSTRAR CAIXA DE DIÁLOGO",
"dialogFullscreenTitle": "Caixa de diálogo de tela cheia",
"dialogFullscreenSave": "SALVAR",
"dialogFullscreenDescription": "Uma demonstração de caixa de diálogo em tela cheia",
"cupertinoButtonEnabled": "Enabled",
"cupertinoButtonDisabled": "Disabled",
"cupertinoButtonWithBackground": "Com plano de fundo",
"cupertinoAlertCancel": "Cancelar",
"cupertinoAlertDiscard": "Descartar",
"cupertinoAlertLocationTitle": "Permitir que o \"Maps\" acesse seu local enquanto você estiver usando o app?",
"cupertinoAlertLocationDescription": "Seu local atual será exibido no mapa e usado para rotas, resultados da pesquisa por perto e tempo estimado de viagem.",
"cupertinoAlertAllow": "Permitir",
"cupertinoAlertDontAllow": "Não permitir",
"cupertinoAlertFavoriteDessert": "Selecionar sobremesa favorita",
"cupertinoAlertDessertDescription": "Selecione seu tipo favorito de sobremesa na lista abaixo. Sua seleção será usada para personalizar a lista sugerida de restaurantes na sua área.",
"cupertinoAlertCheesecake": "Cheesecake",
"cupertinoAlertTiramisu": "Tiramisu",
"cupertinoAlertApplePie": "Torta de maçã",
"cupertinoAlertChocolateBrownie": "Brownie de chocolate",
"cupertinoShowAlert": "Mostrar alerta",
"colorsRed": "VERMELHO",
"colorsPink": "ROSA",
"colorsPurple": "ROXO",
"colorsDeepPurple": "ROXO INTENSO",
"colorsIndigo": "ÍNDIGO",
"colorsBlue": "AZUL",
"colorsLightBlue": "AZUL-CLARO",
"colorsCyan": "CIANO",
"dialogAddAccount": "Adicionar conta",
"Gallery": "Galeria",
"Categories": "Categorias",
"SHRINE": "SHRINE",
"Basic shopping app": "App básico de compras",
"RALLY": "RALLY",
"CRANE": "CRANE",
"Travel app": "App de viagem",
"MATERIAL": "MATERIAL",
"CUPERTINO": "CUPERTINO",
"REFERENCE STYLES & MEDIA": "MÍDIA E ESTILOS DE REFERÊNCIA"
}
| gallery/lib/l10n/intl_pt.arb/0 | {
"file_path": "gallery/lib/l10n/intl_pt.arb",
"repo_id": "gallery",
"token_count": 19462
} | 870 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.