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:
Vishesh Handa
2021-05-06 14:25:58 +02:00
parent 34ff6ee843
commit 3d07328aab
4 changed files with 12 additions and 10 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,