From 43e88af8038d57b9532c939449b681ea40e730c1 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Fri, 4 Aug 2023 13:38:11 +0200 Subject: [PATCH] fix: Format and lint --- analysis_options.yaml | 4 + example/lib/main.dart | 60 +++++---- melos.yaml | 4 +- packages/moxplatform/lib/moxplatform.dart | 2 + packages/moxplatform/lib/src/plugin.dart | 3 +- .../lib/src/platform.dart | 1 + .../lib/src/platform_stub.dart | 1 + .../lib/src/contacts_android.dart | 1 - .../lib/src/isolate_android.dart | 1 - .../lib/src/service_android.dart | 1 - .../lib/src/platform_android.dart | 1 + .../lib/src/api.g.dart | 124 ++++++++++++------ .../lib/src/interface.dart | 3 +- .../lib/src/notifications.dart | 7 +- .../lib/src/notifications_stub.dart | 11 +- .../lib/src/platform_stub.dart | 6 +- 16 files changed, 157 insertions(+), 73 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index b3a83ec..1c5c425 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,4 +1,8 @@ include: package:very_good_analysis/analysis_options.yaml +analyzer: + exclude: + - lib/src/api.g.dart + linter: rules: public_member_api_docs: false diff --git a/example/lib/main.dart b/example/lib/main.dart index aabae91..531b21e 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -4,9 +4,7 @@ import 'dart:typed_data'; import 'package:flutter/material.dart'; import 'package:file_picker/file_picker.dart'; import 'package:moxplatform/moxplatform.dart'; -import 'package:moxplatform_platform_interface/moxplatform_platform_interface.dart'; import 'package:permission_handler/permission_handler.dart'; -import 'package:file_picker/file_picker.dart'; /// The id of the notification channel. const channelId = "me.polynom.moxplatform.testing3"; @@ -63,7 +61,10 @@ class MyAppState extends State { ); MoxplatformPlugin.notifications.getEventStream().listen((event) { - print('NotificationEvent(type: ${event.type}, jid: ${event.jid}, payload: ${event.payload}, extras: ${event.extra})'); + // ignore: avoid_print + print( + 'NotificationEvent(type: ${event.type}, jid: ${event.jid}, payload: ${event.payload}, extras: ${event.extra})', + ); }); } @@ -74,14 +75,19 @@ class MyAppState extends State { theme: ThemeData( primarySwatch: Colors.blue, ), - home: MyHomePage(), + home: const MyHomePage(), ); } } -class MyHomePage extends StatelessWidget { - MyHomePage({super.key}); +class MyHomePage extends StatefulWidget { + const MyHomePage({super.key}); + @override + MyHomePageState createState() => MyHomePageState(); +} + +class MyHomePageState extends State { /// List of "Message senders". final List senders = const [ Sender('Mash Kyrielight', 'mash@example.org'), @@ -90,7 +96,8 @@ class MyHomePage extends StatelessWidget { ]; /// List of sent messages. - List messages = List.empty(growable: true); + List messages = + List.empty(growable: true); Future _cryptoTest() async { final result = await FilePicker.platform.pickFiles(); @@ -111,10 +118,13 @@ class MyHomePage extends StatelessWidget { final end = DateTime.now(); final diff = end.millisecondsSinceEpoch - start.millisecondsSinceEpoch; + // ignore: avoid_print print('TIME: ${diff / 1000}s'); + // ignore: avoid_print print('DONE (${enc != null})'); final lengthEnc = await File('$path.enc').length(); final lengthOrig = await File(path).length(); + // ignore: avoid_print print('Encrypted file is $lengthEnc Bytes large (Orig $lengthOrig)'); await MoxplatformPlugin.crypto.decryptFile( @@ -125,9 +135,11 @@ class MyHomePage extends StatelessWidget { CipherAlgorithm.aes256CbcPkcs7, 'SHA-256', ); + // ignore: avoid_print print('DONE'); final lengthDec = await File('$path.dec').length(); + // ignore: avoid_print print('Decrypted file is $lengthDec Bytes large (Orig $lengthOrig)'); } @@ -152,13 +164,15 @@ class MyHomePage extends StatelessWidget { ), ElevatedButton( onPressed: () { - MoxplatformPlugin.contacts.recordSentMessage('Person', 'Person', fallbackIcon: FallbackIconType.person); + MoxplatformPlugin.contacts.recordSentMessage('Person', 'Person', + fallbackIcon: FallbackIconType.person); }, child: const Text('Test recordSentMessage (person fallback)'), ), ElevatedButton( onPressed: () { - MoxplatformPlugin.contacts.recordSentMessage('Notes', 'Notes', fallbackIcon: FallbackIconType.notes); + MoxplatformPlugin.contacts.recordSentMessage('Notes', 'Notes', + fallbackIcon: FallbackIconType.notes); }, child: const Text('Test recordSentMessage (notes fallback)'), ), @@ -167,23 +181,22 @@ class MyHomePage extends StatelessWidget { final result = await FilePicker.platform.pickFiles( type: FileType.image, ); + // ignore: avoid_print print('Picked file: ${result?.files.single.path}'); // Create a new message. final senderIndex = Random().nextInt(senders.length); final time = DateTime.now().millisecondsSinceEpoch; - messages.add( - NotificationMessage( - jid: senders[senderIndex].jid, - sender: senders[senderIndex].name, - content: NotificationMessageContent( - body: result != null ? null : 'Message #${messages.length}', - mime: 'image/jpeg', - path: result?.files.single.path, - ), - timestamp: time, - ) - ); + messages.add(NotificationMessage( + jid: senders[senderIndex].jid, + sender: senders[senderIndex].name, + content: NotificationMessageContent( + body: result != null ? null : 'Message #${messages.length}', + mime: 'image/jpeg', + path: result?.files.single.path, + ), + timestamp: time, + )); await Future.delayed(const Duration(seconds: 4)); await MoxplatformPlugin.notifications.showMessagingNotification( @@ -239,18 +252,21 @@ class MyHomePage extends StatelessWidget { ); if (result == null) return; - MoxplatformPlugin.notifications.setNotificationSelfAvatar(result.files.single.path!); + MoxplatformPlugin.notifications + .setNotificationSelfAvatar(result.files.single.path!); }, child: const Text('Set notification self-avatar'), ), ElevatedButton( onPressed: () async { + // ignore: avoid_print print(await MoxplatformPlugin.platform.getPersistentDataPath()); }, child: const Text('Get data directory'), ), ElevatedButton( onPressed: () async { + // ignore: avoid_print print(await MoxplatformPlugin.platform.getCacheDataPath()); }, child: const Text('Get cache directory'), diff --git a/melos.yaml b/melos.yaml index 68d7a73..da5358e 100644 --- a/melos.yaml +++ b/melos.yaml @@ -8,5 +8,7 @@ command: usePubspecOverrides: true scripts: + format: + exec: dart format . analyze: - exec: dart analyze . + exec: flutter analyze diff --git a/packages/moxplatform/lib/moxplatform.dart b/packages/moxplatform/lib/moxplatform.dart index 01308d4..f2cdfc6 100644 --- a/packages/moxplatform/lib/moxplatform.dart +++ b/packages/moxplatform/lib/moxplatform.dart @@ -1,4 +1,6 @@ library moxplatform; +export 'package:moxplatform_platform_interface/moxplatform_platform_interface.dart'; + export 'src/plugin.dart'; export 'src/types.dart'; diff --git a/packages/moxplatform/lib/src/plugin.dart b/packages/moxplatform/lib/src/plugin.dart index 39853c2..b2dbe6b 100644 --- a/packages/moxplatform/lib/src/plugin.dart +++ b/packages/moxplatform/lib/src/plugin.dart @@ -4,6 +4,7 @@ class MoxplatformPlugin { static IsolateHandler get handler => MoxplatformInterface.handler; static CryptographyImplementation get crypto => MoxplatformInterface.crypto; static ContactsImplementation get contacts => MoxplatformInterface.contacts; - static NotificationsImplementation get notifications => MoxplatformInterface.notifications; + static NotificationsImplementation get notifications => + MoxplatformInterface.notifications; static PlatformImplementation get platform => MoxplatformInterface.platform; } diff --git a/packages/moxplatform/packages/moxplatform_platform_interface/lib/src/platform.dart b/packages/moxplatform/packages/moxplatform_platform_interface/lib/src/platform.dart index e69de29..8b13789 100644 --- a/packages/moxplatform/packages/moxplatform_platform_interface/lib/src/platform.dart +++ b/packages/moxplatform/packages/moxplatform_platform_interface/lib/src/platform.dart @@ -0,0 +1 @@ + diff --git a/packages/moxplatform/packages/moxplatform_platform_interface/lib/src/platform_stub.dart b/packages/moxplatform/packages/moxplatform_platform_interface/lib/src/platform_stub.dart index e69de29..8b13789 100644 --- a/packages/moxplatform/packages/moxplatform_platform_interface/lib/src/platform_stub.dart +++ b/packages/moxplatform/packages/moxplatform_platform_interface/lib/src/platform_stub.dart @@ -0,0 +1 @@ + diff --git a/packages/moxplatform_android/lib/src/contacts_android.dart b/packages/moxplatform_android/lib/src/contacts_android.dart index c21ea4a..b9d2b9d 100644 --- a/packages/moxplatform_android/lib/src/contacts_android.dart +++ b/packages/moxplatform_android/lib/src/contacts_android.dart @@ -1,5 +1,4 @@ import 'package:moxplatform_platform_interface/moxplatform_platform_interface.dart'; -import 'package:moxplatform_platform_interface/src/api.g.dart'; class AndroidContactsImplementation extends ContactsImplementation { final MoxplatformApi _api = MoxplatformApi(); diff --git a/packages/moxplatform_android/lib/src/isolate_android.dart b/packages/moxplatform_android/lib/src/isolate_android.dart index fd14e54..2675c49 100644 --- a/packages/moxplatform_android/lib/src/isolate_android.dart +++ b/packages/moxplatform_android/lib/src/isolate_android.dart @@ -7,7 +7,6 @@ import 'package:logging/logging.dart'; import 'package:moxlib/moxlib.dart'; import 'package:moxplatform/moxplatform.dart'; import 'package:moxplatform_android/src/service_android.dart'; -import 'package:moxplatform_platform_interface/moxplatform_platform_interface.dart'; /// An [AwaitableDataSender] that uses flutter_background_service. class BackgroundServiceDataSender diff --git a/packages/moxplatform_android/lib/src/service_android.dart b/packages/moxplatform_android/lib/src/service_android.dart index 46d62b8..23faa77 100644 --- a/packages/moxplatform_android/lib/src/service_android.dart +++ b/packages/moxplatform_android/lib/src/service_android.dart @@ -6,7 +6,6 @@ import 'package:logging/logging.dart'; import 'package:meta/meta.dart'; import 'package:moxlib/moxlib.dart'; import 'package:moxplatform/moxplatform.dart'; -import 'package:moxplatform_platform_interface/moxplatform_platform_interface.dart'; import 'package:uuid/uuid.dart'; class AndroidBackgroundService extends BackgroundService { diff --git a/packages/moxplatform_android/packages/moxplatform_android/lib/src/platform_android.dart b/packages/moxplatform_android/packages/moxplatform_android/lib/src/platform_android.dart index e69de29..8b13789 100644 --- a/packages/moxplatform_android/packages/moxplatform_android/lib/src/platform_android.dart +++ b/packages/moxplatform_android/packages/moxplatform_android/lib/src/platform_android.dart @@ -0,0 +1 @@ + diff --git a/packages/moxplatform_platform_interface/lib/src/api.g.dart b/packages/moxplatform_platform_interface/lib/src/api.g.dart index 0725d2e..81ecb15 100644 --- a/packages/moxplatform_platform_interface/lib/src/api.g.dart +++ b/packages/moxplatform_platform_interface/lib/src/api.g.dart @@ -356,19 +356,19 @@ class _MoxplatformApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return CryptographyResult.decode(readValue(buffer)!); - case 129: + case 129: return MessagingNotification.decode(readValue(buffer)!); - case 130: + case 130: return NotificationEvent.decode(readValue(buffer)!); - case 131: + case 131: return NotificationI18nData.decode(readValue(buffer)!); - case 132: + case 132: return NotificationMessage.decode(readValue(buffer)!); - case 133: + case 133: return NotificationMessageContent.decode(readValue(buffer)!); - case 134: + case 134: return RegularNotification.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -387,12 +387,15 @@ class MoxplatformApi { static const MessageCodec codec = _MoxplatformApiCodec(); /// Notification APIs - Future createNotificationChannel(String arg_title, String arg_description, String arg_id, bool arg_urgent) async { + Future createNotificationChannel(String arg_title, + String arg_description, String arg_id, bool arg_urgent) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.createNotificationChannel', codec, + 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.createNotificationChannel', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_title, arg_description, arg_id, arg_urgent]) as List?; + final List? replyList = await channel + .send([arg_title, arg_description, arg_id, arg_urgent]) + as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -409,9 +412,11 @@ class MoxplatformApi { } } - Future showMessagingNotification(MessagingNotification arg_notification) async { + Future showMessagingNotification( + MessagingNotification arg_notification) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.showMessagingNotification', codec, + 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.showMessagingNotification', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_notification]) as List?; @@ -433,7 +438,8 @@ class MoxplatformApi { Future showNotification(RegularNotification arg_notification) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.showNotification', codec, + 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.showNotification', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_notification]) as List?; @@ -455,7 +461,8 @@ class MoxplatformApi { Future dismissNotification(int arg_id) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.dismissNotification', codec, + 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.dismissNotification', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_id]) as List?; @@ -477,7 +484,8 @@ class MoxplatformApi { Future setNotificationSelfAvatar(String arg_path) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.setNotificationSelfAvatar', codec, + 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.setNotificationSelfAvatar', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_path]) as List?; @@ -499,7 +507,8 @@ class MoxplatformApi { Future setNotificationI18n(NotificationI18nData arg_data) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.setNotificationI18n', codec, + 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.setNotificationI18n', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_data]) as List?; @@ -522,10 +531,10 @@ class MoxplatformApi { /// Platform APIs Future getPersistentDataPath() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.getPersistentDataPath', codec, + 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.getPersistentDataPath', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -549,10 +558,10 @@ class MoxplatformApi { Future getCacheDataPath() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.getCacheDataPath', codec, + 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.getCacheDataPath', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -575,12 +584,18 @@ class MoxplatformApi { } /// Contacts APIs - Future recordSentMessage(String arg_name, String arg_jid, String? arg_avatarPath, FallbackIconType arg_fallbackIcon) async { + Future recordSentMessage(String arg_name, String arg_jid, + String? arg_avatarPath, FallbackIconType arg_fallbackIcon) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.recordSentMessage', codec, + 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.recordSentMessage', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_name, arg_jid, arg_avatarPath, arg_fallbackIcon.index]) as List?; + final List? replyList = await channel.send([ + arg_name, + arg_jid, + arg_avatarPath, + arg_fallbackIcon.index + ]) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -598,12 +613,25 @@ class MoxplatformApi { } /// Cryptography APIs - Future encryptFile(String arg_sourcePath, String arg_destPath, Uint8List arg_key, Uint8List arg_iv, CipherAlgorithm arg_algorithm, String arg_hashSpec) async { + Future encryptFile( + String arg_sourcePath, + String arg_destPath, + Uint8List arg_key, + Uint8List arg_iv, + CipherAlgorithm arg_algorithm, + String arg_hashSpec) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.encryptFile', codec, + 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.encryptFile', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_sourcePath, arg_destPath, arg_key, arg_iv, arg_algorithm.index, arg_hashSpec]) as List?; + final List? replyList = await channel.send([ + arg_sourcePath, + arg_destPath, + arg_key, + arg_iv, + arg_algorithm.index, + arg_hashSpec + ]) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -620,12 +648,25 @@ class MoxplatformApi { } } - Future decryptFile(String arg_sourcePath, String arg_destPath, Uint8List arg_key, Uint8List arg_iv, CipherAlgorithm arg_algorithm, String arg_hashSpec) async { + Future decryptFile( + String arg_sourcePath, + String arg_destPath, + Uint8List arg_key, + Uint8List arg_iv, + CipherAlgorithm arg_algorithm, + String arg_hashSpec) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.decryptFile', codec, + 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.decryptFile', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_sourcePath, arg_destPath, arg_key, arg_iv, arg_algorithm.index, arg_hashSpec]) as List?; + final List? replyList = await channel.send([ + arg_sourcePath, + arg_destPath, + arg_key, + arg_iv, + arg_algorithm.index, + arg_hashSpec + ]) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -642,12 +683,14 @@ class MoxplatformApi { } } - Future hashFile(String arg_sourcePath, String arg_hashSpec) async { + Future hashFile( + String arg_sourcePath, String arg_hashSpec) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.hashFile', codec, + 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.hashFile', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_sourcePath, arg_hashSpec]) as List?; + final List? replyList = await channel + .send([arg_sourcePath, arg_hashSpec]) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -667,7 +710,8 @@ class MoxplatformApi { /// Stubs Future eventStub(NotificationEvent arg_event) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.eventStub', codec, + 'dev.flutter.pigeon.moxplatform_platform_interface.MoxplatformApi.eventStub', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_event]) as List?; diff --git a/packages/moxplatform_platform_interface/lib/src/interface.dart b/packages/moxplatform_platform_interface/lib/src/interface.dart index 45fd5d2..b5ec7c6 100644 --- a/packages/moxplatform_platform_interface/lib/src/interface.dart +++ b/packages/moxplatform_platform_interface/lib/src/interface.dart @@ -21,7 +21,8 @@ abstract class MoxplatformInterface extends PlatformInterface { static IsolateHandler handler = StubIsolateHandler(); static CryptographyImplementation crypto = StubCryptographyImplementation(); static ContactsImplementation contacts = StubContactsImplementation(); - static NotificationsImplementation notifications = StubNotificationsImplementation(); + static NotificationsImplementation notifications = + StubNotificationsImplementation(); static PlatformImplementation platform = StubPlatformImplementation(); /// Return the current platform name. diff --git a/packages/moxplatform_platform_interface/lib/src/notifications.dart b/packages/moxplatform_platform_interface/lib/src/notifications.dart index 3918bed..cc55742 100644 --- a/packages/moxplatform_platform_interface/lib/src/notifications.dart +++ b/packages/moxplatform_platform_interface/lib/src/notifications.dart @@ -4,7 +4,12 @@ import 'package:moxplatform_platform_interface/src/api.g.dart'; abstract class NotificationsImplementation { /// Creates a notification channel with the name [title] and id [id]. If [urgent] is true, then /// it configures the channel as carrying urgent information. - Future createNotificationChannel(String title, String description, String id, bool urgent); + Future createNotificationChannel( + String title, + String description, + String id, + bool urgent, + ); /// Shows a notification [notification] in the messaging style with everyting it needs. Future showMessagingNotification(MessagingNotification notification); diff --git a/packages/moxplatform_platform_interface/lib/src/notifications_stub.dart b/packages/moxplatform_platform_interface/lib/src/notifications_stub.dart index 0fe38d4..af3abb1 100644 --- a/packages/moxplatform_platform_interface/lib/src/notifications_stub.dart +++ b/packages/moxplatform_platform_interface/lib/src/notifications_stub.dart @@ -4,10 +4,17 @@ import 'package:moxplatform_platform_interface/src/notifications.dart'; class StubNotificationsImplementation extends NotificationsImplementation { @override - Future createNotificationChannel(String title, String description, String id, bool urgent) async {} + Future createNotificationChannel( + String title, + String description, + String id, + bool urgent, + ) async {} @override - Future showMessagingNotification(MessagingNotification notification) async {} + Future showMessagingNotification( + MessagingNotification notification, + ) async {} @override Future showNotification(RegularNotification notification) async {} diff --git a/packages/moxplatform_platform_interface/lib/src/platform_stub.dart b/packages/moxplatform_platform_interface/lib/src/platform_stub.dart index ad85004..eeb11ea 100644 --- a/packages/moxplatform_platform_interface/lib/src/platform_stub.dart +++ b/packages/moxplatform_platform_interface/lib/src/platform_stub.dart @@ -2,8 +2,10 @@ import 'package:moxplatform_platform_interface/src/platform.dart'; class StubPlatformImplementation extends PlatformImplementation { /// Returns the path where persistent data should be stored. - Future getPersistentDataPath() async => ""; + @override + Future getPersistentDataPath() async => ''; /// Returns the path where cache data should be stored. - Future getCacheDataPath() async => ""; + @override + Future getCacheDataPath() async => ''; }