Skip to content

Commit 71a8994

Browse files
committed
Merge branch 'develop'
# Conflicts: # CHANGELOG.md # example/pubspec.yaml # pubspec.yaml
2 parents 4339ede + f3d0b26 commit 71a8994

32 files changed

+464
-517
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## [3.0.0] - 2020-03-27
2+
* Migrate to null safety
3+
* Fix "Cannot clone a disposed image" error
4+
* Update dependencies.
5+
6+
## [3.0.0-nullsafety] - 2020-01-02
7+
* Migrate to null safety
8+
19
## [2.5.1] - 2021-03-09
210
* Update dependencies
311

@@ -160,4 +168,4 @@ CachedNetworkImage(
160168
Added an ImageProvider and improved documentation
161169

162170
## [0.0.1] - 2 December 2017
163-
Initial release, should be polished
171+
Initial release, should be polished

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,9 @@ CachedNetworkImage(
5353

5454
## How it works
5555
The cached network images stores and retrieves files using the [flutter_cache_manager](https://pub.dartlang.org/packages/flutter_cache_manager).
56+
57+
## FAQ
58+
### My app crashes when the image loading failed. (I know, this is not really a question.)
59+
Does it really crash though? The debugger might pause, as the Dart VM doesn't recognize it as a caught exception; the console might print errors; even your crash reporting tool might report it (I know, that really sucks). However, does it really crash? Probably everything is just running fine. If you really get an app crashes you are fine to report an issue, but do that with a small example so we can reproduce that crash.
60+
61+
See for example [this](https://github.com/Baseflow/flutter_cached_network_image/issues/336#issuecomment-760769361) or [this](https://github.com/Baseflow/flutter_cached_network_image/issues/536#issuecomment-760857495) answer on previous posted issues.
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>

example/ios/.gitignore

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,32 @@
1-
.idea/
2-
.vagrant/
3-
.sconsign.dblite
4-
.svn/
5-
6-
.DS_Store
7-
*.swp
8-
profile
9-
10-
DerivedData/
11-
build/
12-
GeneratedPluginRegistrant.h
13-
GeneratedPluginRegistrant.m
14-
15-
*.pbxuser
161
*.mode1v3
172
*.mode2v3
3+
*.moved-aside
4+
*.pbxuser
185
*.perspectivev3
19-
20-
!default.pbxuser
6+
**/*sync/
7+
.sconsign.dblite
8+
.tags*
9+
**/.vagrant/
10+
**/DerivedData/
11+
Icon?
12+
**/Pods/
13+
**/.symlinks/
14+
profile
15+
xcuserdata
16+
**/.generated/
17+
Flutter/App.framework
18+
Flutter/Flutter.framework
19+
Flutter/Flutter.podspec
20+
Flutter/Generated.xcconfig
21+
Flutter/app.flx
22+
Flutter/app.zip
23+
Flutter/flutter_assets/
24+
Flutter/flutter_export_environment.sh
25+
ServiceDefinitions.json
26+
Runner/GeneratedPluginRegistrant.*
27+
28+
# Exceptions to above rules.
2129
!default.mode1v3
2230
!default.mode2v3
31+
!default.pbxuser
2332
!default.perspectivev3
24-
25-
xcuserdata
26-
27-
*.moved-aside
28-
29-
*.pyc
30-
*sync/
31-
Icon?
32-
.tags*
33-
34-
/Flutter/app.flx
35-
/Flutter/app.zip
36-
/Flutter/flutter_assets/
37-
/Flutter/App.framework
38-
/Flutter/Flutter.framework
39-
/Flutter/Generated.xcconfig
40-
/ServiceDefinitions.json
41-
42-
Pods/

example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
23-
<key>UIRequiredDeviceCapabilities</key>
24-
<array>
25-
<string>arm64</string>
26-
</array>
2723
<key>MinimumOSVersion</key>
2824
<string>8.0</string>
2925
</dict>

example/ios/Flutter/Debug.xcconfig

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

example/ios/Flutter/Release.xcconfig

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

example/ios/Podfile

Lines changed: 26 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,38 @@
44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
66

7-
def parse_KV_file(file,seperator='=')
8-
file_abs_path = File.expand_path(file)
9-
if !File.exists? file_abs_path
10-
return [];
7+
project 'Runner', {
8+
'Debug' => :debug,
9+
'Profile' => :release,
10+
'Release' => :release,
11+
}
12+
13+
def flutter_root
14+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15+
unless File.exist?(generated_xcode_build_settings_path)
16+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17+
end
18+
19+
File.foreach(generated_xcode_build_settings_path) do |line|
20+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
21+
return matches[1].strip if matches
1122
end
12-
pods_ary = []
13-
skip_line_start_symbols = ["#", "/"]
14-
File.foreach(file_abs_path) { |line|
15-
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
16-
plugin = line.split(pattern=seperator)
17-
if plugin.length == 2
18-
podname = plugin[0].strip()
19-
path = plugin[1].strip()
20-
podpath = File.expand_path("#{path}", file_abs_path)
21-
pods_ary.push({:name => podname,:path=>podpath});
22-
else
23-
puts "Invalid plugin specification: #{line}"
24-
end
25-
}
26-
return pods_ary
23+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
2724
end
2825

26+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27+
28+
flutter_ios_podfile_setup
29+
2930
target 'Runner' do
30-
# Flutter Pods
31-
generated_xcode_build_settings = parse_KV_file("./Flutter/Generated.xcconfig")
32-
if generated_xcode_build_settings.empty?
33-
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter build or flutter run is executed once first."
34-
end
35-
generated_xcode_build_settings.map{ |p|
36-
if p[:name]=='FLUTTER_FRAMEWORK_DIR'
37-
pod 'Flutter', :path => p[:path]
38-
end
39-
}
40-
41-
# Plugin Pods
42-
plugin_pods = parse_KV_file("../.flutter-plugins")
43-
plugin_pods.map{ |p|
44-
pod p[:name], :path => File.expand_path("ios",p[:path])
45-
}
31+
use_frameworks!
32+
use_modular_headers!
33+
34+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
4635
end
4736

4837
post_install do |installer|
4938
installer.pods_project.targets.each do |target|
50-
target.build_configurations.each do |config|
51-
config.build_settings['ENABLE_BITCODE'] = 'NO'
52-
end
39+
flutter_additional_ios_build_settings(target)
5340
end
54-
end
41+
end

example/ios/Podfile.lock

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

0 commit comments

Comments
 (0)