import 'package:flutter/material.dart'; import 'markdown_editing.dart'; import 'markdown_view.dart'; import 'themes/day.dart'; import 'themes/night.dart'; class ReadOnlyPage extends StatelessWidget { final String title; final String content; ReadOnlyPage({ required this.title, required this.content, }); @override Widget build(BuildContext context) { final view = MarkdownView( controller: MarkdownController( text: content, theme: Theme.of(context).brightness == Brightness.dark ? nightTheme : dayTheme, ), ); return Scaffold( appBar: AppBar(title: Text(title)), body: Padding( padding: const EdgeInsets.symmetric(horizontal: 15.0), child: title == "About" ? Column( children: [ Center( child: Image.asset( 'assets/blaster_fg.png', width: 200, ) ), Expanded(child: view), ] ) : view, ), ); } }