Skip to content

Commit

Permalink
chore: improve code style
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-virkus committed Jan 5, 2024
1 parent 877cfea commit 5f68782
Show file tree
Hide file tree
Showing 16 changed files with 113 additions and 115 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
echo keyAlias=\${{secrets.PLAY_KEY_ALIAS}} >> ${{env.PROPERTIES_PATH}}
echo storeFile=\${{env.STORE_PATH}} >> ${{env.PROPERTIES_PATH}}
echo "${{ secrets.PLAY_UPLOAD_KEYSTORE }}" | base64 --decode > ${{env.STORE_PATH}}
echo "storePath: $STORE_PATH"
ls -la ${{env.STORE_PATH}}
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
Expand Down
4 changes: 2 additions & 2 deletions lib/hoster/service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class MailHoster {
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: PlatformText(buttonText),
child: Text(buttonText),
),
],
),
Expand Down Expand Up @@ -240,7 +240,7 @@ class GmailMailHoster extends MailHoster {
),
Padding(
padding: const EdgeInsets.only(left: 8, right: 16),
child: PlatformText(
child: Text(
localizations.addAccountOauthSignInGoogle,
style: GoogleFonts.roboto(
color: googleText,
Expand Down
2 changes: 1 addition & 1 deletion lib/lock/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class _LockScreenState extends State<LockScreen> {
child: Text(localizations.lockScreenIntro),
),
PlatformTextButton(
child: PlatformText(localizations.lockScreenUnlockAction),
child: Text(localizations.lockScreenUnlockAction),
onPressed: () => _authenticate(context),
),
],
Expand Down
6 changes: 3 additions & 3 deletions lib/models/async_mime_source.dart
Original file line number Diff line number Diff line change
Expand Up @@ -977,20 +977,20 @@ class AsyncSearchMimeSource extends AsyncMimeSource {
@override
Future<MoveResult> moveMessages(
List<MimeMessage> messages, Mailbox targetMailbox) {
// TODO: implement moveMessages
// TODO(RV): implement moveMessages
throw UnimplementedError();
}

@override
Future<MoveResult> moveMessagesToFlag(
List<MimeMessage> messages, MailboxFlag targetMailboxFlag) {
// TODO: implement moveMessagesToFlag
// TODO(RV): implement moveMessagesToFlag
throw UnimplementedError();
}

@override
Future<MoveResult> undoMoveMessages(MoveResult moveResult) {
// TODO: implement undoMoveMessages
// TODO(RV): implement undoMoveMessages
throw UnimplementedError();
}

Expand Down
2 changes: 1 addition & 1 deletion lib/models/hive/hive_mime_storage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class HiveMailboxMimeStorage extends OfflineMimeStorage {

@override
Future<void> moveMessages(List<MimeMessage> messages, Mailbox targetMailbox) {
// TODO: implement moveMessages
// TODO(RV): implement moveMessages
throw UnimplementedError();
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/models/mail_operation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class StoreFlagsOperation extends MailOperation {

@override
Future<void> execute(MailClient mailClient, OfflineMimeStorage storage) {
// TODO: implement execute
// TODO(RV): implement execute
throw UnimplementedError();
}
}
4 changes: 2 additions & 2 deletions lib/models/message_source.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ class SingleMessageSource extends MessageSource {

@override
void onMailCacheInvalidated(AsyncMimeSource source) {
// TODO: implement onMailCacheInvalidated
// TODO(RV): implement onMailCacheInvalidated
}
}

Expand Down Expand Up @@ -1350,7 +1350,7 @@ class ListMessageSource extends MessageSource {

@override
void onMailCacheInvalidated(AsyncMimeSource source) {
// TODO: implement onMailCacheInvalidated
// TODO(RV): implement onMailCacheInvalidated
}
}

Expand Down
14 changes: 7 additions & 7 deletions lib/models/offline_mime_source.dart
Original file line number Diff line number Diff line change
Expand Up @@ -166,31 +166,31 @@ class OfflineMailboxMimeSource extends PagedCachedMimeSource {
List<MimeMessage> messages,
MailboxFlag targetMailboxFlag,
) {
// TODO: implement moveMessagesToFlag
// TODO(RV): implement moveMessagesToFlag
throw UnimplementedError();
}

@override
Future<MoveResult> undoMoveMessages(MoveResult moveResult) {
// TODO: implement undoMoveMessages
// TODO(RV): implement undoMoveMessages
throw UnimplementedError();
}

@override
Future<List<DeleteResult>> deleteAllMessages({bool expunge = false}) {
// TODO: implement deleteAllMessages
// TODO(RV): implement deleteAllMessages
throw UnimplementedError();
}

@override
Future<DeleteResult> deleteMessages(List<MimeMessage> messages) {
// TODO: implement deleteMessages
// TODO(RV): implement deleteMessages
throw UnimplementedError();
}

@override
Future<DeleteResult> undoDeleteMessages(DeleteResult deleteResult) {
// TODO: implement undoDeleteMessages
// TODO(RV): implement undoDeleteMessages
throw UnimplementedError();
}

Expand All @@ -199,7 +199,7 @@ class OfflineMailboxMimeSource extends PagedCachedMimeSource {

@override
AsyncMimeSource search(MailSearch search) {
// TODO: implement search
// TODO(RV): implement search
throw UnimplementedError();
}

Expand Down Expand Up @@ -228,7 +228,7 @@ class OfflineMailboxMimeSource extends PagedCachedMimeSource {
List<String> flags, {
StoreAction action = StoreAction.add,
}) {
// TODO: implement storeAll
// TODO(RV): implement storeAll
throw UnimplementedError();
}

Expand Down
4 changes: 2 additions & 2 deletions lib/screens/account_edit_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class AccountEditScreen extends HookConsumerWidget {
isRetryingToConnectState,
),
icon: Icon(iconService.retry),
label: PlatformText(
label: Text(
localizations
.editAccountFailureToConnectRetryAction,
),
Expand All @@ -107,7 +107,7 @@ class AccountEditScreen extends HookConsumerWidget {
account,
isRetryingToConnectState,
),
child: PlatformText(
child: Text(
localizations
.editAccountFailureToConnectChangePasswordAction,
),
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/welcome_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class WelcomeScreen extends StatelessWidget {
child: PlatformFilledButtonIcon(
icon: Icon(IconService.instance.email),
label: Center(
child: PlatformText(localizations.welcomeActionSignIn),
child: Text(localizations.welcomeActionSignIn),
),
onPressed: () {
context.goNamed(Routes.accountAdd);
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/account_hoster_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MailHosterSelector extends StatelessWidget {
if (index == 0) {
return Center(
child: PlatformTextButton(
child: PlatformText(localizations.accountProviderCustom),
child: Text(localizations.accountProviderCustom),
onPressed: () => onSelected(null),
),
);
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/ical_composer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class _DateTimePicker extends StatelessWidget {
children: [
// set date button:
PlatformTextButton(
child: PlatformText(
child: Text(
dt == null
? localizations.composeAppointmentLabelDay
: context.formatDate(dt.toLocal(), useLongFormat: true),
Expand All @@ -355,7 +355,7 @@ class _DateTimePicker extends StatelessWidget {
if (!onlyDate)
// set time button:
PlatformTextButton(
child: PlatformText(
child: Text(
dt == null
? localizations.composeAppointmentLabelTime
: context.formatTimeOfDay(
Expand Down
16 changes: 8 additions & 8 deletions lib/widgets/ical_interactive_media.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class _IcalInteractiveMediaState extends State<IcalInteractiveMedia> {
Row(
children: [
PlatformTextButton(
child: PlatformText(localizations.actionAccept),
child: Text(localizations.actionAccept),
onPressed: () => _changeParticipantStatus(
ParticipantStatus.accepted,
localizations,
Expand All @@ -122,7 +122,7 @@ class _IcalInteractiveMediaState extends State<IcalInteractiveMedia> {
),
),
PlatformTextButton(
child: PlatformText(localizations.actionDecline),
child: Text(localizations.actionDecline),
onPressed: () => _changeParticipantStatus(
ParticipantStatus.declined,
localizations,
Expand All @@ -140,7 +140,7 @@ class _IcalInteractiveMediaState extends State<IcalInteractiveMedia> {
),
),
PlatformTextButton(
child: PlatformText(
child: Text(
localizations.icalendarActionChangeParticipantStatus,
),
onPressed: () => _queryParticipantStatus(localizations),
Expand Down Expand Up @@ -354,7 +354,7 @@ class _IcalInteractiveMediaState extends State<IcalInteractiveMedia> {
),
if (!isReply)
PlatformElevatedButton(
child: PlatformText(localizations.icalendarExportAction),
child: Text(localizations.icalendarExportAction),
onPressed: () => _exportToNativeCalendar(_calendar),
),
],
Expand Down Expand Up @@ -436,19 +436,19 @@ class _IcalInteractiveMediaState extends State<IcalInteractiveMedia> {
localizations.icalendarParticipantStatusChangeText,
actions: [
PlatformTextButton(
child: PlatformText(localizations.actionAccept),
child: Text(localizations.actionAccept),
onPressed: () => context.pop(ParticipantStatus.accepted),
),
PlatformTextButton(
child: PlatformText(localizations.icalendarAcceptTentatively),
child: Text(localizations.icalendarAcceptTentatively),
onPressed: () => context.pop(ParticipantStatus.tentative),
),
PlatformTextButton(
child: PlatformText(localizations.actionDecline),
child: Text(localizations.actionDecline),
onPressed: () => context.pop(ParticipantStatus.declined),
),
PlatformTextButton(
child: PlatformText(localizations.actionCancel),
child: Text(localizations.actionCancel),
onPressed: () => context.pop(),
),
],
Expand Down
Loading

0 comments on commit 5f68782

Please sign in to comment.