newWizard function
void
newWizard(
- BuildContext context,
- MemberModel member,
- AppModel app, {
- double? fraction,
})
Implementation
void newWizard(
BuildContext context,
MemberModel member,
AppModel app, {
double? fraction,
}) {
openFlexibleDialog(
app,
context,
'${app.documentID}/_wizard',
includeHeading: true,
widthFraction: fraction ?? .5,
title: 'Run Wizard',
buttons: [
dialogButton(app, context, label: 'Close', onPressed: () {
Navigator.of(context).pop();
// the wizard might have created a new home page. Go home
var accessBloc = BlocProvider.of<AccessBloc>(context);
accessBloc.add(GoHome(app: app, redetermine: true));
}),
],
child: Container(
width: 10,
child: WizardWidget.getIt(
context,
member,
app,
fullScreenWidth(context) * ((fraction == null) ? .5 : fraction),
fullScreenHeight(context) - 100,
)),
);
}