Skip to content

Commit 6fca5d5

Browse files
ami-b-simformPRBaraiya
authored andcommitted
✨ Add localisation and RTL support
1 parent 229a593 commit 6fca5d5

40 files changed

+951
-332
lines changed

example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>11.0</string>
24+
<string>12.0</string>
2525
</dict>
2626
</plist>

example/ios/Flutter/Debug.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
12
#include "Generated.xcconfig"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
12
#include "Generated.xcconfig"

example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '11.0'
2+
# platform :ios, '12.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 72 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12+
43C74952AA5A34017219AC0E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B9A36AD6A90D6378475C69D /* Pods_Runner.framework */; };
1213
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
1314
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1415
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
@@ -29,9 +30,12 @@
2930
/* End PBXCopyFilesBuildPhase section */
3031

3132
/* Begin PBXFileReference section */
33+
0B9A36AD6A90D6378475C69D /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3234
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
3335
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3436
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
37+
442DC407E8F483C1BE7C591B /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
38+
65F4E7F7033A77CE8E20E4DA /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
3539
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
3640
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
3741
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
@@ -42,19 +46,29 @@
4246
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4347
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4448
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
49+
C8206D05A693139F89BD132C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
4550
/* End PBXFileReference section */
4651

4752
/* Begin PBXFrameworksBuildPhase section */
4853
97C146EB1CF9000F007C117D /* Frameworks */ = {
4954
isa = PBXFrameworksBuildPhase;
5055
buildActionMask = 2147483647;
5156
files = (
57+
43C74952AA5A34017219AC0E /* Pods_Runner.framework in Frameworks */,
5258
);
5359
runOnlyForDeploymentPostprocessing = 0;
5460
};
5561
/* End PBXFrameworksBuildPhase section */
5662

5763
/* Begin PBXGroup section */
64+
6D6BE93007C922F43A6B98B9 /* Frameworks */ = {
65+
isa = PBXGroup;
66+
children = (
67+
0B9A36AD6A90D6378475C69D /* Pods_Runner.framework */,
68+
);
69+
name = Frameworks;
70+
sourceTree = "<group>";
71+
};
5872
9740EEB11CF90186004384FC /* Flutter */ = {
5973
isa = PBXGroup;
6074
children = (
@@ -72,6 +86,8 @@
7286
9740EEB11CF90186004384FC /* Flutter */,
7387
97C146F01CF9000F007C117D /* Runner */,
7488
97C146EF1CF9000F007C117D /* Products */,
89+
D09A0C5C985507FB592C896E /* Pods */,
90+
6D6BE93007C922F43A6B98B9 /* Frameworks */,
7591
);
7692
sourceTree = "<group>";
7793
};
@@ -98,19 +114,32 @@
98114
path = Runner;
99115
sourceTree = "<group>";
100116
};
117+
D09A0C5C985507FB592C896E /* Pods */ = {
118+
isa = PBXGroup;
119+
children = (
120+
65F4E7F7033A77CE8E20E4DA /* Pods-Runner.debug.xcconfig */,
121+
442DC407E8F483C1BE7C591B /* Pods-Runner.release.xcconfig */,
122+
C8206D05A693139F89BD132C /* Pods-Runner.profile.xcconfig */,
123+
);
124+
name = Pods;
125+
path = Pods;
126+
sourceTree = "<group>";
127+
};
101128
/* End PBXGroup section */
102129

