Issue int score = 0; Duration duration = Duration(seconds: Duration.secondsPerDay); void callLogs() async { Stopwatch stopwatch = new Stopwatch()..start(); Iterable<CallLogEntry> entries = await CallLog.get(); for (var item in entries) { duration = ${stopwatch.elapsed;}; print(‘Duration ${stopwatch.elapsed}’); } setState(() { duration >
Continue readingTag: flutter-packages
Counter and call duration combination in flutter
Issue int score = 0; score += 1; I wish to add 1 (+= 1) to score when call duration reach 30 seconds just once and reset the score to 0 when call duration is less than 30 seconds. Text(‘$score’)
Continue readingMissing compileSdkVersion for google mobile ads
Issue defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.ringit2" minSdkVersion 21 targetSdkVersion 30 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } Here is what I found on my build.gradle and I can’t find compileSdkVersion which I have to
Continue readingShowing Interstitial ads every 5 clicks
Issue I have an ElevatedButton to call family member using flutter_phone_direct_caller. I wish to show interstitial ads once every 5 clicks user pushes the ElevatedButton. The code below works fine but after 5 clicks, the interstitial ads show up every
Continue readingHow to call randomly selected number from contact list in flutter?
Issue import ‘package:flutter_phone_direct_caller/flutter_phone_direct_caller.dart’; import ‘package:contacts_service/contacts_service.dart’; void checkContactPermission() async { var status = await Permission.contacts.status; var contacts = ContactsService.getContacts(); var list = [contacts]; var randomItem = (list.shuffle()); if (status.isGranted) { FlutterPhoneDirectCaller.callNumber(‘randomItem’); } if (!status.isGranted) { PermissionStatus permissionStatus = await Permission.contacts.request(); if
Continue readingHow to add assets in flutter Package/Plugin development?
Issue I am developing a flutter package containing some assets files. I mentioned required assets in pubsepc.yaml as usual like this assets: – assets/abc.xyz and uploaded the package to https://pub.dartlang.org/. After that I created a flutter Application and imported my
Continue readingAlready using sqflite database for mobile App which is not supporting to WebApp,can i use different library for web App in same if yes than which lib
Issue i am using sqflite library for database but it is supporting to IOS/Android app can i use to database for App existing one(Sqflite) and for webApp different in the same app if I can then how and which will
Continue reading2 permission requests appear one after another?
Issue My code is supposed to ask two permission right after another but some how it show 2 permission requests one after another. What do I have to do to fix this? Future<void> checkContactPermission() async { var status = await
Continue readingHow to change package name in flutter?
Issue Is there any way to change Package Name of Flutter project? I want to change package name and application name in flutter project. Solution For Android App Name Change the label name in your AndroidManifest.xml file: <application android:name="io.flutter.app.FlutterApplication" android:label="TheNameOfYourApp"
Continue readingImporting var to main.dart from another file?
Issue on checkContact.dart Future<void> checkContactPermission() async { var status = await Permission.contacts.status; if (!status.isGranted) { PermissionStatus permissionStatus = await Permission.contacts.request(); status = await Permission.contacts.status; if (status.isDenied) { PermissionStatus permissionStatus = await Permission.contacts.request(); } } if (status.isGranted) { var contacts =
Continue reading