Skip to content

Commit d5b64fb

Browse files
committed
Finish news app
1 parent a4c243a commit d5b64fb

File tree

9 files changed

+273
-25
lines changed

9 files changed

+273
-25
lines changed

Courses/Dart And Flutter The Complete Developers Guide/news/ios/Runner.xcodeproj/project.pbxproj

+86-8
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1212
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
1313
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14+
4EA6A046A1EBDAF41F9BB1C9 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1161AEFC54B26495F257A920 /* libPods-Runner.a */; };
1415
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
1516
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
16-
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
1717
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
1818
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
1919
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
@@ -37,10 +37,12 @@
3737
/* End PBXCopyFilesBuildPhase section */
3838

3939
/* Begin PBXFileReference section */
40+
1161AEFC54B26495F257A920 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4041
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
4142
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
4243
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
4344
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
45+
7A88D576209A604E68F26690 /* 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>"; };
4446
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
4547
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
4648
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -53,6 +55,8 @@
5355
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
5456
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
5557
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
58+
D87DEBDDA98273F59A665CD2 /* 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>"; };
59+
DBAF1AB5A95BA706ED9D811A /* 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>"; };
5660
/* End PBXFileReference section */
5761

5862
/* Begin PBXFrameworksBuildPhase section */
@@ -62,12 +66,23 @@
6266
files = (
6367
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
6468
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
69+
4EA6A046A1EBDAF41F9BB1C9 /* libPods-Runner.a in Frameworks */,
6570
);
6671
runOnlyForDeploymentPostprocessing = 0;
6772
};
6873
/* End PBXFrameworksBuildPhase section */
6974

7075
/* Begin PBXGroup section */
76+
441A43B27D668002193E4AC0 /* Pods */ = {
77+
isa = PBXGroup;
78+
children = (
79+
DBAF1AB5A95BA706ED9D811A /* Pods-Runner.debug.xcconfig */,
80+
7A88D576209A604E68F26690 /* Pods-Runner.release.xcconfig */,
81+
D87DEBDDA98273F59A665CD2 /* Pods-Runner.profile.xcconfig */,
82+
);
83+
path = Pods;
84+
sourceTree = "<group>";
85+
};
7186
9740EEB11CF90186004384FC /* Flutter */ = {
7287
isa = PBXGroup;
7388
children = (
@@ -87,7 +102,8 @@
87102
9740EEB11CF90186004384FC /* Flutter */,
88103
97C146F01CF9000F007C117D /* Runner */,
89104
97C146EF1CF9000F007C117D /* Products */,
90-
CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
105+
441A43B27D668002193E4AC0 /* Pods */,
106+
B850207AAE70828BCE1C141B /* Frameworks */,
91107
);
92108
sourceTree = "<group>";
93109
};
@@ -123,19 +139,29 @@
123139
name = "Supporting Files";
124140
sourceTree = "<group>";
125141
};
142+
B850207AAE70828BCE1C141B /* Frameworks */ = {
143+
isa = PBXGroup;
144+
children = (
145+
1161AEFC54B26495F257A920 /* libPods-Runner.a */,
146+
);
147+
name = Frameworks;
148+
sourceTree = "<group>";
149+
};
126150
/* End PBXGroup section */
127151

