Skip to content

Commit

Permalink
add discover more app section
Browse files Browse the repository at this point in the history
  • Loading branch information
cem256 committed Mar 3, 2024
1 parent b5e22ce commit bc01102
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 3 deletions.
Binary file added assets/icons/gpt_detector_no_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions lib/app/constants/asset_constants.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
abstract final class AssetConstants {
static const String appIcon = 'assets/icons/generator_no_bg.png';
static const String gptDetectorAppIcon = 'assets/icons/gpt_detector_no_bg.png';
}
2 changes: 2 additions & 0 deletions lib/app/constants/string_constants.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
abstract final class StringConstants {
static const String appName = 'Password Generator';
static const String gptDetector = 'GPT Detector';
static const String githubUrl = 'https://github.com/cem256/password_generator';
static const String privacyPolicyUrl = 'https://cem256.github.io/password_generator/privacy-policy.html';
static const String googlePlayUrl = 'https://play.google.com/store/apps/details?id=com.cem256.passwordgenerator';
static const String gptDetectorPlayStoreUrl = 'https://play.google.com/store/apps/details?id=com.cem256.gptdetector';
}
4 changes: 3 additions & 1 deletion lib/app/l10n/arb/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@
},
"rate_app": "Rate App",
"share_app": "Share App",
"contribute": "Contribute"
"contribute": "Contribute",
"discover_more_apps": "Discover More Apps",
"gpt_detector_description": "Detects whether a writing was generated by a large language model or not."
}
4 changes: 3 additions & 1 deletion lib/app/l10n/arb/app_tr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@
},
"rate_app": "Uygulamayı Değerlendir",
"share_app": "Uygulamayı Paylaş",
"contribute": "Katkıda Bulun"
"contribute": "Katkıda Bulun",
"discover_more_apps": "Daha Fazla Uygulama Keşfedin",
"gpt_detector_description": "Metinlerin büyük dil modeli(LLM) tarafından oluşturulup oluşturulmadığını tespit eder."
}
4 changes: 3 additions & 1 deletion lib/app/l10n/arb/app_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@
},
"rate_app": "评价应用",
"share_app": "分享应用",
"contribute": "贡献"
"contribute": "贡献",
"discover_more_apps": "发现更多应用",
"gpt_detector_description": "检测文本是否由大型语言模型生成。"
}
7 changes: 7 additions & 0 deletions lib/app/theme/base/base_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ abstract base class BaseTheme {
colorSchemeSeed: Colors.amber,
appBarTheme: _appBarTheme,
dialogTheme: _dialogTheme,
expansionTileTheme: _expansionTileThemeData,
listTileTheme: _listTileThemeData,
navigationBarTheme: _navigationBarTheme,
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
Expand All @@ -27,6 +29,11 @@ abstract base class BaseTheme {
),
);

final ExpansionTileThemeData _expansionTileThemeData =
const ExpansionTileThemeData(tilePadding: EdgeInsets.zero, shape: Border());

final ListTileThemeData _listTileThemeData = const ListTileThemeData(contentPadding: EdgeInsets.zero);

final NavigationBarThemeData _navigationBarTheme = NavigationBarThemeData(
indicatorShape: RoundedRectangleBorder(
borderRadius: ThemeConstants.borderRadiusCircular,
Expand Down
17 changes: 17 additions & 0 deletions lib/app/widgets/drawer/custom_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,23 @@ class CustomDrawer extends StatelessWidget {
title: Text(context.l10n.contribute),
onTap: () async => UrlLauncherUtils.launchUrlFromString(url: StringConstants.githubUrl),
),
ExpansionTile(
leading: const Icon(Icons.smartphone),
title: Text(context.l10n.discover_more_apps),
initiallyExpanded: true,
children: [
ListTile(
onTap: () async =>
UrlLauncherUtils.launchUrlFromString(url: StringConstants.gptDetectorPlayStoreUrl),
leading: Image.asset(
AssetConstants.gptDetectorAppIcon,
height: 24,
),
title: const Text(StringConstants.gptDetector),
subtitle: Text(context.l10n.gpt_detector_description),
),
],
),
],
),
),
Expand Down

0 comments on commit bc01102

Please sign in to comment.