Note: To configure this feature, you need to have a basic understanding of coding.
To add button action for order item or oder detail you can register a button action by flow this document.
Example:
There are 2 type event support in button action:
Requirement
- Cirilla
v3.9.0
or above
Callback function
Open file /cirilla/lib/register_order_actions.dart
First, import button
import 'screens/order/widgets/order_actions_button.dart';
Next, add a button
ActionButton(
titleText: "Callback",
onPressed: (_) => {}
),
Then update onPressed
callback function
ActionButton(
titleText: "Callback",
onPressed: (BuildContext context) => {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text("Message"),
)),
},
),
Navigator
Add a button like callback function above
Then put your widget to props widgetContent
ActionButton(
titleText: "Page",
widgetContent: Text("New page"),
),