-
-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 5428 - page dedicated to prices (#5730)
* feat: 5428 - page dedicated to prices New file: * `prices_home_page.dart`: Home page of Prices Impacted file: * `user_preferences_account.dart`: replaced the whole prices items with a single item linking to new page `PricesHomePage` * minor fix * Moved to top page Prices and Donation New files: * `user_preferences_donation.dart`: Display of "Donation" for the preferences page. * `user_preferences_prices.dart`: Display of "Prices" for the preferences page. Deleted file: * `prices_home_page.dart` Impacted files: * `app_en.arb`: added a short label for "donation" * `user_preferences_account.dart`: removed link to `PricesHomePage` * `user_preferences_contribute.dart`: removed the "donation" item * `user_preferences_page.dart`: added "donation" and "prices" as preferences
- Loading branch information
1 parent
3fde3e6
commit 4b8489d
Showing
6 changed files
with
238 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
packages/smooth_app/lib/pages/preferences/user_preferences_donation.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:smooth_app/helpers/launch_url_helper.dart'; | ||
import 'package:smooth_app/pages/preferences/abstract_user_preferences.dart'; | ||
import 'package:smooth_app/pages/preferences/user_preferences_item.dart'; | ||
import 'package:smooth_app/pages/preferences/user_preferences_list_tile.dart'; | ||
import 'package:smooth_app/pages/preferences/user_preferences_page.dart'; | ||
|
||
/// Display of "Donation" for the preferences page. | ||
class UserPreferencesDonation extends AbstractUserPreferences { | ||
UserPreferencesDonation({ | ||
required super.context, | ||
required super.userPreferences, | ||
required super.appLocalizations, | ||
required super.themeData, | ||
}); | ||
|
||
@override | ||
PreferencePageType getPreferencePageType() => PreferencePageType.DONATION; | ||
|
||
@override | ||
String getTitleString() => appLocalizations.contribute_donate_title; | ||
|
||
@override | ||
String getSubtitleString() => appLocalizations.contribute_donate_header; | ||
|
||
@override | ||
IconData getLeadingIconData() => Icons.volunteer_activism; | ||
|
||
@override | ||
Icon? getForwardIcon() => UserPreferencesListTile.getTintedIcon( | ||
Icons.open_in_new, | ||
context, | ||
); | ||
|
||
@override | ||
Future<void> runHeaderAction() async => LaunchUrlHelper.launchURL( | ||
appLocalizations.donate_url, | ||
); | ||
|
||
@override | ||
List<UserPreferencesItem> getChildren() => <UserPreferencesItem>[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.