Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 3.35.7
flutter_version: 3.38.7
min_coverage: 5
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.35.7'
flutter-version: '3.38.7'
channel: 'stable'
- name: Install dependencies 📦
run: flutter pub get
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2.9.5
- Small adjustments

## 2.9.4
- Update scanner to the latest version and fix overlay button press problem
- Fix 16KB memory support for android in Rive
- Update most of dependencies to 2026 state

## 2.9.3
- Revert scanner to old stable version

Expand Down
14 changes: 9 additions & 5 deletions example/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("com.android.application")
id("kotlin-android")
Expand All @@ -8,17 +10,13 @@ plugins {
android {
namespace = "com.example.example"
compileSdk = 36
ndkVersion = "27.3.13750724"
ndkVersion = "29.0.14206865"

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}

defaultConfig {
applicationId = "com.example.example"
minSdk = flutter.minSdkVersion
Expand All @@ -34,6 +32,12 @@ android {
}
}

kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}

flutter {
source = "../.."
}
9 changes: 9 additions & 0 deletions example/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.android.build.gradle.LibraryExtension

allprojects {
repositories {
google()
Expand All @@ -14,6 +16,13 @@ subprojects {
}
subprojects {
project.evaluationDependsOn(":app")
if (project.path.contains("rive", ignoreCase = true)) {
afterEvaluate {
extensions.findByType(LibraryExtension::class.java)?.apply {
defaultConfig { minSdk = 21 }
}
}
}
}

tasks.register<Delete>("clean") {
Expand Down
1 change: 1 addition & 0 deletions example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
rive.ndk.version=29.0.14206865
4 changes: 2 additions & 2 deletions example/android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pluginManagement {

plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.13.0" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
id("com.android.application") version "8.13.2" apply false
id("org.jetbrains.kotlin.android") version "2.3.0" apply false
}

include(":app")
24 changes: 12 additions & 12 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.9.3"
version: "2.9.5"
bloc:
dependency: transitive
description:
Expand Down Expand Up @@ -171,18 +171,18 @@ packages:
dependency: transitive
description:
name: meta
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
url: "https://pub.dev"
source: hosted
version: "1.16.0"
version: "1.17.0"
mobile_scanner:
dependency: transitive
description:
name: mobile_scanner
sha256: "54005bdea7052d792d35b4fef0f84ec5ddc3a844b250ecd48dc192fb9b4ebc95"
sha256: c6184bf2913dd66be244108c9c27ca04b01caf726321c44b0e7a7a1e32d41044
url: "https://pub.dev"
source: hosted
version: "7.0.1"
version: "7.1.4"
nested:
dependency: transitive
description:
Expand Down Expand Up @@ -251,18 +251,18 @@ packages:
dependency: transitive
description:
name: permission_handler
sha256: "59adad729136f01ea9e35a48f5d1395e25cba6cea552249ddbe9cf950f5d7849"
sha256: bc917da36261b00137bbc8896bf1482169cd76f866282368948f032c8c1caae1
url: "https://pub.dev"
source: hosted
version: "11.4.0"
version: "12.0.1"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
sha256: d3971dcdd76182a0c198c096b5db2f0884b0d4196723d21a866fc4cdea057ebc
sha256: "1e3bc410ca1bf84662104b100eb126e066cb55791b7451307f9708d4007350e6"
url: "https://pub.dev"
source: hosted
version: "12.1.0"
version: "13.0.1"
permission_handler_apple:
dependency: transitive
description:
Expand Down Expand Up @@ -472,10 +472,10 @@ packages:
dependency: transitive
description:
name: vibration
sha256: "1fd51cb0f91c6d512734ca0e282dd87fbc7f389b6da5f03c77709ba2cf8fa901"
sha256: bfb274be6996651d36bf3e3a947d2122767dae255cfb9ce6ce8ee4b38fb56bad
url: "https://pub.dev"
source: hosted
version: "3.1.4"
version: "3.1.5"
vibration_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -517,5 +517,5 @@ packages:
source: hosted
version: "1.1.0"
sdks:
dart: ">=3.9.0 <4.0.0"
dart: ">=3.10.0 <4.0.0"
flutter: ">=3.29.0"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publish_to: 'none'
version: 1.0.0+1

environment:
sdk: ^3.9.0
sdk: ^3.10.0

dependencies:
basf_flutter_components:
Expand Down
3 changes: 2 additions & 1 deletion lib/src/theme/themes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ enum BasfThemeType {
lightBlue(BasfColors.lightBlue),

/// BASF darkBlue color
darkBlue(BasfColors.darkBlue);
darkBlue(BasfColors.darkBlue)
;

/// BASF theme type
const BasfThemeType(this.primaryColor);
Expand Down
3 changes: 2 additions & 1 deletion lib/src/widgets/animations/emoji_enum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ enum RiveEmoji {
laughing('Laughing'),

///
surprise('Surprise');
surprise('Surprise')
;

const RiveEmoji(this.artBoard);

Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/buttons/editable_info_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class EditableInfoTile extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.end,
children: [
if (onDelete != null) deleteButton(),
if (icon != null) icon!,
?icon,
],
),
],
Expand Down
42 changes: 35 additions & 7 deletions lib/src/widgets/layout/custom_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class CustomScaffold extends StatelessWidget {
this.actions,
this.showBackButton = true,
this.showAppBar = true,
this.maxWidth = 500,
super.key,
});

Expand Down Expand Up @@ -41,21 +42,48 @@ class CustomScaffold extends StatelessWidget {
/// Whether to show the appbar or not
final bool showAppBar;

/// Optional max width for the scaffold content (app bar, body, bottom bar)
final double? maxWidth;

@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
backgroundColor: BasfColors.backgroundGrey,
appBar: showAppBar
? CustomAppBar(
title: title,
previousScreenCall: backCallback,
actions: actions,
showBackButton: showBackButton,
? _wrapAppBar(
CustomAppBar(
title: title,
previousScreenCall: backCallback,
actions: actions,
showBackButton: showBackButton,
),
)
: null,
body: SafeArea(child: child),
bottomNavigationBar: bottomNavigationBar,
body: SafeArea(child: _wrapContent(child)),
bottomNavigationBar: bottomNavigationBar == null
? null
: _wrapContent(bottomNavigationBar!),
);
}

PreferredSizeWidget _wrapAppBar(PreferredSizeWidget appBar) {
if (maxWidth == null) return appBar;

return PreferredSize(
preferredSize: appBar.preferredSize,
child: _wrapContent(appBar),
);
}

Widget _wrapContent(Widget content) {
if (maxWidth == null) return content;

return Center(
child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: maxWidth!),
child: content,
),
);
}
}
3 changes: 1 addition & 2 deletions lib/src/widgets/layout/home/home_tile/home_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ class HomeTile extends StatelessWidget {
],
),
),
if (unfinishedProcessNotification != null)
unfinishedProcessNotification!,
?unfinishedProcessNotification,
],
);
},
Expand Down
29 changes: 19 additions & 10 deletions lib/src/widgets/scanner/scanner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,26 @@ class _ScannerState extends State<Scanner> with RouteAware {
_ => ScannerDefaultErrorLayout(message: error.errorCode.message),
};
},
overlayBuilder: (context, constrains) {
return Stack(
children: [
widget.overlay,
if (widget.cooldownSeconds != null) ...[
Positioned.fill(child: successIcon()),
Positioned.fill(child: cooldown()),
),
Positioned.fill(
child: ValueListenableBuilder<MobileScannerState>(
valueListenable: scannerCubit.cameraController,
builder: (context, state, _) {
if (!state.isInitialized || state.error != null) {
return const SizedBox();
}

return Stack(
children: [
widget.overlay,
if (widget.cooldownSeconds != null) ...[
Positioned.fill(child: successIcon()),
Positioned.fill(child: cooldown()),
],
],
],
);
},
);
},
),
),
],
);
Expand Down
Loading