我正在使用底部导航器创建一个应用程序。我使用了一个,ShellRoute但我们的要求是隐藏屏幕上的底部导航器例如:当我转到另一个屏幕(例如用户个人资料页面)时,主页可以有底部导航器我必须隐藏底部导航器,但我ShellRoute在同一个屏幕中使用子路线ShellRoute,它不会隐藏底部导航器。
ShellRoute(
navigatorKey: _shellNavigatorKey,
builder: (context, state, child) {
return MainScreen(child: child);
},
routes: [
GoRoute(
path: '/$dashboardRouteName',
name: dashboardRouteName,
pageBuilder: (context, state) => CustomPageRouteBuilder.route(
key: UniqueKey(),
child: const DashboardScreen(),
),
routes: [
GoRoute(
path: leaveRequestRouteName,
name: '$dashboardRouteName/$leaveRequestRouteName',
pageBuilder: (context, state) => CustomPageRouteBuilder.route(
key: state.pageKey,
child: const LeaveRequestScreen(),
),
),
GoRoute(
path: switchHolidayRouteName,
name: '$dashboardRouteName/$switchHolidayRouteName',
pageBuilder: (context, state) => CustomPageRouteBuilder.route(
key: state.pageKey,
child: const SwitchHolidayScreen(),
),
),
],
),
Run Code Online (Sandbox Code Playgroud)
之后,我将子路线分成一般路线,如下所示:
ShellRoute(
navigatorKey: _shellNavigatorKey,
builder: …Run Code Online (Sandbox Code Playgroud) 这是我的代码:
const mailerFunction = new aws_lambda_nodejs.NodejsFunction(this, 'ApiNotificationHandler', {
runtime: lambda.Runtime.NODEJS_14_X,
memorySize: 1024,
timeout: cdk.Duration.seconds(3),
handler: 'main',
entry: path.join(__dirname, '../../src/mailer/index.ts'),
environment: {
SES_REGION,
SES_EMAIL_FROM,
SES_EMAIL_TO,
}
});
Run Code Online (Sandbox Code Playgroud)
我使用的是CDK 2.58.1版本。如何使用 cdk lambda 将额外的 html 文件上传到代码源?
android ×1
aws-cdk ×1
aws-lambda ×1
dart ×1
flutter ×1
ios ×1
node.js ×1
router ×1
typescript ×1