diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index b8dcb5d..9dd7fea 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -24,6 +24,7 @@ "themeLight": "Light", "themeDark": "Dark", "themeSystemDefault": "System default", + "sourceCode": "Source code", "version": "Version: {version} ({buildNumber})", "@version": { "placeholders": { diff --git a/lib/screens/settings/components/source_code/widget_list_tile_source_code.dart b/lib/screens/settings/components/source_code/widget_list_tile_source_code.dart new file mode 100644 index 0000000..75c59dc --- /dev/null +++ b/lib/screens/settings/components/source_code/widget_list_tile_source_code.dart @@ -0,0 +1,18 @@ +import 'package:flutter/material.dart'; +import 'package:lightmeter/generated/l10n.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class SourceCodeListTile extends StatelessWidget { + const SourceCodeListTile({super.key}); + + @override + Widget build(BuildContext context) { + return ListTile( + leading: const Icon(Icons.code), + title: Text(S.of(context).sourceCode), + onTap: () { + launchUrl(Uri.parse("https://github.com/vodemn/m3_lightmeter")); + }, + ); + } +} diff --git a/lib/screens/settings/screen_settings.dart b/lib/screens/settings/screen_settings.dart index 6406f94..7c29bfd 100644 --- a/lib/screens/settings/screen_settings.dart +++ b/lib/screens/settings/screen_settings.dart @@ -3,6 +3,7 @@ import 'package:lightmeter/generated/l10n.dart'; import 'package:lightmeter/res/dimens.dart'; import 'components/haptics/provider_list_tile_haptics.dart'; +import 'components/source_code/widget_list_tile_source_code.dart'; import 'components/widget_list_tile_fractional_stops.dart'; import 'components/theme/widget_settings_theme.dart'; import 'components/widget_label_version.dart'; @@ -42,6 +43,7 @@ class SettingsScreen extends StatelessWidget { const StopTypeListTile(), const HapticsListTileProvider(), const ThemeSettings(), + const SourceCodeListTile(), ], ), ), diff --git a/pubspec.yaml b/pubspec.yaml index 1396264..d9aeff7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -22,6 +22,7 @@ dependencies: permission_handler: 10.2.0 provider: 6.0.4 shared_preferences: 2.0.15 + url_launcher: 6.1.8 vibration: 1.7.6 dev_dependencies: