rive-app / rive-flutter

Flutter runtime for Rive
https://rive.app
MIT License
1.16k stars 180 forks source link

export Joystick class #357

Closed dario-digregorio closed 5 months ago

dario-digregorio commented 5 months ago

Hi, this is a very small request. I would like to use the Joystick class inside src/rive_core/joystick.dart in my project. For this it needs to be exported in rive.dart. Would that be possible?

HayesGordon commented 5 months ago

Hey @dario-digregorio,

We're intentionally trying to limit what we expose. For most users, we do not recommend they interact with joysticks directly and instead control them through the state machine.

But if you have a use case to do so you can still import this class. You'll only get a linter warning that you can ignore.

// ignore: implementation_imports
import 'package:rive/src/rive_core/joystick.dart';

Closing this issue, but feel free to reopen if needed.

HayesGordon commented 5 months ago

I forgot to mention that a reason some of these classes are private is that they could change suddenly between versions (without a breaking API warning/migration). Something to keep in mind if you do import classes that aren't intended to be public.