-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added link to download Java in the settings screen
- Loading branch information
1 parent
afdd8bd
commit b8725c6
Showing
4 changed files
with
65 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import "package:flutter/material.dart"; | ||
import "package:flutter_markdown/flutter_markdown.dart"; | ||
import "package:url_launcher/url_launcher_string.dart"; | ||
|
||
class SettingHeading extends StatelessWidget { | ||
final String text; | ||
|
||
const SettingHeading(this.text, {super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final TextTheme textTheme = Theme.of(context).textTheme; | ||
final TextStyle? titleStyle = textTheme.headlineSmall; | ||
final TextStyle? labelStyle = textTheme.labelMedium?.copyWith(color: Colors.grey); | ||
return Padding( | ||
padding: const EdgeInsets.only(left: 16, bottom: 8, top: 16), | ||
child: Padding( | ||
padding: const EdgeInsets.only(top: 4), | ||
child: MarkdownBody( | ||
data: text, | ||
onTapLink: (String text, String? href, String title) { | ||
if (href != null) { | ||
launchUrlString(href); | ||
} | ||
}, | ||
styleSheet: MarkdownStyleSheet( | ||
h1: titleStyle, | ||
p: labelStyle, | ||
a: labelStyle?.copyWith( | ||
color: Colors.blue, | ||
decoration: TextDecoration.underline, | ||
), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,16 +1,21 @@ | ||
import "package:flutter/material.dart"; | ||
|
||
import "java/java_picker.dart"; | ||
import "setting_heading.dart"; | ||
|
||
class SettingsScreen extends StatelessWidget { | ||
const SettingsScreen({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ListView(children: const [ | ||
Text("Java Executable"), //TODO: Add link to download Java | ||
SizedBox(height: 4), | ||
JavaPicker(), | ||
]); | ||
return ListView( | ||
children: const [ | ||
SettingHeading( | ||
"# Java Executable\n" | ||
"You can download Java [here](https://adoptium.net/temurin/releases/)", | ||
), | ||
JavaPicker(), | ||
], | ||
); | ||
} | ||
} |
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