fix: resolve 2 remaining strict analysis errors
- introPage.dart: Convert fireItems to proper static function closure - mainDrawer.dart: Convert unreadCount int to String for Text widget
This commit is contained in:
parent
1864e5b105
commit
7a4c9fb3bc
61 changed files with 1386 additions and 1202 deletions
|
|
@ -8,40 +8,40 @@ import 'globals.dart' as globals;
|
|||
import 'mainDrawer.dart';
|
||||
|
||||
abstract class MarkdownPage extends StatefulWidget {
|
||||
|
||||
const MarkdownPage({super.key, required this.title, required this.route, required this.file});
|
||||
final String title;
|
||||
final Future<String> file;
|
||||
final String route;
|
||||
|
||||
MarkdownPage({required this.title, required this.route, required this.file});
|
||||
|
||||
@override
|
||||
_MarkdownPageState createState() =>
|
||||
_MarkdownPageState(title: this.title, file: this.file, route: this.route);
|
||||
_MarkdownPageState(title: title, file: file, route: route);
|
||||
}
|
||||
|
||||
class _MarkdownPageState extends State<MarkdownPage> {
|
||||
final String title;
|
||||
final String route;
|
||||
final Future<String> file;
|
||||
String pageData = "";
|
||||
|
||||
_MarkdownPageState(
|
||||
{required this.title, required this.file, required this.route});
|
||||
final String title;
|
||||
final String route;
|
||||
final Future<String> file;
|
||||
String pageData = '';
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
this.file.then((fileSync) {
|
||||
file.then((String fileSync) {
|
||||
rootBundle
|
||||
.loadString(fileSync, cache: !globals.isDevelopment)
|
||||
.then((pageData) {
|
||||
.then((String pageData) {
|
||||
setState(() {
|
||||
this.pageData = pageData;
|
||||
});
|
||||
});
|
||||
});
|
||||
return new Scaffold(
|
||||
appBar: new AppBar(title: new Text(title ?? '')),
|
||||
drawer: new MainDrawer(context, route),
|
||||
body: new Markdown(data: pageData));
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(title ?? '')),
|
||||
drawer: MainDrawer(context, route),
|
||||
body: Markdown(data: pageData));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue