This repository has been archived by the owner on Oct 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from phantomate/dev
Release merge
- Loading branch information
Showing
15 changed files
with
1,007 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Bug Report | ||
description: Report for broken or incorrect behaviour | ||
labels: unconfirmed bug | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Bug Summary | ||
description: Summerize your bug report | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Reproduction Steps | ||
description: > | ||
What you did to make it happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Expected Results | ||
description: > | ||
What did you expect to happen? | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Actual Results | ||
description: > | ||
What actually happened? | ||
validations: | ||
required: true | ||
- type: checkboxes | ||
attributes: | ||
label: Checklist | ||
description: > | ||
Please confirm that you have done the following checks! | ||
options: | ||
- label: I have searched the open issues for duplicates. | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Feature Request | ||
description: Suggest a feature request for Untare | ||
labels: feature request | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Your Request | ||
description: > | ||
What issue/problem is your feature request trying to solve? What becomes easier when implemented? | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: The Current State | ||
description: > | ||
If, how is it currently solved? | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Additional Context | ||
description: If there is anything else to say, please do so here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
lib/components/dialogs/upsert_recipe_step_time_dialog.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_form_builder/flutter_form_builder.dart'; | ||
import 'package:form_builder_validators/form_builder_validators.dart'; | ||
import 'package:flutter_gen/gen_l10n/app_locales.dart'; | ||
|
||
Future upsertRecipeStepTimeDialog(BuildContext context, int stepIndex, Function(Map<String, dynamic>) upsertStepTime, {int? stepTime}) { | ||
final formKey = GlobalKey<FormBuilderState>(); | ||
|
||
return showDialog(context: context, builder: (BuildContext dContext) { | ||
return Dialog( | ||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), | ||
insetPadding: const EdgeInsets.all(20), | ||
child: Padding( | ||
padding: const EdgeInsets.all(15), | ||
child: Wrap( | ||
spacing: 10, | ||
children: [ | ||
Padding( | ||
padding: const EdgeInsets.only(bottom: 15), | ||
child: Text(AppLocalizations.of(context)!.timeInMinutes, style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 17)), | ||
), | ||
const SizedBox(height: 10), | ||
FormBuilder( | ||
key: formKey, | ||
autovalidateMode: AutovalidateMode.disabled, | ||
child: Column( | ||
children: [ | ||
FormBuilderTextField( | ||
name: 'stepTime', | ||
initialValue: (stepTime != null) ? stepTime.toString() : '0', | ||
validator: FormBuilderValidators.compose([ | ||
FormBuilderValidators.required(), | ||
FormBuilderValidators.integer() | ||
]), | ||
), | ||
const SizedBox(height: 15), | ||
Container( | ||
alignment: Alignment.bottomRight, | ||
child: MaterialButton( | ||
color: Theme.of(context).primaryColor, | ||
onPressed: () { | ||
formKey.currentState!.setInternalFieldValue('stepIndex', stepIndex, isSetState: true); | ||
formKey.currentState!.save(); | ||
if (formKey.currentState!.validate()) { | ||
upsertStepTime(formKey.currentState!.value); | ||
Navigator.pop(dContext); | ||
} | ||
}, | ||
child: Text(AppLocalizations.of(context)!.edit) | ||
) | ||
) | ||
], | ||
), | ||
), | ||
], | ||
), | ||
) | ||
); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.