Cirilla Documentations

  1. Home
  2. Docs
  3. Cirilla Documentations
  4. Advanced
  5. Register order actions

Register order actions

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"),
),

Video Document

Was this article helpful to you? Yes No

How can we help?