103130
/* Begin PBXNativeTarget section */
104131
97C146ED1CF9000F007C117D /* Runner */ = {
105132
isa = PBXNativeTarget;
106133
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107134
buildPhases = (
135+
0E7483930FBB031F44796639 /* [CP] Check Pods Manifest.lock */,
108136
9740EEB61CF901F6004384FC /* Run Script */,
109137
97C146EA1CF9000F007C117D /* Sources */,
110138
97C146EB1CF9000F007C117D /* Frameworks */,
111139
97C146EC1CF9000F007C117D /* Resources */,
112140
9705A1C41CF9048500538489 /* Embed Frameworks */,
113141
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
142+
084300CD3615B346CEEA5DEB /* [CP] Embed Pods Frameworks */,
114143
);
115144
buildRules = (
116145
);
@@ -127,7 +156,7 @@
127156
97C146E61CF9000F007C117D /* Project object */ = {
128157
isa = PBXProject;
129158
attributes = {
130-
LastUpgradeCheck = 1300;
159+
LastUpgradeCheck = 1510;
131160
ORGANIZATIONNAME = "";
132161
TargetAttributes = {
133162
97C146ED1CF9000F007C117D = {
@@ -169,6 +198,45 @@
169198
/* End PBXResourcesBuildPhase section */
170199

171200
/* Begin PBXShellScriptBuildPhase section */
201+
084300CD3615B346CEEA5DEB /* [CP] Embed Pods Frameworks */ = {
202+
isa = PBXShellScriptBuildPhase;
203+
buildActionMask = 2147483647;
204+
files = (
205+
);
206+
inputFileListPaths = (
207+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
208+
);
209+
name = "[CP] Embed Pods Frameworks";
210+
outputFileListPaths = (
211+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
212+
);
213+
runOnlyForDeploymentPostprocessing = 0;
214+
shellPath = /bin/sh;
215+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
216+
showEnvVarsInLog = 0;
217+
};
218+
0E7483930FBB031F44796639 /* [CP] Check Pods Manifest.lock */ = {
219+
isa = PBXShellScriptBuildPhase;
220+
buildActionMask = 2147483647;
221+
files = (
222+
);
223+
inputFileListPaths = (
224+
);
225+
inputPaths = (
226+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
227+
"${PODS_ROOT}/Manifest.lock",
228+
);
229+
name = "[CP] Check Pods Manifest.lock";
230+
outputFileListPaths = (
231+
);
232+
outputPaths = (
233+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
234+
);
235+
runOnlyForDeploymentPostprocessing = 0;
236+
shellPath = /bin/sh;
237+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
238+
showEnvVarsInLog = 0;
239+
};
172240
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173241
isa = PBXShellScriptBuildPhase;
174242
alwaysOutOfDate = 1;
@@ -275,7 +343,7 @@
275343
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
276344
GCC_WARN_UNUSED_FUNCTION = YES;
277345
GCC_WARN_UNUSED_VARIABLE = YES;
278-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
346+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
279347
MTL_ENABLE_DEBUG_INFO = NO;
280348
SDKROOT = iphoneos;
281349
SUPPORTED_PLATFORMS = iphoneos;
@@ -352,7 +420,7 @@
352420
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
353421
GCC_WARN_UNUSED_FUNCTION = YES;
354422
GCC_WARN_UNUSED_VARIABLE = YES;
355-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
423+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
356424
MTL_ENABLE_DEBUG_INFO = YES;
357425
ONLY_ACTIVE_ARCH = YES;
358426
SDKROOT = iphoneos;
@@ -401,7 +469,7 @@
401469
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
402470
GCC_WARN_UNUSED_FUNCTION = YES;
403471
GCC_WARN_UNUSED_VARIABLE = YES;
404-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
472+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
405473
MTL_ENABLE_DEBUG_INFO = NO;
406474
SDKROOT = iphoneos;
407475
SUPPORTED_PLATFORMS = iphoneos;

example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1300"
3+
LastUpgradeVersion = "1510"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
2930
shouldUseLaunchSchemeArgsEnv = "YES">
3031
<Testables>
3132
</Testables>
@@ -45,11 +46,13 @@
4546
buildConfiguration = "Debug"
4647
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4748
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
49+
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
4850
launchStyle = "0"
4951
useCustomWorkingDirectory = "NO"
5052
ignoresPersistentStateOnLaunch = "NO"
5153
debugDocumentVersioning = "YES"
5254
debugServiceExtension = "internal"
55+
enableGPUValidationMode = "1"
5356
allowLocationSimulation = "YES">
5457
<BuildableProductRunnable
5558
runnableDebuggingMode = "0">

example/ios/Runner.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/ios/Runner/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import UIKit
22
import Flutter
33

4-
@UIApplicationMain
4+
@main
55
@objc class AppDelegate: FlutterAppDelegate {
66
override func application(
77
_ application: UIApplication,

example/l10n.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
arb-dir: lib/l10n
2+
template-arb-file: app_en.arb
3+
output-localization-file: app_localizations.dart

example/lib/extension.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
22
import 'package:intl/intl.dart';
33

44
import 'enumerations.dart';
5+
import 'l10n/app_localizations.dart';
56
import 'theme/app_colors.dart';
67
import 'theme/app_theme_extension.dart';
78

@@ -132,3 +133,7 @@ extension BuildContextExtension on BuildContext {
132133
Theme.of(this).extension<AppThemeExtension>() ??
133134
AppThemeExtension.light();
134135
}
136+
137+
extension Translate on BuildContext {
138+
AppLocalizations get translate => AppLocalizations.of(this)!;
139+
}

0 commit comments

Comments
 (0)