diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d9b51de..05e7506e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.3.0 + +* Adding custom padding to carouselBar + ## 2.2.0 * Removing Research Package styles, integrating carp_themes_package instead. diff --git a/example/ios/Podfile b/example/ios/Podfile deleted file mode 100644 index 3ecd4a0f..00000000 --- a/example/ios/Podfile +++ /dev/null @@ -1,44 +0,0 @@ -# Uncomment this line to define a global platform for your project -platform :ios, '13.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - target.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' - end - end -end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock deleted file mode 100644 index faf956fb..00000000 --- a/example/ios/Podfile.lock +++ /dev/null @@ -1,16 +0,0 @@ -PODS: - - Flutter (1.0.0) - -DEPENDENCIES: - - Flutter (from `Flutter`) - -EXTERNAL SOURCES: - Flutter: - :path: Flutter - -SPEC CHECKSUMS: - Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 - -PODFILE CHECKSUM: 13c8060114aebcc06454a991a9a6a3ff96343e2c - -COCOAPODS: 1.16.2 diff --git a/lib/src/ui/task.dart b/lib/src/ui/task.dart index b64dd51b..09cf4d88 100644 --- a/lib/src/ui/task.dart +++ b/lib/src/ui/task.dart @@ -12,6 +12,9 @@ class RPUITask extends StatefulWidget { final Image? carouselBarImage; + final double? carouselBarHorizontalPadding; + final double? carouselBarVerticalPadding; + final Color? carouselBarBackgroundColor; /// The callback function which has to return an [RPTaskResult] object. @@ -35,6 +38,8 @@ class RPUITask extends StatefulWidget { super.key, required this.task, this.carouselBarImage, + this.carouselBarHorizontalPadding, + this.carouselBarVerticalPadding, this.carouselBarBackgroundColor, this.onSubmit, this.onCancel, @@ -248,6 +253,10 @@ class RPUITaskState extends State with CanSaveResult { Widget _carouselBar(RPLocalizations? locale) { return Container( + padding: EdgeInsets.symmetric( + horizontal: widget.carouselBarHorizontalPadding ?? 0, + vertical: widget.carouselBarVerticalPadding ?? 0, + ), color: widget.carouselBarBackgroundColor ?? Theme.of(context).extension()!.backgroundGray, child: SizedBox( diff --git a/pubspec.yaml b/pubspec.yaml index 9f47ee13..6a428048 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: research_package description: A Flutter framework for obtaining informed consent, showing surveys and collecting results. -version: 2.2.0 +version: 2.3.0 homepage: https://github.com/cph-cachet/research.package environment: