amangautam1 / flutter-musicplayer

A complete music player in flutter with cool UI and design.
MIT License
435 stars 138 forks source link

Lots of error while trying to run app from the source code #4

Closed himankpathak closed 6 years ago

himankpathak commented 6 years ago

Flutter SDK: 0.5.1 Dart SDK: 2.0.0

Error message while running flutter run `Running 'gradlew assembleDebug'...
compiler message: lib/database/database_client.dart:27:14: Error: The getter 'count' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing getter, or defining a getter or field named 'count'. compiler message: if (song.count == null) { compiler message: ^ compiler message: lib/database/database_client.dart:28:12: Error: The setter 'count' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing setter, or defining a setter or field named 'count'. compiler message: song.count = 0; compiler message: ^ compiler message: lib/database/database_client.dart:30:14: Error: The getter 'timestamp' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing getter, or defining a getter or field named 'timestamp'. compiler message: if (song.timestamp == null) { compiler message: ^ compiler message: lib/database/database_client.dart:31:12: Error: The setter 'timestamp' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing setter, or defining a setter or field named 'timestamp'. compiler message: song.timestamp = 0; compiler message: ^ compiler message: lib/database/database_client.dart:33:14: Error: The getter 'isFav' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing getter, or defining a getter or field named 'isFav'. compiler message: if (song.isFav == null) { compiler message: ^ compiler message: lib/database/database_client.dart:34:12: Error: The setter 'isFav' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing setter, or defining a setter or field named 'isFav'. compiler message: song.isFav = 0; compiler message: ^ compiler message: lib/database/database_client.dart:41:43: Error: The method 'toMap' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing method, or defining a method named 'toMap'. compiler message: id = await _db.insert("songs", song.toMap()); compiler message: ^ compiler message: lib/database/database_client.dart:45:33: Error: The method 'toMap' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing method, or defining a method named 'toMap'. compiler message: .update("songs", song.toMap(), where: "id= ?", whereArgs: [song.id]); compiler message: ^ compiler message: lib/database/database_client.dart:63:48: Error: Getter not found: 'Columns'. compiler message: await _db.query("songs", columns: Song.Columns, orderBy: "title"); compiler message: ^^^^^^^ compiler message: lib/database/database_client.dart:74:48: Error: Getter not found: 'Columns'. compiler message: await _db.query("songs", columns: Song.Columns, where: "albumid=$id"); compiler message: ^^^^^^^ compiler message: lib/database/database_client.dart:117:23: Error: Getter not found: 'Columns'. compiler message: columns: Song.Columns, where: "artist='$artist'"); compiler message: ^^^^^^^ compiler message: lib/database/database_client.dart:147:45: Error: The method 'toMap' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing method, or defining a method named 'toMap'. compiler message: id = await _db.insert("recents", song.toMap()); compiler message: ^ compiler message: lib/database/database_client.dart:150:40: Error: The method 'toMap' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing method, or defining a method named 'toMap'. compiler message: await _db.update("recents", song.toMap(), compiler message: ^ compiler message: lib/database/database_client.dart:195:45: Error: The method 'toMap' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing method, or defining a method named 'toMap'. compiler message: id = await _db.insert("songs", song.toMap()); compiler message: ^ compiler message: lib/database/database_client.dart:198:40: Error: The method 'toMap' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing method, or defining a method named 'toMap'. compiler message: await _db.update("songs", song.toMap(), compiler message: ^ compiler message: lib/pages/now_playing.dart:110:10: Error: The setter 'timestamp' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing setter, or defining a setter or field named 'timestamp'. compiler message: song.timestamp = new DateTime.now().millisecondsSinceEpoch; compiler message: ^ compiler message: lib/pages/now_playing.dart:111:14: Error: The getter 'count' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing getter, or defining a getter or field named 'count'. compiler message: if (song.count == null) { compiler message: ^ compiler message: lib/pages/now_playing.dart:112:12: Error: The setter 'count' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing setter, or defining a setter or field named 'count'. compiler message: song.count = 0; compiler message: ^ compiler message: lib/pages/now_playing.dart:114:12: Error: The getter 'count' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing getter, or defining a getter or field named 'count'. compiler message: song.count++; compiler message: ^ compiler message: lib/pages/now_playing.dart:114:12: Error: The setter 'count' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing setter, or defining a setter or field named 'count'. compiler message: song.count++; compiler message: ^ compiler message: lib/pages/now_playing.dart:117:18: Error: The getter 'isFav' isn't defined for the class '#lib1::Song'. compiler message: Try correcting the name to the name of an existing getter, or defining a getter or field named 'isFav'. compiler message: isfav = song.isFav; compiler message: ^ Compiler failed on /home/himank/LinuxProg/GitHub/flutter-musicplayer/lib/main.dart

FAILURE: Build failed with an exception. ` I also ran flutter packages get before, so the dependecies are satisfied.

amangautam1 commented 6 years ago

Is your Song class is same as in #1. I have made few changes to Song class in flute_music_player.dart. just check if it is same or not.

himankpathak commented 6 years ago

@amangautam1 thanks for the reply, and how can I go about editing packages which I have downloaded with "flutter packages get"?

amangautam1 commented 6 years ago

Just press ctrl, while pressing it click on Song class in the code. It will open the original plugin code, make desired changes and save.

himankpathak commented 6 years ago

got it working, thanks :+1:

Aakash-DD commented 5 years ago

@himankpathak how can i solve this issue, can u help me plz buddy... I just got same error .

gunasekaran2410 commented 3 years ago

Error: The getter 'timestamp' isn't defined for the class 'Song'.