Navigation improvements
This commit is contained in:
parent
ff854b2a06
commit
0b56a02a0b
9 changed files with 151 additions and 160 deletions
|
|
@ -5,24 +5,27 @@ import 'package:flutter/services.dart' show rootBundle;
|
|||
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||
|
||||
import 'globals.dart' as globals;
|
||||
import 'mainDrawer.dart';
|
||||
|
||||
abstract class MarkdownPage extends StatefulWidget {
|
||||
final String title;
|
||||
final Future<String> file;
|
||||
final String route;
|
||||
|
||||
MarkdownPage({this.title, this.file});
|
||||
MarkdownPage({this.title, this.route, this.file});
|
||||
|
||||
@override
|
||||
_MarkdownPageState createState() =>
|
||||
_MarkdownPageState(title: this.title, file: this.file);
|
||||
_MarkdownPageState(title: this.title, file: this.file, route: this.route);
|
||||
}
|
||||
|
||||
class _MarkdownPageState extends State<MarkdownPage> {
|
||||
final String title;
|
||||
final String route;
|
||||
final Future<String> file;
|
||||
String pageData = "";
|
||||
|
||||
_MarkdownPageState({this.title, this.file});
|
||||
_MarkdownPageState({this.title, this.file, this.route});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -37,6 +40,7 @@ class _MarkdownPageState extends State<MarkdownPage> {
|
|||
});
|
||||
return new Scaffold(
|
||||
appBar: new AppBar(title: new Text(title ?? '')),
|
||||
drawer: new MainDrawer(context, route),
|
||||
body: new Markdown(data: pageData));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue