From ce4a7ad918e8ac8b7df9b53ebc15cbcecf7ce291 Mon Sep 17 00:00:00 2001 From: Hiddify Date: Fri, 8 Mar 2024 15:59:06 +0100 Subject: [PATCH] fix: ip flag --- lib/features/proxy/active/ip_widget.dart | 4 +++- lib/utils/text_utils.dart | 1 - pubspec.lock | 9 +++++---- pubspec.yaml | 6 +++++- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/features/proxy/active/ip_widget.dart b/lib/features/proxy/active/ip_widget.dart index 75ea7ae9..7c6d89cd 100644 --- a/lib/features/proxy/active/ip_widget.dart +++ b/lib/features/proxy/active/ip_widget.dart @@ -131,7 +131,9 @@ class IPCountryFlag extends HookConsumerWidget { width: size, height: size, padding: const EdgeInsets.all(2), - child: Center(child: CircleFlag(countryCode)), + child: Center( + child: CircleFlag(countryCode == "ir" ? "ir-shir" : countryCode), + ), ), ); } diff --git a/lib/utils/text_utils.dart b/lib/utils/text_utils.dart index 4a6e2ea4..4b129e54 100644 --- a/lib/utils/text_utils.dart +++ b/lib/utils/text_utils.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:hiddify/gen/fonts.gen.dart'; import 'package:intl/intl.dart' as intl; -import 'dart:io'; extension TextAlignX on BuildContext { bool get isRtl => Directionality.of(this) == TextDirection.rtl; diff --git a/pubspec.lock b/pubspec.lock index a568bb9a..fac5b9bb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -172,10 +172,11 @@ packages: circle_flags: dependency: "direct main" description: - name: circle_flags - sha256: "028d5ca1bb12b9a4b29dc1a25f32a428ffd69e91343274375d9e574855af2daa" - url: "https://pub.dev" - source: hosted + path: "." + ref: patch-1 + resolved-ref: f78f22dcc19306f2a602b1c50f3c7a324456be9c + url: "https://github.com/hiddify-com/flutter_circle_flags.git" + source: git version: "4.0.2" cli_util: dependency: transitive diff --git a/pubspec.yaml b/pubspec.yaml index cc13b1f6..161a4730 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -73,7 +73,11 @@ dependencies: wolt_modal_sheet: ^0.4.1 dart_mappable: ^4.2.1 fluentui_system_icons: ^1.1.229 - circle_flags: ^4.0.2 + # circle_flags: ^4.0.2 + circle_flags: + git: + url: https://github.com/hiddify-com/flutter_circle_flags.git + ref: patch-1 http: ^1.2.0 timezone_to_country: ^2.1.0 json_path: ^0.7.1