Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create SlidableController according to documentation #487

Open
kwarnkham opened this issue Jul 18, 2024 · 3 comments
Open

Can't create SlidableController according to documentation #487

kwarnkham opened this issue Jul 18, 2024 · 3 comments

Comments

@kwarnkham
Copy link

Here, the docs said

final controller = SlidableController();

// ...

Slidable(
  controller: controller,
  // ...
);

// ...

// Open the actions
void _handleOpen() {
  controller.openEndActionPane();
  // OR
  //controller.openStartActionPane();
}

void _handleOpen() {
  controller.close();
}

But thie SlidableController() got error
1 positional argument expected by 'SlidableController.new', but 0 found.

@Sunghee2
Copy link

I have same problem.

image

@froccawork
Copy link

For me work this

In definition of class: class _MyAppState extends State with SingleTickerProviderStateMixin

and late final slidableController = SlidableController(this);

@MasatoKaneko0124
Copy link

Thanks, @froccawork .
It worked for me.

The widget has to be a Stateful(StatefulWidget / ConsumerStatefulWidget).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants