Skip to content

Commit 620b3ce

Browse files
Merge pull request #90 from Sandipkakadiya/review
Review
2 parents 661545a + 0e84596 commit 620b3ce

File tree

7 files changed

+131
-31
lines changed

7 files changed

+131
-31
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## 1.0.5 - 2020-02-07
4+
5+
### Fixed
6+
* GFRating - minor issue fixed
7+
8+
### Added
9+
* added new component
10+
- GFLoader
11+
12+
13+
14+
315
## 1.0.4 - 2020-02-04
416

517
### Fixed

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: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Uncomment this line to define a global platform for your project
2+
# platform :ios, '9.0'
3+
4+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6+
7+
project 'Runner', {
8+
'Debug' => :debug,
9+
'Profile' => :release,
10+
'Release' => :release,
11+
}
12+
13+
def parse_KV_file(file, separator='=')
14+
file_abs_path = File.expand_path(file)
15+
if !File.exists? file_abs_path
16+
return [];
17+
end
18+
generated_key_values = {}
19+
skip_line_start_symbols = ["#", "/"]
20+
File.foreach(file_abs_path) do |line|
21+
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
22+
plugin = line.split(pattern=separator)
23+
if plugin.length == 2
24+
podname = plugin[0].strip()
25+
path = plugin[1].strip()
26+
podpath = File.expand_path("#{path}", file_abs_path)
27+
generated_key_values[podname] = podpath
28+
else
29+
puts "Invalid plugin specification: #{line}"
30+
end
31+
end
32+
generated_key_values
33+
end
34+
35+
target 'Runner' do
36+
use_frameworks!
37+
use_modular_headers!
38+
39+
# Flutter Pod
40+
41+
copied_flutter_dir = File.join(__dir__, 'Flutter')
42+
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
43+
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
44+
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
45+
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
46+
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
47+
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
48+
49+
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
50+
unless File.exist?(generated_xcode_build_settings_path)
51+
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
52+
end
53+
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
54+
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
55+
56+
unless File.exist?(copied_framework_path)
57+
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
58+
end
59+
unless File.exist?(copied_podspec_path)
60+
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
61+
end
62+
end
63+
64+
# Keep pod path relative so it can be checked into Podfile.lock.
65+
pod 'Flutter', :path => 'Flutter'
66+
67+
# Plugin Pods
68+
69+
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
70+
# referring to absolute paths on developers' machines.
71+
system('rm -rf .symlinks')
72+
system('mkdir -p .symlinks/plugins')
73+
plugin_pods = parse_KV_file('../.flutter-plugins')
74+
plugin_pods.each do |name, path|
75+
symlink = File.join('.symlinks', 'plugins', name)
76+
File.symlink(path, symlink)
77+
pod name, :path => File.join(symlink, 'ios')
78+
end
79+
end
80+
81+
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
82+
install! 'cocoapods', :disable_input_output_paths => true
83+
84+
post_install do |installer|
85+
installer.pods_project.targets.each do |target|
86+
target.build_configurations.each do |config|
87+
config.build_settings['ENABLE_BITCODE'] = 'NO'
88+
end
89+
end
90+
end

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ packages:
9292
path: ".."
9393
relative: true
9494
source: path
95-
version: "1.0.4"
95+
version: "1.0.5"
9696
image:
9797
dependency: transitive
9898
description:

lib/components/rating/gf_rating.dart

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -83,32 +83,29 @@ class _GFRatingState extends State<GFRating> {
8383
Widget buildRatingBar(BuildContext context, int index) {
8484
Widget icon;
8585
if (index >= widget.value) {
86-
icon = widget.defaultIcon != null
87-
? widget.defaultIcon
88-
: Icon(
89-
Icons.star_border,
90-
color: widget.borderColor ?? Theme.of(context).primaryColor,
91-
size: GFSizesClass.getGFSize(widget.size),
92-
);
86+
icon = widget.defaultIcon ??
87+
Icon(
88+
Icons.star_border,
89+
color: widget.borderColor ?? Theme.of(context).primaryColor,
90+
size: GFSizesClass.getGFSize(widget.size),
91+
);
9392
} else if (!widget.showTextForm
9493
? index > widget.value - (widget.allowHalfRating ? 0.5 : 1.0) &&
9594
index < widget.value
9695
: index + 1 == widget.value + 0.5) {
97-
icon = widget.halfFilledIcon != null
98-
? widget.halfFilledIcon
99-
: Icon(
100-
Icons.star_half,
101-
color: widget.color ?? Theme.of(context).primaryColor,
102-
size: GFSizesClass.getGFSize(widget.size),
103-
);
96+
icon = widget.halfFilledIcon ??
97+
Icon(
98+
Icons.star_half,
99+
color: widget.color ?? Theme.of(context).primaryColor,
100+
size: GFSizesClass.getGFSize(widget.size),
101+
);
104102
} else {
105-
icon = widget.filledIcon != null
106-
? widget.filledIcon
107-
: Icon(
108-
Icons.star,
109-
color: widget.color ?? Theme.of(context).primaryColor,
110-
size: GFSizesClass.getGFSize(widget.size),
111-
);
103+
icon = widget.filledIcon ??
104+
Icon(
105+
Icons.star,
106+
color: widget.color ?? Theme.of(context).primaryColor,
107+
size: GFSizesClass.getGFSize(widget.size),
108+
);
112109
}
113110

114111
return GestureDetector(
@@ -145,14 +142,13 @@ class _GFRatingState extends State<GFRating> {
145142
child: TextFormField(
146143
controller: widget.controller,
147144
keyboardType: TextInputType.number,
148-
decoration: widget.inputDecorations == null
149-
? InputDecoration(
150-
border: const OutlineInputBorder(),
151-
hintText: 'Enter rating',
152-
labelText: 'Enter rating',
153-
suffixIcon: widget.suffixIcon,
154-
)
155-
: widget.inputDecorations,
145+
decoration: widget.inputDecorations ??
146+
InputDecoration(
147+
border: const OutlineInputBorder(),
148+
hintText: 'Enter rating',
149+
labelText: 'Enter rating',
150+
suffixIcon: widget.suffixIcon,
151+
),
156152
),
157153
),
158154
Material(

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: getflutter
22
description: GetFlutter is open source libraries that come with pre-build 1000+ UI components. It makes development faster & more enjoyable. You can customize the component as per your need.
3-
version: 1.0.4
3+
version: 1.0.5
44
#author: GetFlutter <[email protected]>
55
homepage: https://github.com/ionicfirebaseapp/getflutter
66

0 commit comments

Comments
 (0)