-
-
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.
Add changelog & re-use viewer for privacy policy
- Loading branch information
Showing
8 changed files
with
91 additions
and
6 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,3 @@ | ||
# Welcome! | ||
|
||
This is the first release of Gear on the Go. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_markdown/flutter_markdown.dart'; | ||
import 'package:markdown/markdown.dart' as md; | ||
import 'package:url_launcher/url_launcher.dart'; | ||
|
||
class MarkdownInfo { | ||
final String content; | ||
final String title; | ||
|
||
MarkdownInfo({required this.content, required this.title}); | ||
} | ||
|
||
class MarkdownViewer extends StatefulWidget { | ||
const MarkdownViewer({super.key, required this.markdownInfo}); | ||
|
||
final MarkdownInfo markdownInfo; | ||
|
||
@override | ||
_MarkdownViewerState createState() => _MarkdownViewerState(); | ||
} | ||
|
||
class _MarkdownViewerState extends State<MarkdownViewer> { | ||
@override | ||
void initState() { | ||
super.initState(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar( | ||
title: Text(widget.markdownInfo.title), | ||
), | ||
body: Markdown( | ||
data: widget.markdownInfo.content, | ||
extensionSet: md.ExtensionSet( | ||
md.ExtensionSet.gitHubFlavored.blockSyntaxes, | ||
<md.InlineSyntax>[md.EmojiSyntax(), ...md.ExtensionSet.gitHubFlavored.inlineSyntaxes], | ||
), | ||
onTapLink: (linkText, linkUrl, linkTitle) async => await launchUrl(Uri.parse(linkUrl!)), | ||
), | ||
); | ||
} | ||
} |
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
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