128152
/* Begin PBXNativeTarget section */
129153
97C146ED1CF9000F007C117D /* Runner */ = {
130154
isa = PBXNativeTarget;
131155
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
132156
buildPhases = (
157+
C914FAA7CDEFF002B4E3676A /* [CP] Check Pods Manifest.lock */,
133158
9740EEB61CF901F6004384FC /* Run Script */,
134159
97C146EA1CF9000F007C117D /* Sources */,
135160
97C146EB1CF9000F007C117D /* Frameworks */,
136161
97C146EC1CF9000F007C117D /* Resources */,
137162
9705A1C41CF9048500538489 /* Embed Frameworks */,
138163
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
164+
DC2008EB1508CC001D7EBFFA /* [CP] Embed Pods Frameworks */,
139165
);
140166
buildRules = (
141167
);
@@ -152,11 +178,12 @@
152178
97C146E61CF9000F007C117D /* Project object */ = {
153179
isa = PBXProject;
154180
attributes = {
155-
LastUpgradeCheck = 0910;
181+
LastUpgradeCheck = 1010;
156182
ORGANIZATIONNAME = "The Chromium Authors";
157183
TargetAttributes = {
158184
97C146ED1CF9000F007C117D = {
159185
CreatedOnToolsVersion = 7.3.1;
186+
DevelopmentTeam = 3Z364KZE8Z;
160187
};
161188
};
162189
};
@@ -185,7 +212,6 @@
185212
files = (
186213
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
187214
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
188-
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
189215
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
190216
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
191217
);
@@ -222,6 +248,50 @@
222248
shellPath = /bin/sh;
223249
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
224250
};
251+
C914FAA7CDEFF002B4E3676A /* [CP] Check Pods Manifest.lock */ = {
252+
isa = PBXShellScriptBuildPhase;
253+
buildActionMask = 2147483647;
254+
files = (
255+
);
256+
inputFileListPaths = (
257+
);
258+
inputPaths = (
259+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
260+
"${PODS_ROOT}/Manifest.lock",
261+
);
262+
name = "[CP] Check Pods Manifest.lock";
263+
outputFileListPaths = (
264+
);
265+
outputPaths = (
266+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
267+
);
268+
runOnlyForDeploymentPostprocessing = 0;
269+
shellPath = /bin/sh;
270+
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";
271+
showEnvVarsInLog = 0;
272+
};
273+
DC2008EB1508CC001D7EBFFA /* [CP] Embed Pods Frameworks */ = {
274+
isa = PBXShellScriptBuildPhase;
275+
buildActionMask = 2147483647;
276+
files = (
277+
);
278+
inputFileListPaths = (
279+
);
280+
inputPaths = (
281+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
282+
"${PODS_ROOT}/../.symlinks/flutter/ios-release/Flutter.framework",
283+
);
284+
name = "[CP] Embed Pods Frameworks";
285+
outputFileListPaths = (
286+
);
287+
outputPaths = (
288+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
289+
);
290+
runOnlyForDeploymentPostprocessing = 0;
291+
shellPath = /bin/sh;
292+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
293+
showEnvVarsInLog = 0;
294+
};
225295
/* End PBXShellScriptBuildPhase section */
226296

227297
/* Begin PBXSourcesBuildPhase section */
@@ -271,12 +341,14 @@
271341
CLANG_WARN_BOOL_CONVERSION = YES;
272342
CLANG_WARN_COMMA = YES;
273343
CLANG_WARN_CONSTANT_CONVERSION = YES;
344+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
274345
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
275346
CLANG_WARN_EMPTY_BODY = YES;
276347
CLANG_WARN_ENUM_CONVERSION = YES;
277348
CLANG_WARN_INFINITE_RECURSION = YES;
278349
CLANG_WARN_INT_CONVERSION = YES;
279350
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
351+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
280352
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
281353
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
282354
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -311,7 +383,7 @@
311383
buildSettings = {
312384
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
313385
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
314-
DEVELOPMENT_TEAM = S8QB4VV633;
386+
DEVELOPMENT_TEAM = 3Z364KZE8Z;
315387
ENABLE_BITCODE = NO;
316388
FRAMEWORK_SEARCH_PATHS = (
317389
"$(inherited)",
@@ -323,7 +395,7 @@
323395
"$(inherited)",
324396
"$(PROJECT_DIR)/Flutter",
325397
);
326-
PRODUCT_BUNDLE_IDENTIFIER = com.example.news;
398+
PRODUCT_BUNDLE_IDENTIFIER = com.equimper03.news;
327399
PRODUCT_NAME = "$(TARGET_NAME)";
328400
VERSIONING_SYSTEM = "apple-generic";
329401
};
@@ -343,12 +415,14 @@
343415
CLANG_WARN_BOOL_CONVERSION = YES;
344416
CLANG_WARN_COMMA = YES;
345417
CLANG_WARN_CONSTANT_CONVERSION = YES;
418+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
346419
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
347420
CLANG_WARN_EMPTY_BODY = YES;
348421
CLANG_WARN_ENUM_CONVERSION = YES;
349422
CLANG_WARN_INFINITE_RECURSION = YES;
350423
CLANG_WARN_INT_CONVERSION = YES;
351424
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
425+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
352426
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
353427
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
354428
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -397,12 +471,14 @@
397471
CLANG_WARN_BOOL_CONVERSION = YES;
398472
CLANG_WARN_COMMA = YES;
399473
CLANG_WARN_CONSTANT_CONVERSION = YES;
474+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
400475
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
401476
CLANG_WARN_EMPTY_BODY = YES;
402477
CLANG_WARN_ENUM_CONVERSION = YES;
403478
CLANG_WARN_INFINITE_RECURSION = YES;
404479
CLANG_WARN_INT_CONVERSION = YES;
405480
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
481+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
406482
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
407483
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
408484
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -437,6 +513,7 @@
437513
buildSettings = {
438514
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
439515
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
516+
DEVELOPMENT_TEAM = 3Z364KZE8Z;
440517
ENABLE_BITCODE = NO;
441518
FRAMEWORK_SEARCH_PATHS = (
442519
"$(inherited)",
@@ -448,7 +525,7 @@
448525
"$(inherited)",
449526
"$(PROJECT_DIR)/Flutter",
450527
);
451-
PRODUCT_BUNDLE_IDENTIFIER = com.example.news;
528+
PRODUCT_BUNDLE_IDENTIFIER = com.equimper03.news;
452529
PRODUCT_NAME = "$(TARGET_NAME)";
453530
VERSIONING_SYSTEM = "apple-generic";
454531
};
@@ -460,6 +537,7 @@
460537
buildSettings = {
461538
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
462539
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
540+
DEVELOPMENT_TEAM = 3Z364KZE8Z;
463541
ENABLE_BITCODE = NO;
464542
FRAMEWORK_SEARCH_PATHS = (
465543
"$(inherited)",
@@ -471,7 +549,7 @@
471549
"$(inherited)",
472550
"$(PROJECT_DIR)/Flutter",
473551
);
474-
PRODUCT_BUNDLE_IDENTIFIER = com.example.news;
552+
PRODUCT_BUNDLE_IDENTIFIER = com.equimper03.news;
475553
PRODUCT_NAME = "$(TARGET_NAME)";
476554
VERSIONING_SYSTEM = "apple-generic";
477555
};

Courses/Dart And Flutter The Complete Developers Guide/news/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0910"
4-
version = "1.3">
3+
LastUpgradeVersion = "1010"
4+
version = "2.0">
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES">
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
</Testables>
@@ -46,23 +45,26 @@
4645
buildConfiguration = "Debug"
4746
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4847
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
49-
language = ""
5048
launchStyle = "0"
5149
useCustomWorkingDirectory = "NO"
5250
ignoresPersistentStateOnLaunch = "NO"
5351
debugDocumentVersioning = "YES"
5452
debugServiceExtension = "internal"
55-
allowLocationSimulation = "YES">
56-
<BuildableProductRunnable
57-
runnableDebuggingMode = "0">
53+
allowLocationSimulation = "YES"
54+
launchAutomaticallySubstyle = "2">
55+
<PathRunnable
56+
runnableDebuggingMode = "0"
57+
FilePath = "/&lt;placeholder&gt;">
58+
</PathRunnable>
59+
<MacroExpansion>
5860
<BuildableReference
5961
BuildableIdentifier = "primary"
6062
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
6163
BuildableName = "Runner.app"
6264
BlueprintName = "Runner"
6365
ReferencedContainer = "container:Runner.xcodeproj">
6466
</BuildableReference>
65-
</BuildableProductRunnable>
67+
</MacroExpansion>
6668
<AdditionalOptions>
6769
</AdditionalOptions>
6870
</LaunchAction>

Courses/Dart And Flutter The Complete Developers Guide/news/ios/Runner.xcworkspace/contents.xcworkspacedata

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Courses/Dart And Flutter The Complete Developers Guide/news/lib/src/app.dart

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
import 'package:flutter/material.dart';
2+
import 'package:news/src/blocs/comments_provider.dart';
23
import 'package:news/src/blocs/stories_provider.dart';
34
import 'package:news/src/screens/news_detail.dart';
45
import 'package:news/src/screens/news_list.dart';
56

67
class App extends StatelessWidget {
78
@override
89
Widget build(BuildContext context) {
9-
return StoriesProvider(
10-
child: MaterialApp(
11-
title: 'News!',
12-
onGenerateRoute: routes,
10+
return CommentsProvider(
11+
child: StoriesProvider(
12+
child: MaterialApp(
13+
title: 'News!',
14+
onGenerateRoute: routes,
15+
),
1316
),
1417
);
1518
}
@@ -20,14 +23,17 @@ class App extends StatelessWidget {
2023
final bloc = StoriesProvider.of(context);
2124

2225
bloc.fetchTopIds();
23-
26+
2427
return NewsList();
2528
});
2629
}
2730

2831
return MaterialPageRoute(builder: (BuildContext context) {
2932
final int itemId = int.parse(settings.name.replaceFirst('/', ''));
3033

34+
final commentsBloc = CommentsProvider.of(context);
35+
36+
commentsBloc.fetchItemWithComments(itemId);
3137

3238
return NewsDetail(itemId: itemId);
3339
});

0 commit comments

Comments
 (0)