mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-27 17:29:50 +08:00
Editors: Set background color
With Flutter 2, the way the theme has set has changed, so I'm slowly migrating to Flex Color Scheme, and fixing all the widgets that look strange.
This commit is contained in:
@ -13,7 +13,8 @@ class NoteBodyEditor extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var style = Theme.of(context).textTheme.subtitle1;
|
||||
var theme = Theme.of(context);
|
||||
var style = theme.textTheme.subtitle1;
|
||||
|
||||
return TextField(
|
||||
autofocus: autofocus,
|
||||
@ -24,6 +25,7 @@ class NoteBodyEditor extends StatelessWidget {
|
||||
hintText: tr('editors.common.defaultBodyHint'),
|
||||
border: InputBorder.none,
|
||||
isDense: true,
|
||||
fillColor: theme.scaffoldBackgroundColor,
|
||||
),
|
||||
controller: textController,
|
||||
textCapitalization: TextCapitalization.sentences,
|
||||
|
@ -10,7 +10,8 @@ class NoteTitleEditor extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var style = Theme.of(context).textTheme.headline6;
|
||||
var theme = Theme.of(context);
|
||||
var style = theme.textTheme.headline6;
|
||||
|
||||
return TextField(
|
||||
keyboardType: TextInputType.text,
|
||||
@ -19,6 +20,7 @@ class NoteTitleEditor extends StatelessWidget {
|
||||
hintText: tr('editors.common.defaultTitleHint'),
|
||||
border: InputBorder.none,
|
||||
isDense: true,
|
||||
fillColor: theme.scaffoldBackgroundColor,
|
||||
),
|
||||
controller: textController,
|
||||
textCapitalization: TextCapitalization.sentences,
|
||||
|
@ -191,10 +191,8 @@ class _NoteEditor extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var style = Theme.of(context)
|
||||
.textTheme
|
||||
.subtitle1
|
||||
.copyWith(fontFamily: "Roboto Mono");
|
||||
var theme = Theme.of(context);
|
||||
var style = theme.textTheme.subtitle1.copyWith(fontFamily: "Roboto Mono");
|
||||
|
||||
return TextField(
|
||||
autofocus: autofocus,
|
||||
@ -205,6 +203,7 @@ class _NoteEditor extends StatelessWidget {
|
||||
hintText: tr('editors.common.defaultBodyHint'),
|
||||
border: InputBorder.none,
|
||||
isDense: true,
|
||||
fillColor: theme.scaffoldBackgroundColor,
|
||||
),
|
||||
controller: textController,
|
||||
textCapitalization: TextCapitalization.sentences,
|
||||
|
@ -175,10 +175,8 @@ class _NoteEditor extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var style = Theme.of(context)
|
||||
.textTheme
|
||||
.subtitle1
|
||||
.copyWith(fontFamily: "Roboto Mono");
|
||||
var theme = Theme.of(context);
|
||||
var style = theme.textTheme.subtitle1.copyWith(fontFamily: "Roboto Mono");
|
||||
|
||||
return TextField(
|
||||
autofocus: autofocus,
|
||||
@ -189,6 +187,7 @@ class _NoteEditor extends StatelessWidget {
|
||||
hintText: tr('editors.common.defaultBodyHint'),
|
||||
border: InputBorder.none,
|
||||
isDense: true,
|
||||
fillColor: theme.scaffoldBackgroundColor,
|
||||
),
|
||||
controller: textController,
|
||||
textCapitalization: TextCapitalization.sentences,
|
||||
|
Reference in New Issue
Block a user