Merge pull request 'show eu flag if it is empty' (#126) from fixed_flags into main
Reviewed-on: https://repo.ravanertebat.com/TM/tm_app/pulls/126
This commit is contained in:
@@ -48,8 +48,9 @@ class TenderLocationSection extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 4.0.w()),
|
SizedBox(width: 4.0.w()),
|
||||||
if (detail.countryCode != null)
|
detail.countryCode != null
|
||||||
Flag(countryCode: detail.countryCode!),
|
? Flag(countryCode: detail.countryCode!)
|
||||||
|
: const Flag(countryCode: ''),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 8.0.h()),
|
SizedBox(height: 8.0.h()),
|
||||||
|
|||||||
@@ -114,8 +114,9 @@ class TendersListItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8.0.w()),
|
SizedBox(width: 8.0.w()),
|
||||||
if (tender.countryCode != null)
|
tender.countryCode != null
|
||||||
Flag(countryCode: tender.countryCode!),
|
? Flag(countryCode: tender.countryCode!)
|
||||||
|
: const Flag(countryCode: ''),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -166,8 +166,9 @@ class LikedListItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8.0.w()),
|
SizedBox(width: 8.0.w()),
|
||||||
if (tender.countryCode != null)
|
tender.countryCode != null
|
||||||
Flag(countryCode: tender.countryCode!),
|
? Flag(countryCode: tender.countryCode!)
|
||||||
|
: Flag(countryCode: ''),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|||||||
@@ -75,11 +75,7 @@ class _CachedSvgState extends State<CachedSvg> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (_isLoading) {
|
if (_isLoading) {
|
||||||
return SizedBox(
|
return SizedBox();
|
||||||
width: widget.width ?? 20,
|
|
||||||
height: widget.height ?? 20,
|
|
||||||
child: const Center(child: CircularProgressIndicator()),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_svgData == null) {
|
if (_svgData == null) {
|
||||||
|
|||||||
+12
-11
@@ -11,16 +11,17 @@ class Flag extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return countryCode.isNotEmpty
|
return ClipRRect(
|
||||||
? ClipRRect(
|
borderRadius: BorderRadius.circular(6),
|
||||||
borderRadius: BorderRadius.circular(6),
|
child: CachedSvg(
|
||||||
child: CachedSvg(
|
url:
|
||||||
url: '${AppConfig.flagUrl}$countryCode',
|
countryCode.isNotEmpty
|
||||||
width: 32.0.w(),
|
? '${AppConfig.flagUrl}$countryCode'
|
||||||
height: 21.0.h(),
|
: '${AppConfig.flagUrl}EU',
|
||||||
fit: BoxFit.cover,
|
width: 32.0.w(),
|
||||||
),
|
height: 21.0.h(),
|
||||||
)
|
fit: BoxFit.cover,
|
||||||
: const SizedBox();
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -252,8 +252,9 @@ class TenderCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
SizedBox(width: 8.0.w()),
|
SizedBox(width: 8.0.w()),
|
||||||
// Country flag placeholder
|
// Country flag placeholder
|
||||||
if (tender.countryCode != null)
|
tender.countryCode != null
|
||||||
Flag(countryCode: tender.countryCode!),
|
? Flag(countryCode: tender.countryCode!)
|
||||||
|
: Flag(countryCode: ''),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -169,8 +169,9 @@ class TenderCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8.0.w()),
|
SizedBox(width: 8.0.w()),
|
||||||
if (tender.countryCode != null)
|
tender.countryCode != null
|
||||||
Flag(countryCode: tender.countryCode!),
|
? Flag(countryCode: tender.countryCode!)
|
||||||
|
: Flag(countryCode: ''),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user