Skip to content

Commit 3b729b2

Browse files
committed
Update bloc_library sample
1 parent 912b8f4 commit 3b729b2

File tree

130 files changed

+3966
-737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+3966
-737
lines changed

.github/workflows/static_analysis_and_tests.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ jobs:
1919
uses: ./.github/actions/flutter_analysis_and_tests
2020
with:
2121
working-directory: ./bloc_flutter
22+
bloc_library:
23+
name: bloc_library
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Static Analysis & Tests
30+
uses: ./.github/actions/flutter_analysis_and_tests
31+
with:
32+
working-directory: ./bloc_library
2233
blocs:
2334
name: blocs
2435
runs-on: ubuntu-latest

bloc_flutter/macos/Podfile.lock

Lines changed: 0 additions & 30 deletions
This file was deleted.

bloc_flutter/macos/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
2828
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
2929
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
30-
D53CF80310E427553F2B5122 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 86C33D27F7A36B797D624F49 /* Pods_Runner.framework */; };
31-
FD3C53F535D56A2AF014A56E /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 06E4ECD8ED1C23E7CA1E8124 /* Pods_RunnerTests.framework */; };
3230
/* End PBXBuildFile section */
3331

3432
/* Begin PBXContainerItemProxy section */
@@ -62,13 +60,11 @@
6260
/* End PBXCopyFilesBuildPhase section */
6361

6462
/* Begin PBXFileReference section */
65-
02E7666704FD698876354E1C /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
66-
06E4ECD8ED1C23E7CA1E8124 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6763
331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
6864
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
6965
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
7066
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
71-
33CC10ED2044A3C60003C045 /* bloc_flutter_sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = bloc_flutter_sample.app; sourceTree = BUILT_PRODUCTS_DIR; };
67+
33CC10ED2044A3C60003C045 /* bloc_flutter_sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "bloc_flutter_sample.app"; sourceTree = BUILT_PRODUCTS_DIR; };
7268
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7369
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
7470
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
@@ -80,30 +76,22 @@
8076
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
8177
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
8278
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
83-
45D5CEBA2CD926A877067859 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
84-
4D6093C6D01C7E816D779EFE /* 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>"; };
85-
590DE9794D74BF49F5D05D9A /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
86-
6DD95F229AC319A80B34E650 /* 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>"; };
8779
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
88-
86C33D27F7A36B797D624F49 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8980
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
90-
D37885EF4E7C39A206B12D27 /* 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>"; };
9181
/* End PBXFileReference section */
9282

9383
/* Begin PBXFrameworksBuildPhase section */
9484
331C80D2294CF70F00263BE5 /* Frameworks */ = {
9585
isa = PBXFrameworksBuildPhase;
9686
buildActionMask = 2147483647;
9787
files = (
98-
FD3C53F535D56A2AF014A56E /* Pods_RunnerTests.framework in Frameworks */,
9988
);
10089
runOnlyForDeploymentPostprocessing = 0;
10190
};
10291
33CC10EA2044A3C60003C045 /* Frameworks */ = {
10392
isa = PBXFrameworksBuildPhase;
10493
buildActionMask = 2147483647;
10594
files = (
106-
D53CF80310E427553F2B5122 /* Pods_Runner.framework in Frameworks */,
10795
);
10896
runOnlyForDeploymentPostprocessing = 0;
10997
};
@@ -137,7 +125,6 @@
137125
331C80D6294CF71000263BE5 /* RunnerTests */,
138126
33CC10EE2044A3C60003C045 /* Products */,
139127
D73912EC22F37F3D000D13A0 /* Frameworks */,
140-
E8CF0382FE46026A64804992 /* Pods */,
141128
);
142129
sourceTree = "<group>";
143130
};
@@ -188,34 +175,17 @@
188175
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
189176
isa = PBXGroup;
190177
children = (
191-
86C33D27F7A36B797D624F49 /* Pods_Runner.framework */,
192-
06E4ECD8ED1C23E7CA1E8124 /* Pods_RunnerTests.framework */,
193178
);
194179
name = Frameworks;
195180
sourceTree = "<group>";
196181
};
197-
E8CF0382FE46026A64804992 /* Pods */ = {
198-
isa = PBXGroup;
199-
children = (
200-
4D6093C6D01C7E816D779EFE /* Pods-Runner.debug.xcconfig */,
201-
6DD95F229AC319A80B34E650 /* Pods-Runner.release.xcconfig */,
202-
D37885EF4E7C39A206B12D27 /* Pods-Runner.profile.xcconfig */,
203-
590DE9794D74BF49F5D05D9A /* Pods-RunnerTests.debug.xcconfig */,
204-
45D5CEBA2CD926A877067859 /* Pods-RunnerTests.release.xcconfig */,
205-
02E7666704FD698876354E1C /* Pods-RunnerTests.profile.xcconfig */,
206-
);
207-
name = Pods;
208-
path = Pods;
209-
sourceTree = "<group>";
210-
};
211182
/* End PBXGroup section */
212183

