mirror of
https://github.com/foss42/apidash.git
synced 2025-08-06 13:51:20 +08:00
Update intro_message.dart
This commit is contained in:
@ -22,7 +22,13 @@ class _IntroMessageState extends State<IntroMessage> {
|
|||||||
builder: (BuildContext context, AsyncSnapshot<String> snapshot) {
|
builder: (BuildContext context, AsyncSnapshot<String> snapshot) {
|
||||||
if ((snapshot.connectionState == ConnectionState.done) &&
|
if ((snapshot.connectionState == ConnectionState.done) &&
|
||||||
snapshot.hasData) {
|
snapshot.hasData) {
|
||||||
return CustomMarkdown(data: snapshot.data!);
|
String text = snapshot.data!;
|
||||||
|
if (Theme.of(context).brightness == Brightness.dark) {
|
||||||
|
text = text.replaceAll("{{mode}}", "dark");
|
||||||
|
} else {
|
||||||
|
text = text.replaceAll("{{mode}}", "light");
|
||||||
|
}
|
||||||
|
return CustomMarkdown(data: text);
|
||||||
}
|
}
|
||||||
if (snapshot.hasError) {
|
if (snapshot.hasError) {
|
||||||
return const ErrorMessage(message: "An error occured");
|
return const ErrorMessage(message: "An error occured");
|
||||||
|
Reference in New Issue
Block a user