Expanded countrycode instead of abbreviation

Using primaryColor in places instead of directly using Colors
This commit is contained in:
Kingkor Roy Tirtho 2022-06-10 16:41:25 +06:00
parent dedbf14f97
commit 2b75076f82
5 changed files with 228 additions and 203 deletions

View File

@ -141,7 +141,9 @@ class SyncedLyrics extends HookConsumerWidget {
lyricSlice.text,
style: TextStyle(
// indicating the active state of that lyric slice
color: isActive ? Colors.green : null,
color: isActive
? Theme.of(context).primaryColor
: null,
fontWeight: isActive ? FontWeight.bold : null,
fontSize: 30,
),

View File

@ -30,7 +30,7 @@ class PlayerTrackDetails extends HookConsumerWidget {
return Container(
height: 50,
width: 50,
color: Colors.green[400],
color: Theme.of(context).primaryColor,
);
},
),

View File

@ -133,23 +133,44 @@ class Settings extends HookConsumerWidget {
onTap: pickColorScheme(ColorSchemeType.background),
),
const SizedBox(height: 10),
ListTile(
title:
const Text("Market Place (Recommendation Country)"),
horizontalTitleGap: 10,
trailing: DropdownButton(
Padding(
padding: const EdgeInsets.all(15),
child: Wrap(
alignment: WrapAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Market Place",
style: Theme.of(context).textTheme.bodyText1,
),
Text(
"Recommendation Country",
style: Theme.of(context).textTheme.caption,
),
],
),
const SizedBox(height: 10),
DropdownButton(
value: preferences.recommendationMarket,
items: spotifyMarkets
.map((country) => (DropdownMenuItem(
child: Text(country),
value: country,
)))
.map(
(country) => (DropdownMenuItem(
child: Text(country.last),
value: country.first,
)),
)
.toList(),
onChanged: (value) {
if (value == null) return;
preferences.setRecommendationMarket(value as String);
preferences.setRecommendationMarket(
value as String,
);
},
),
],
),
),
ListTile(
title: const Text("Download lyrics along with the Track"),

View File

@ -175,7 +175,7 @@ class TrackTile extends HookConsumerWidget {
return Container(
height: 40,
width: 40,
color: Colors.green[300],
color: Theme.of(context).primaryColor,
);
},
imageUrl: thumbnailUrl!,

View File

@ -1,186 +1,188 @@
// Country Codes contributed by momobobe <https://github.com/momobobe>
final spotifyMarkets = [
"AD",
"AE",
"AG",
"AL",
"AM",
"AO",
"AR",
"AT",
"AU",
"AZ",
"BA",
"BB",
"BD",
"BE",
"BF",
"BG",
"BH",
"BI",
"BJ",
"BN",
"BO",
"BR",
"BS",
"BT",
"BW",
"BY",
"BZ",
"CA",
"CD",
"CG",
"CH",
"CI",
"CL",
"CM",
"CO",
"CR",
"CV",
"CW",
"CY",
"CZ",
"DE",
"DJ",
"DK",
"DM",
"DO",
"DZ",
"EC",
"EE",
"EG",
"ES",
"FI",
"FJ",
"FM",
"FR",
"GA",
"GB",
"GD",
"GE",
"GH",
"GM",
"GN",
"GQ",
"GR",
"GT",
"GW",
"GY",
"HK",
"HN",
"HR",
"HT",
"HU",
"ID",
"IE",
"IL",
"IN",
"IQ",
"IS",
"IT",
"JM",
"JO",
"JP",
"KE",
"KG",
"KH",
"KI",
"KM",
"KN",
"KR",
"KW",
"KZ",
"LA",
"LB",
"LC",
"LI",
"LK",
"LR",
"LS",
"LT",
"LU",
"LV",
"LY",
"MA",
"MC",
"MD",
"ME",
"MG",
"MH",
"MK",
"ML",
"MN",
"MO",
"MR",
"MT",
"MU",
"MV",
"MW",
"MX",
"MY",
"MZ",
"NA",
"NE",
"NG",
"NI",
"NL",
"NO",
"NP",
"NR",
"NZ",
"OM",
"PA",
"PE",
"PG",
"PH",
"PK",
"PL",
"PS",
"PT",
"PW",
"PY",
"QA",
"RO",
"RS",
"RU",
"RW",
"SA",
"SB",
"SC",
"SE",
"SG",
"SI",
"SK",
"SL",
"SM",
"SN",
"SR",
"ST",
"SV",
"SZ",
"TD",
"TG",
"TH",
"TJ",
"TL",
"TN",
"TO",
"TR",
"TT",
"TV",
"TW",
"TZ",
"UA",
"UG",
"US",
"UY",
"UZ",
"VC",
"VE",
"VN",
"VU",
"WS",
"XK",
"ZA",
"ZM",
"ZW"
["AL", "Albania (AL)"],
["DZ", "Algeria (DZ)"],
["AD", "Andorra (AD)"],
["AO", "Angola (AO)"],
["AG", "Antigua and Barbuda (AG)"],
["AR", "Argentina (AR)"],
["AM", "Armenia (AM)"],
["AU", "Australia (AU)"],
["AT", "Austria (AT)"],
["AZ", "Azerbaijan (AZ)"],
["BH", "Bahrain (BH)"],
["BD", "Bangladesh (BD)"],
["BB", "Barbados (BB)"],
["BY", "Belarus (BY)"],
["BE", "Belgium (BE)"],
["BZ", "Belize (BZ)"],
["BJ", "Benin (BJ)"],
["BT", "Bhutan (BT)"],
["BO", "Bolivia (BO)"],
["BA", "Bosnia and Herzegovina (BA)"],
["BW", "Botswana (BW)"],
["BR", "Brazil (BR)"],
["BN", "Brunei Darussalam (BN)"],
["BG", "Bulgaria (BG)"],
["BF", "Burkina Faso (BF)"],
["BI", "Burundi (BI)"],
["CV", "Cabo Verde / Cape Verde (CV)"],
["KH", "Cambodia (KH)"],
["CM", "Cameroon (CM)"],
["CA", "Canada (CA)"],
["TD", "Chad (TD)"],
["CL", "Chile (CL)"],
["CO", "Colombia (CO)"],
["KM", "Comoros (KM)"],
["CR", "Costa Rica (CR)"],
["HR", "Croatia (HR)"],
["CW", "Curaçao (CW)"],
["CY", "Cyprus (CY)"],
["CZ", "Czech Republic (CZ)"],
["CI", "Côte d'Ivoire / Ivory Coast (CI)"],
["CD", "Democratic Republic of the Congo (CD)"],
["DK", "Denmark (DK)"],
["DJ", "Djibouti (DJ)"],
["DM", "Dominica (DM)"],
["DO", "Dominican Republic (DO)"],
["EC", "Ecuador (EC)"],
["EG", "Egypt (EG)"],
["SV", "El Salvador (SV)"],
["GQ", "Equatorial Guinea (GQ)"],
["EE", "Estonia (EE)"],
["SZ", "Eswatini (SZ)"],
["FJ", "Fiji (FJ)"],
["FI", "Finland (FI)"],
["FR", "France (FR)"],
["GA", "Gabon (GA)"],
["GE", "Georgia (GE)"],
["DE", "Germany (DE)"],
["GH", "Ghana (GH)"],
["GR", "Greece (GR)"],
["GD", "Grenada (GD)"],
["GT", "Guatemala (GT)"],
["GN", "Guinea (GN)"],
["GW", "Guinea-Bissau (GW)"],
["GY", "Guyana (GY)"],
["HT", "Haiti (HT)"],
["HN", "Honduras (HN)"],
["HK", "Hong Kong (HK)"],
["HU", "Hungary (HU)"],
["IS", "Iceland (IS)"],
["IN", "India (IN)"],
["ID", "Indonesia (ID)"],
["IQ", "Iraq (IQ)"],
["IE", "Ireland (IE)"],
["IL", "Israel (IL)"],
["IT", "Italy (IT)"],
["JM", "Jamaica (JM)"],
["JP", "Japan (JP)"],
["JO", "Jordan (JO)"],
["KZ", "Kazakhstan (KZ)"],
["KE", "Kenya (KE)"],
["KI", "Kiribati (KI)"],
["XK", "Kosovo (XK)"],
["KW", "Kuwait (KW)"],
["KG", "Kyrgyzstan (KG)"],
["LA", "Laos (LA)"],
["LV", "Latvia (LV)"],
["LB", "Lebanon (LB)"],
["LS", "Lesotho (LS)"],
["LR", "Liberia (LR)"],
["LY", "Libya (LY)"],
["LI", "Liechtenstein (LI)"],
["LT", "Lithuania (LT)"],
["LU", "Luxembourg (LU)"],
["MO", "Macao / Macau (MO)"],
["MG", "Madagascar (MG)"],
["MW", "Malawi (MW)"],
["MY", "Malaysia (MY)"],
["MV", "Maldives (MV)"],
["ML", "Mali (ML)"],
["MT", "Malta (MT)"],
["MH", "Marshall Islands (MH)"],
["MR", "Mauritania (MR)"],
["MU", "Mauritius (MU)"],
["MX", "Mexico (MX)"],
["FM", "Micronesia (FM)"],
["MD", "Moldova (MD)"],
["MC", "Monaco (MC)"],
["MN", "Mongolia (MN)"],
["ME", "Montenegro (ME)"],
["MA", "Morocco (MA)"],
["MZ", "Mozambique (MZ)"],
["NA", "Namibia (NA)"],
["NR", "Nauru (NR)"],
["NP", "Nepal (NP)"],
["NL", "Netherlands (NL)"],
["NZ", "New Zealand (NZ)"],
["NI", "Nicaragua (NI)"],
["NE", "Niger (NE)"],
["NG", "Nigeria (NG)"],
["MK", "North Macedonia (MK)"],
["NO", "Norway (NO)"],
["OM", "Oman (OM)"],
["PK", "Pakistan (PK)"],
["PW", "Palau (PW)"],
["PS", "Palestine (PS)"],
["PA", "Panama (PA)"],
["PG", "Papua New Guinea (PG)"],
["PY", "Paraguay (PY)"],
["PE", "Peru (PE)"],
["PH", "Philippines (PH)"],
["PL", "Poland (PL)"],
["PT", "Portugal (PT)"],
["QA", "Qatar (QA)"],
["CG", "Republic of the Congo (CG)"],
["RO", "Romania (RO)"],
["RU", "Russia (RU)"],
["RW", "Rwanda (RW)"],
["WS", "Samoa (WS)"],
["SM", "San Marino (SM)"],
["SA", "Saudi Arabia (SA)"],
["SN", "Senegal (SN)"],
["RS", "Serbia (RS)"],
["SC", "Seychelles (SC)"],
["SL", "Sierra Leone (SL)"],
["SG", "Singapore (SG)"],
["SK", "Slovakia (SK)"],
["SI", "Slovenia (SI)"],
["SB", "Solomon Islands (SB)"],
["ZA", "South Africa (ZA)"],
["KR", "South Korea (KR)"],
["ES", "Spain (ES)"],
["LK", "Sri Lanka (LK)"],
["VC", "St Vincent and the Grenadines (VC)"],
["KN", "St. Kitts and Nevis (KN)"],
["LC", "St. Lucia (LC)"],
["SR", "Suriname (SR)"],
["SE", "Sweden (SE)"],
["CH", "Switzerland (CH)"],
["ST", "São Tomé and Príncipe (ST)"],
["TW", "Taiwan (TW)"],
["TJ", "Tajikistan (TJ)"],
["TZ", "Tanzania (TZ)"],
["TH", "Thailand (TH)"],
["BS", "The Bahamas (BS)"],
["GM", "The Gambia (GM)"],
["TL", "Timor-Leste / East Timor (TL)"],
["TG", "Togo (TG)"],
["TO", "Tonga (TO)"],
["TT", "Trinidad and Tobago (TT)"],
["TN", "Tunisia (TN)"],
["TR", "Turkey (TR)"],
["TV", "Tuvalu (TV)"],
["UG", "Uganda (UG)"],
["UA", "Ukraine (UA)"],
["AE", "United Arab Emirates (AE)"],
["GB", "United Kingdom (GB)"],
["US", "United States (US)"],
["UY", "Uruguay (UY)"],
["UZ", "Uzbekistan (UZ)"],
["VU", "Vanuatu (VU)"],
["VE", "Venezuela (VE)"],
["VN", "Vietnam (VN)"],
["ZM", "Zambia (ZM)"],
["Z", "Zimbabwe (ZW)"],
];