feat(app): wire saved schedules into the pipeline summary
This commit is contained in:
@@ -28,6 +28,7 @@ class ScheduleEditorForm extends StatefulWidget {
|
||||
required this.onSubmit,
|
||||
this.onCancel,
|
||||
this.title,
|
||||
this.showHeading = true,
|
||||
});
|
||||
|
||||
final ScheduleDraft draft;
|
||||
@@ -35,6 +36,10 @@ class ScheduleEditorForm extends StatefulWidget {
|
||||
final VoidCallback? onCancel;
|
||||
final String? title;
|
||||
|
||||
/// False when the hosting native page already shows the add/edit title in its
|
||||
/// navigation bar, so the form does not repeat it.
|
||||
final bool showHeading;
|
||||
|
||||
@override
|
||||
State<ScheduleEditorForm> createState() => _ScheduleEditorFormState();
|
||||
}
|
||||
@@ -149,6 +154,7 @@ class _ScheduleEditorFormState extends State<ScheduleEditorForm> {
|
||||
final cupertino = usesCupertinoHost(context);
|
||||
return ScheduleEditorFormBody(
|
||||
heading: _heading,
|
||||
showHeading: widget.showHeading,
|
||||
name: _name,
|
||||
prompt: _prompt,
|
||||
version: _version,
|
||||
|
||||
@@ -14,6 +14,7 @@ class ScheduleEditorFormBody extends StatelessWidget {
|
||||
const ScheduleEditorFormBody({
|
||||
super.key,
|
||||
required this.heading,
|
||||
this.showHeading = true,
|
||||
required this.name,
|
||||
required this.prompt,
|
||||
required this.version,
|
||||
@@ -37,6 +38,7 @@ class ScheduleEditorFormBody extends StatelessWidget {
|
||||
});
|
||||
|
||||
final String heading;
|
||||
final bool showHeading;
|
||||
final TextEditingController name;
|
||||
final TextEditingController prompt;
|
||||
final TextEditingController version;
|
||||
@@ -106,8 +108,10 @@ class ScheduleEditorFormBody extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Text(heading, style: titleStyle),
|
||||
const SizedBox(height: 8),
|
||||
if (showHeading) ...[
|
||||
Text(heading, style: titleStyle),
|
||||
const SizedBox(height: 8),
|
||||
],
|
||||
Text(scheduleEditorNote, style: scheduleEditorSecondaryStyle(context)),
|
||||
_gap,
|
||||
_textField(
|
||||
|
||||
Reference in New Issue
Block a user