Skip to content

Commit

Permalink
Merge PR #1756
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVe committed Jan 10, 2025
2 parents ebf2689 + 845f0a2 commit 5fd9057
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 65 deletions.
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ allprojects {

project.ext {
minSdkVersion = 21
targetSdkVersion = 34
compileSdkVersion = 34
targetSdkVersion = 35
compileSdkVersion = 35

yubiKitVersion = "2.7.0"
junitVersion = "4.13.2"
Expand Down
4 changes: 2 additions & 2 deletions android/flutter_plugins/qrscanner_zxing/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ android {

namespace 'com.yubico.authenticator.flutter_plugins.qrscanner_zxing'

compileSdk 34
compileSdk 35

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -45,7 +45,7 @@ android {

defaultConfig {
minSdkVersion 21
targetSdk 34
targetSdk 35
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ internal class QRScannerView(
if (cameraOpened && t.type == CameraState.Type.CLOSED) {
Log.v(TAG, "Camera closed")
val stateChangedIntent =
Intent("com.yubico.authenticator.QRScannerView.CameraClosed")
Intent("com.yubico.authenticator.QRScannerView.CameraClosed").apply {
setPackage("com.yubico.yubioath")
}
context.sendBroadcast(stateChangedIntent)
cameraOpened = false
}
Expand Down
122 changes: 62 additions & 60 deletions lib/app/views/app_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -544,75 +544,77 @@ class _AppPageState extends ConsumerState<AppPage> {
Actions.invoke(context, const EscapeIntent());
FocusManager.instance.primaryFocus?.unfocus();
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
if (hasRail && (!fullyExpanded || !showNavigation))
SizedBox(
width: 72,
child: _VisibilityListener(
targetKey: _navKey,
controller: _navController,
child: SingleChildScrollView(
child: NavigationContent(
key: _navKey,
shouldPop: false,
extended: false,
),
),
),
),
if (fullyExpanded && showNavigation)
SizedBox(
width: 280,
child: SafeArea(
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
if (hasRail && (!fullyExpanded || !showNavigation))
SizedBox(
width: 72,
child: _VisibilityListener(
targetKey: _navKey,
controller: _navController,
targetKey: _navExpandedKey,
child: SingleChildScrollView(
child: Material(
type: MaterialType.transparency,
child: NavigationContent(
key: _navExpandedKey,
shouldPop: false,
extended: true,
),
child: NavigationContent(
key: _navKey,
shouldPop: false,
extended: false,
),
),
)),
const SizedBox(width: 8),
Expanded(child: body),
if (hasManage &&
!hasDetailsOrKeyActions &&
showDetailView &&
widget.capabilities != null &&
widget.capabilities?.first != Capability.u2f)
// Add a placeholder for the Manage/Details column. Exceptions are:
// - the "Security Key" because it does not have any actions/details.
// - pages without Capabilities
const SizedBox(width: 336), // simulate column
if (hasManage && hasDetailsOrKeyActions && showDetailView)
_VisibilityListener(
controller: _detailsController,
targetKey: _detailsViewGlobalKey,
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: SizedBox(
width: 320,
child: Column(
key: _detailsViewGlobalKey,
children: [
if (widget.detailViewBuilder != null)
widget.detailViewBuilder!(context),
if (widget.keyActionsBuilder != null)
widget.keyActionsBuilder!(context),
],
),
),
if (fullyExpanded && showNavigation)
SizedBox(
width: 280,
child: _VisibilityListener(
controller: _navController,
targetKey: _navExpandedKey,
child: SingleChildScrollView(
child: Material(
type: MaterialType.transparency,
child: NavigationContent(
key: _navExpandedKey,
shouldPop: false,
extended: true,
),
),
),
)),
const SizedBox(width: 8),
Expanded(child: body),
if (hasManage &&
!hasDetailsOrKeyActions &&
showDetailView &&
widget.capabilities != null &&
widget.capabilities?.first != Capability.u2f)
// Add a placeholder for the Manage/Details column. Exceptions are:
// - the "Security Key" because it does not have any actions/details.
// - pages without Capabilities
const SizedBox(width: 336), // simulate column
if (hasManage && hasDetailsOrKeyActions && showDetailView)
_VisibilityListener(
controller: _detailsController,
targetKey: _detailsViewGlobalKey,
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: SizedBox(
width: 320,
child: Column(
key: _detailsViewGlobalKey,
children: [
if (widget.detailViewBuilder != null)
widget.detailViewBuilder!(context),
if (widget.keyActionsBuilder != null)
widget.keyActionsBuilder!(context),
],
),
),
),
),
),
),
],
],
),
),
);
}
Expand Down

0 comments on commit 5fd9057

Please sign in to comment.