diff --git a/lib/app_configuration/widgets/ad_platform_config_form.dart b/lib/app_configuration/widgets/ad_platform_config_form.dart index de64075d..5c8024db 100644 --- a/lib/app_configuration/widgets/ad_platform_config_form.dart +++ b/lib/app_configuration/widgets/ad_platform_config_form.dart @@ -299,7 +299,7 @@ class _AdPlatformConfigFormState extends State { ), ], ), - const SizedBox(height: AppSpacing.lg), + const SizedBox(height: AppSpacing.lg), ], ); } diff --git a/lib/authentication/view/request_code_page.dart b/lib/authentication/view/request_code_page.dart index efe82332..d7b6acf5 100644 --- a/lib/authentication/view/request_code_page.dart +++ b/lib/authentication/view/request_code_page.dart @@ -145,7 +145,9 @@ class _RequestCodeView extends StatelessWidget { top: AppSpacing.lg, ), child: Text( - l10n.demoEmailHint('admin@example.com'), + l10n.demoEmailHint( + 'admin@example.com | publisher@example.com', + ), style: textTheme.bodyMedium?.copyWith( color: colorScheme.secondary, fontWeight: FontWeight.bold, diff --git a/lib/bootstrap.dart b/lib/bootstrap.dart index 79080172..6581e2f3 100644 --- a/lib/bootstrap.dart +++ b/lib/bootstrap.dart @@ -123,7 +123,7 @@ Future bootstrap( usersClient = DataInMemory( toJson: (i) => i.toJson(), getId: (i) => i.id, - // No initial data for users in demo mode. + initialData: usersFixturesData, logger: Logger('DataInMemory'), ); } else { diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 24286ca6..ddae4859 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -2174,12 +2174,6 @@ abstract class AppLocalizations { /// **'AdMob'** String get adPlatformTypeAdmob; - /// The name of the Local ad platform for custom ads. - /// - /// In en, this message translates to: - /// **'Local'** - String get adPlatformTypeLocal; - /// Tab title for Native Ads in local ads management. /// /// In en, this message translates to: diff --git a/lib/l10n/app_localizations_ar.dart b/lib/l10n/app_localizations_ar.dart index 4474ee61..83a758c5 100644 --- a/lib/l10n/app_localizations_ar.dart +++ b/lib/l10n/app_localizations_ar.dart @@ -1163,9 +1163,6 @@ class AppLocalizationsAr extends AppLocalizations { @override String get adPlatformTypeAdmob => 'أدموب'; - @override - String get adPlatformTypeLocal => 'محلي'; - @override String get nativeAdsTab => 'إعلانات أصلية'; diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 6335f4bc..2aceca0c 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -1162,9 +1162,6 @@ class AppLocalizationsEn extends AppLocalizations { @override String get adPlatformTypeAdmob => 'AdMob'; - @override - String get adPlatformTypeLocal => 'Local'; - @override String get nativeAdsTab => 'Native Ads'; diff --git a/lib/l10n/arb/app_ar.arb b/lib/l10n/arb/app_ar.arb index 94b23dfd..c43b11b7 100644 --- a/lib/l10n/arb/app_ar.arb +++ b/lib/l10n/arb/app_ar.arb @@ -1448,10 +1448,6 @@ "@adPlatformTypeAdmob": { "description": "اسم منصة إعلانات أدموب." }, - "adPlatformTypeLocal": "محلي", - "@adPlatformTypeLocal": { - "description": "اسم منصة الإعلانات المحلية للإعلانات المخصصة." - }, "nativeAdsTab": "إعلانات أصلية", "@nativeAdsTab": { "description": "عنوان تبويب الإعلانات الأصلية في إدارة الإعلانات المحلية." diff --git a/lib/l10n/arb/app_en.arb b/lib/l10n/arb/app_en.arb index 825f04a2..31b4f90a 100644 --- a/lib/l10n/arb/app_en.arb +++ b/lib/l10n/arb/app_en.arb @@ -1448,10 +1448,6 @@ "@adPlatformTypeAdmob": { "description": "The name of the AdMob ad platform." }, - "adPlatformTypeLocal": "Local", - "@adPlatformTypeLocal": { - "description": "The name of the Local ad platform for custom ads." - }, "nativeAdsTab": "Native Ads", "@nativeAdsTab": { "description": "Tab title for Native Ads in local ads management." diff --git a/lib/router/router.dart b/lib/router/router.dart index 09a55334..9ef24c32 100644 --- a/lib/router/router.dart +++ b/lib/router/router.dart @@ -117,7 +117,7 @@ GoRouter createRouter({ }) .whereType() .toList(); - + // Check if the destination path starts with any of the authorized base // paths, or if it's the universally accessible settings page. final isAuthorized = diff --git a/lib/shared/extensions/ad_platform_type_l10n.dart b/lib/shared/extensions/ad_platform_type_l10n.dart index b7971179..fb52d57b 100644 --- a/lib/shared/extensions/ad_platform_type_l10n.dart +++ b/lib/shared/extensions/ad_platform_type_l10n.dart @@ -10,8 +10,6 @@ extension AdPlatformTypeL10n on AdPlatformType { switch (this) { case AdPlatformType.admob: return l10n.adPlatformTypeAdmob; - case AdPlatformType.local: - return l10n.adPlatformTypeLocal; case AdPlatformType.demo: throw UnimplementedError( 'Demo ad platform type is not intended for dashboard usage, rather for mobile client, demo env specific usecase.', diff --git a/lib/shared/extensions/extensions.dart b/lib/shared/extensions/extensions.dart index 8056f646..9987aa14 100644 --- a/lib/shared/extensions/extensions.dart +++ b/lib/shared/extensions/extensions.dart @@ -6,6 +6,5 @@ export 'content_status_l10n.dart'; export 'dashboard_user_role_l10n.dart'; export 'feed_decorator_type_l10n.dart'; export 'in_article_ad_slot_type_l10n.dart'; -export 'local_ad_to_ad_type.dart'; export 'source_type_l10n.dart'; export 'string_truncate.dart'; diff --git a/lib/shared/extensions/local_ad_to_ad_type.dart b/lib/shared/extensions/local_ad_to_ad_type.dart deleted file mode 100644 index cb6e6e4d..00000000 --- a/lib/shared/extensions/local_ad_to_ad_type.dart +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:core/core.dart'; - -/// Extension on [LocalAd] to provide a convenient way to get its [AdType]. -extension LocalAdX on LocalAd { - /// Converts the [LocalAd]'s `adType` string to an [AdType] enum value. - /// - /// Throws a [FormatException] if the `adType` string does not correspond - /// to a valid [AdType] enum value. - AdType toAdType() { - switch (adType) { - case 'native': - return AdType.native; - case 'banner': - return AdType.banner; - case 'interstitial': - return AdType.interstitial; - case 'video': - return AdType.video; - default: - throw FormatException('Unknown AdType for LocalAd: $adType'); - } - } -} diff --git a/pubspec.lock b/pubspec.lock index 26b8991c..e407de84 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -31,11 +31,11 @@ packages: dependency: "direct main" description: path: "." - ref: "v1.0.1" - resolved-ref: b999691989447aff05a936414e6f6fdfbbb73a07 + ref: "v1.1.0" + resolved-ref: a37ed3cc6e305b1285a77619b1d7272b42517ea9 url: "https://github.com/flutter-news-app-full-source-code/auth-inmemory" source: git - version: "1.0.1" + version: "1.1.0" auth_repository: dependency: "direct main" description: @@ -89,8 +89,8 @@ packages: dependency: "direct main" description: path: "." - ref: "v1.3.1" - resolved-ref: a03efff11b7577974cb444a1a6a46fee8b05ea42 + ref: e7c808c9d459233196e2eac3137a9c87d3976af3 + resolved-ref: e7c808c9d459233196e2eac3137a9c87d3976af3 url: "https://github.com/flutter-news-app-full-source-code/core.git" source: git version: "1.3.1" diff --git a/pubspec.yaml b/pubspec.yaml index 6c8cb8e9..11fa1410 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: auth_inmemory: git: url: https://github.com/flutter-news-app-full-source-code/auth-inmemory - ref: v1.0.1 + ref: v1.1.0 auth_repository: git: url: https://github.com/flutter-news-app-full-source-code/auth-repository.git @@ -89,3 +89,11 @@ dev_dependencies: flutter: uses-material-design: true generate: true + +dependency_overrides: + # TODO: Remove this override when core version > 1.3.1 is released. + # This is needed for the removal of LocalAd. + core: + git: + url: https://github.com/flutter-news-app-full-source-code/core.git + ref: e7c808c9d459233196e2eac3137a9c87d3976af3 \ No newline at end of file