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

Readme Update #10

Closed
red-star25 opened this issue Sep 29, 2022 · 1 comment
Closed

Readme Update #10

red-star25 opened this issue Sep 29, 2022 · 1 comment

Comments

@red-star25
Copy link

Hi,
There is one error in Doc : Visit Here

Error :

void main() {

  /// Initialize the plugin.
  await Motion.initialize();  ❌

  /// Globally set the sensors sampling rate to 60 frames per second.
  Motion.setUpdateInterval(60.fps); ❌

  /// Run the app.
  runApp(...);
}

Update (.instance)

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  /// Initialize the plugin to determine gyroscope availability.
  await Motion.instance.initialize(); ✅

  /// Globally set Motion's update interval to 60 frames per second.
  Motion.instance.setUpdateInterval(60.fps); ✅
  
runApp(const MyApp());
}
@mrcendre
Copy link
Owner

Hi @red-star25, good catch ! Fixed as of version 1.4.0.

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

2 participants