Giter Club home page Giter Club logo

Comments (5)

benjamindean avatar benjamindean commented on September 24, 2024

@IL7Games What is the error exactly?

from flutter_vibration.

 avatar commented on September 24, 2024

Compiler message:
lib/main.dart:35:18: Error: A value of type 'Future' can't be assigned to a variable of type 'bool'.

  • 'Future' is from 'dart:async'.
    Try changing the type of the left hand side, or casting the right hand side to 'bool'.
    if(Vibration.hasVibrator()){
    ^
    Compiler failed on /home/***/Documentos/Dev/Flutter/flutter_flutter/lib/main.dart
  • Where:
    Script '/home/***/.development/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 765

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebugArm'.
    Process 'command '/home/***/.development/flutter/bin/flutter'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 37sGradle task assembleDebug failed with exit code 1

from flutter_vibration.

 avatar commented on September 24, 2024

HasVibrate uses the Future class, so it has to use async to work:

void vibrate() async {
 if (await Vibration.hasVibrator()){
   //Vibration.vibrate();
   Vibration.vibrate(duration: 100);
  }
}

"Thank you" for your absence benjamindean.

from flutter_vibration.

karolzlot avatar karolzlot commented on September 24, 2024

"Thank you" for your absence benjamindean.

@IL7Games
This is rude. You didn't pay benjamindean for his time

from flutter_vibration.

 avatar commented on September 24, 2024

Yes, I was a little rude and I apologize for that @benjamindean.

You didn't pay benjamindean for his time

I know I didn't pay him anything but who made the plugin @qqgg231 ?
I know he's not obligated to help me, but couldn't he give me just a little bit of help?

Anyway, I hope that with this topic can help other people with the same problem and once again I'm sorry benjamindean.

from flutter_vibration.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.