213184
/* Begin PBXNativeTarget section */
214185
331C80D4294CF70F00263BE5 /* RunnerTests */ = {
215186
isa = PBXNativeTarget;
216187
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
217188
buildPhases = (
218-
D79B4BC5FF2E841103C3FD8D /* [CP] Check Pods Manifest.lock */,
219189
331C80D1294CF70F00263BE5 /* Sources */,
220190
331C80D2294CF70F00263BE5 /* Frameworks */,
221191
331C80D3294CF70F00263BE5 /* Resources */,
@@ -234,13 +204,11 @@
234204
isa = PBXNativeTarget;
235205
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
236206
buildPhases = (
237-
E1CF2FCE47390FE1155F83FE /* [CP] Check Pods Manifest.lock */,
238207
33CC10E92044A3C60003C045 /* Sources */,
239208
33CC10EA2044A3C60003C045 /* Frameworks */,
240209
33CC10EB2044A3C60003C045 /* Resources */,
241210
33CC110E2044A8840003C045 /* Bundle Framework */,
242211
3399D490228B24CF009A79C7 /* ShellScript */,
243-
9A29188E7DA4AD9B0569C6C5 /* [CP] Embed Pods Frameworks */,
244212
);
245213
buildRules = (
246214
);
@@ -361,67 +329,6 @@
361329
shellPath = /bin/sh;
362330
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
363331
};
364-
9A29188E7DA4AD9B0569C6C5 /* [CP] Embed Pods Frameworks */ = {
365-
isa = PBXShellScriptBuildPhase;
366-
buildActionMask = 2147483647;
367-
files = (
368-
);
369-
inputFileListPaths = (
370-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
371-
);
372-
name = "[CP] Embed Pods Frameworks";
373-
outputFileListPaths = (
374-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
375-
);
376-
runOnlyForDeploymentPostprocessing = 0;
377-
shellPath = /bin/sh;
378-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
379-
showEnvVarsInLog = 0;
380-
};
381-
D79B4BC5FF2E841103C3FD8D /* [CP] Check Pods Manifest.lock */ = {
382-
isa = PBXShellScriptBuildPhase;
383-
buildActionMask = 2147483647;
384-
files = (
385-
);
386-
inputFileListPaths = (
387-
);
388-
inputPaths = (
389-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
390-
"${PODS_ROOT}/Manifest.lock",
391-
);
392-
name = "[CP] Check Pods Manifest.lock";
393-
outputFileListPaths = (
394-
);
395-
outputPaths = (
396-
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
397-
);
398-
runOnlyForDeploymentPostprocessing = 0;
399-
shellPath = /bin/sh;
400-
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";
401-
showEnvVarsInLog = 0;
402-
};
403-
E1CF2FCE47390FE1155F83FE /* [CP] Check Pods Manifest.lock */ = {
404-
isa = PBXShellScriptBuildPhase;
405-
buildActionMask = 2147483647;
406-
files = (
407-
);
408-
inputFileListPaths = (
409-
);
410-
inputPaths = (
411-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
412-
"${PODS_ROOT}/Manifest.lock",
413-
);
414-
name = "[CP] Check Pods Manifest.lock";
415-
outputFileListPaths = (
416-
);
417-
outputPaths = (
418-
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
419-
);
420-
runOnlyForDeploymentPostprocessing = 0;
421-
shellPath = /bin/sh;
422-
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";
423-
showEnvVarsInLog = 0;
424-
};
425332
/* End PBXShellScriptBuildPhase section */
426333

427334
/* Begin PBXSourcesBuildPhase section */
@@ -473,7 +380,6 @@
473380
/* Begin XCBuildConfiguration section */
474381
331C80DB294CF71000263BE5 /* Debug */ = {
475382
isa = XCBuildConfiguration;
476-
baseConfigurationReference = 590DE9794D74BF49F5D05D9A /* Pods-RunnerTests.debug.xcconfig */;
477383
buildSettings = {
478384
BUNDLE_LOADER = "$(TEST_HOST)";
479385
CURRENT_PROJECT_VERSION = 1;
@@ -488,7 +394,6 @@
488394
};
489395
331C80DC294CF71000263BE5 /* Release */ = {
490396
isa = XCBuildConfiguration;
491-
baseConfigurationReference = 45D5CEBA2CD926A877067859 /* Pods-RunnerTests.release.xcconfig */;
492397
buildSettings = {
493398
BUNDLE_LOADER = "$(TEST_HOST)";
494399
CURRENT_PROJECT_VERSION = 1;
@@ -503,7 +408,6 @@
503408
};
504409
331C80DD294CF71000263BE5 /* Profile */ = {
505410
isa = XCBuildConfiguration;
506-
baseConfigurationReference = 02E7666704FD698876354E1C /* Pods-RunnerTests.profile.xcconfig */;
507411
buildSettings = {
508412
BUNDLE_LOADER = "$(TEST_HOST)";
509413
CURRENT_PROJECT_VERSION = 1;

bloc_flutter/macos/Runner.xcworkspace/contents.xcworkspacedata

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

bloc_library/.metadata

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,42 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: 27321ebbad34b0a3fafe99fac037102196d655ff
8-
channel: stable
7+
revision: "05db9689081f091050f01aed79f04dce0c750154"
8+
channel: "stable"
99

1010
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 05db9689081f091050f01aed79f04dce0c750154
17+
base_revision: 05db9689081f091050f01aed79f04dce0c750154
18+
- platform: android
19+
create_revision: 05db9689081f091050f01aed79f04dce0c750154
20+
base_revision: 05db9689081f091050f01aed79f04dce0c750154
21+
- platform: ios
22+
create_revision: 05db9689081f091050f01aed79f04dce0c750154
23+
base_revision: 05db9689081f091050f01aed79f04dce0c750154
24+
- platform: linux
25+
create_revision: 05db9689081f091050f01aed79f04dce0c750154
26+
base_revision: 05db9689081f091050f01aed79f04dce0c750154
27+
- platform: macos
28+
create_revision: 05db9689081f091050f01aed79f04dce0c750154
29+
base_revision: 05db9689081f091050f01aed79f04dce0c750154
30+
- platform: web
31+
create_revision: 05db9689081f091050f01aed79f04dce0c750154
32+
base_revision: 05db9689081f091050f01aed79f04dce0c750154
33+
- platform: windows
34+
create_revision: 05db9689081f091050f01aed79f04dce0c750154
35+
base_revision: 05db9689081f091050f01aed79f04dce0c750154
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

bloc_library/analysis_options.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
analyzer:
13+
language:
14+
strict-casts: true
15+
strict-inference: true
16+
strict-raw-types: true
17+
18+
linter:
19+
# The lint rules applied to this project can be customized in the
20+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
21+
# included above or to enable additional rules. A list of all available lints
22+
# and their documentation is published at https://dart.dev/lints.
23+
#
24+
# Instead of disabling a lint rule for the entire project in the
25+
# section below, it can also be suppressed for a single line of code
26+
# or a specific dart file by using the `// ignore: name_of_lint` and
27+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
28+
# producing the lint.
29+
rules:
30+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
31+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
32+
33+
# Additional information about this file can be found at
34+
# https://dart.dev/guides/language/analysis-options
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
plugins {
2+
id("com.android.application")
3+
id("kotlin-android")
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id("dev.flutter.flutter-gradle-plugin")
6+
}
7+
8+
android {
9+
namespace = "com.example.bloc_library"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
12+
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_11
15+
targetCompatibility = JavaVersion.VERSION_11
16+
}
17+
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_11.toString()
20+
}
21+
22+
defaultConfig {
23+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24+
applicationId = "com.example.bloc_library"
25+
// You can update the following values to match your application needs.
26+
// For more information, see: https://flutter.dev/to/review-gradle-config.
27+
minSdk = flutter.minSdkVersion
28+
targetSdk = flutter.targetSdkVersion
29+
versionCode = flutter.versionCode
30+
versionName = flutter.versionName
31+
}
32+
33+
buildTypes {
34+
release {
35+
// TODO: Add your own signing config for the release build.
36+
// Signing with the debug keys for now, so `flutter run --release` works.
37+
signingConfig = signingConfigs.getByName("debug")
38+
}
39+
}
40+
}
41+
42+
flutter {
43+
source = "../.."
44+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>

0 commit comments

Comments
 (0)